Integrate with DocuSign

You might want to send documents that are part of the Next Matter workflow to sign with DocuSign. Integrate with DocuSign to manage document signing end to end.

Before you begin

  • To connect DocuSign, you first need to generate your DocuSign Account ID and then connect DocuSign and Next Matter.
  • Understand how data references work. See Use data references. This will help you use the captured data in the workflow steps.

🚧

Good to know: Check out our ready-made templates available when you add a step and select Templates > 3rd party templates. You can use the templates to create a set of pre-configured steps.
Need a specific template? Click the Contact us button in the top right of the page and let us know.

Get the details from DocuSign

  1. Sign in to Docusign as an administrator.
  2. Navigate to Settings > Apps and Keys.
  3. Copy the Account API ID that is displayed in My Account Information.

Connect to Next Matter


  1. In your Next Matter portal, go to Company > Integrations.
  2. Click Connect for Docusign.
  3. Follow the prompts to allow access for Next Matter to create and send envelopes.

Build your process with DocuSign integration

Usecase: Upload the files to Next Matter and send them to sign

  1. Select the Next Matter workflow that should integrate with DocuSign.
  2. Click Edit workflow.
  3. Click Add step and select Integrations as the step type.
  4. Select DocuSign as the integration.
  5. Click the step to open it.
  6. Click Settings.
  7. Select POST as the Method and enter the following URL:
URL: https://eu.docusign.net/restapi/v2.1/accounts/API_ACCOUNT_ID/envelopes

πŸ“˜

Note that this URL is set to European instances of Docusign. You might want to check where your instance is hosted.

  1. In Preconfigured integration, select DocuSign.
  2. Enter the Body of the request. It might look like the following:
{
  "emailSubject": "Please sign this document",
  "documents": [{
    "documentBase64": "{File Upload - First file (base64)}",
    "name": "Employment Contract",
    "fileExtension": "pdf",
    "documentId": "1"
  }],
  "recipients": {
    "signers": [{
        "name": "John Doe",
        "email": "[email protected]",
        "recipientId": "1",
        "routingOrder": "1",
        "tabs": {
            "signHereTabs": [{
                "anchorString": "**signature_1**",
                "anchorUnits": "pixels",
                "anchorXOffset": "20",
                "anchorYOffset": "10"
            }]
        }
    }],
    "carbonCopies": [{
        "name": "Jane Smith",
        "email": "[email protected]",
        "recipientId": "2",
        "routingOrder": "1",
    }]
  },
  "status": "sent"
}

πŸ“˜

Make sure there is a form step with a field to upload the DocuSign document that proceeds the Integration step.

There can be multiple uploaded files but each needs the base64 encoding format as the Data reference.

  1. Click Save changes.

Considerations

  • The Sign field specified in the example above is one of many fields (called Tabs in DocuSign) than can be configured. You can add configure fields per recipient and assign each recipient different fields to fill in. Configure these fields in the tabs parameter.
  • The position of the field in the document is specified by the anchorOffset.
  • For each recipient, you can configure the name and email either with predefined values or using data references from previous form fields. Each recipient has a different recipient ID, so just increase the ID by one each time a new one is included. For details on. recipients, see DocuSign documentation. The above example uses the signer and the person receiving a carbon copy.
  • The sent status indicates that an envelope will be created and directly sent.

Usecase: Send an Envelope Template to sign

  1. Select the Next Matter workflow that should integrate with DocuSign.
  2. Click Edit workflow.
  3. Click Add step and select Integrations as the step type.
  4. Select DocuSign as the integration.
  5. Click the step to open it.
  6. Click Settings.
  7. Select POST as the Method and enter the following URL:
    URL: https://eu.docusign.net/restapi/v2.1/accounts/API_ACCOUNT_ID/envelop
    
  8. In Preconfigured integration, select DocuSign.
  9. Enter the Body of the request. It might look like the following:
{
  "templateId": "ENVELOPE_TEMPLATE_ID",//this is a placeholder
  "templateRoles": [
     {
        "name": "John Doe",
        "email": "[email protected]",
        "recipientId": "1",
	"roleName": "signer",
	"tabs": {				
	    "textTabs": [{
		"tabLabel": "Job Position",
		"value": "Marketing manager"
	    },
	    {
		"tabLabel": "Organization",
		"value": "Organization"
	    }]
	}
     },
     {
        "name": "Jane Smith",
        "email": "[email protected]",
        "recipientId": "2",
        "roleName": "cc"
     }],
     "status": "sent"
}

Considerations

  • You can get the Template ID from DocuSign. Navigate to Templates and select the template to use. The template ID is at the top of the template.
  • To get DocuSign recipientId, see DocuSign documentation.
  • Each template has defined recipients, documents, and fields (tabs).
    The recipients for each envelope in Docusign are defined with a Rolename to identify them. Each recipient may have a different role type defined in the template itself.
    The document can contain custom fields created in Docusign. You can fill them out automatically in your Next Matter process. Each custom field is associated with one recipient. This is why the "tabs" attribute is defined per recipient. You can create a custom field, label it and enter the value in the tabLabel attribute of the Body.
A screenshot from the Docusign. The Organization Custom field is highlighted on the left and the data label field is highlighted on the right.

For more on creating custom fields in DocuSign, watch this DocuSign tutorial.