signNow Salesforce proxy remote invite

Remote Invite

POST https://sfln0.signnow.com/api/remote_invite

remote_invite accepts a JSON body that has variant parameters

Invite

"invite":{ 
     "to":[ 
        { 
           "email":"{Contact.Email}",
        	"role":"Signer",
           "order":1
        }
     ],
     "from":"[email protected]",
     "cc":[ 
"[email protected]"
     ],
     "subject":"[email protected] Needs Your Signature",
     "message":"Hi, {Contact.Email}. \n You have been invited to sign a document"
  }

Invite can be based on next sources:

  1. template_id - template ID from signNow;
  2. document_id - document ID from signNow;
  3. attachment_id - attachment ID from Salesforce.

Required:

sf_user_id - required. This is the Salesforce user’s ID ← it is used to look up if a user is a real Salesforce user that has signNow application installed. We authenticate with each user that has signNow and Salesforce applications configured, so if they are in the database the Salesforce user’s ID is used to do OAuth with Salesforce.

sf_record_id - required. It should be the full length from the record ID. You can find them using the API or the developer console.

sf_record_type - required.required this is the object type of the record that we want to associate the invite with. This should be the exact syntax as salesforce so custom objects __c.

Validating and authenticating with signNow:

client_id - you must use a client ID and also be a valid user that is logged in to signNow for Salesforce with the account that documents/templates your trying to send.

Document name:

to set document name, use document_name
"document_name":"invoice {Order.OrderNumber}"

Users can use Annotation_config option in the invite body to set line height and font size.

"annotation_config":
{
"line_height": 30,
"size": 25
}

For process builder

Using the Salesforce Process Builder, select a conditional event that you want to use for triggering an invite. If that conditional is true, then execute SNProxy Post Apex Class.

Set endpoint URL as sfln0.signnow.com/api/remote_bulk_invite or sfln0.signnow.com/api/remote_invite

Set Json Body as SignNow Automated Invites (custom object) field JsonBody to its value.

When the continual event occurred, then a user is able to automatically send a Salesforce attachment, a signNow document, or a signNow template given the JSON body from the record as the data that is used to execute this invite.

JSON body example

{
"invite":{
  "to":[
    {
    "email":"{Contact.Email}",
    "role":"Signer",
    "order":1,
    "expiration_days":11,
    "reminder":1,
    "reassign":true
    }	
    ],
  "from":"[email protected]",
  "cc":[],
  "subject":"[email protected] Needs Your Signature",
  "message":""
  },
"attachment_id":"xxxxx",
"sf_user_id":"xxxxx",
"sf_record_id":"xxxxx",
"sf_record_type":"Contact",
"client_id":"xxxxx",
"annotation_config":{
  "line_height": 30,
  "size": 25
  }
}

Bulk remote invite

POST https://sfln0.signnow.com/remote_bulk_invite

IMPORTANT:

  • record_list, sf_record_id values must be full ID but not a shortened version of the ID.

Record list

  • Record list is the list of bulk records we would like to mass invite
"record_list":[
{
"Id":"0030W00003WuwcxQAB"
}
]
  • Bulk Invite type

To send out bulk invites, the call needs to provide also the record type of the bulk records you would like to invite.

"bulk_invite_type":"Contact"

Bulk invite source record

  • Source record
  1. Each invite has a source record and a list of bulk records. The source record is the originator of the invite. It is a central record from which users can see all the documents sent from this bulk invite.

  2. Each individual bulk record has a reference only to its own invite and source has a reference to all of them.

"sf_record_id":"0030W00003WuwdbQAB",
"sf_record_type":"Contact"

JSON body example

{
"invite":{
  "to":[
    {
    "email":"{Contact_bulk.Email}",
    "role":"Signer",
    "order":1,
    "expiration_days":30,
    "reminder":0,
    "reassign":false
    }
    ],
  "from":"[email protected]",
  "cc":[],
  "subject":"[email protected] Needs Your Signature",
  "message":""
  },
"record_list":[
  {
  "Id":"0030W00003WuwcxQAB"
  }
  ],
"client_id":"xxxxx",
"sf_user_id":"xxxxx",
"sf_record_id":"xxxxx",
"sf_record_type":"Contact",
"attachment_id":"xxxxx",
"bulk_invite_type":"Contact",
"annotation_config":{
  "line_height": 30,
  "size": 15
  }
}