0

i have an envelope that uses a template, to which i want to add SMS authentication.

currently using TemplateRoles (without SMS authentication)

  • the template determines the order of the signers by their Role
  • during signing: the document included in the envelope is shown and the recipient fields are overlayed on it
  • during signing: the document in the template does not appear

example SDK EnvelopeDefinition converted to JSON:

{
  "documents": [
    {
      "documentBase64": "[base64]",
      "documentId": "1",
      "fileExtension": "pdf",
      "name": "doc1.pdf"
    }
  ],
  "emailBlurb": "Dear sir/madam, please sign upon agreement",
  "emailSubject": "TEST signature request DocuSign",
  "notification": {
    "expirations": {
      "expireAfter": "2",
      "expireEnabled": "True",
      "expireWarn": "0"
    },
    "reminders": {
      "reminderDelay": "1",
      "reminderEnabled": "True",
      "reminderFrequency": "0"
    }
  },
  "status": "sent",
  "templateId": "55eef358-8081-4335-92bb-5d9298197093",
  "templateRoles": [
    {
      "email": "[email protected]",
      "emailNotification": {
        "emailBody": "Dear sir/madam, please sign upon agreement",
        "emailSubject": "TEST signature request DocuSign",
        "supportedLanguage": "en"
      },
      "name": "Jane Smith",
      "roleName": "Manager"
    },
    {
      "email": "[email protected]",
      "emailNotification": {
        "emailBody": "Dear sir/madam, please sign upon agreement",
        "emailSubject": "TEST signature request DocuSign",
        "supportedLanguage": "en"
      },
      "name": "John Smith",
      "roleName": "Candidate"
    }
  ]
}

i want to keep this functionality intact.

attempted CompositeTemplates (with SMS authentication)

i've tried to add SMS authentication by converting to CompositeTemplates.

example SDK EnvelopeDefinition converted to JSON:

{
  "compositeTemplates": [
    {
      "inlineTemplates": [
        {
          "documents": [
            {
              "documentBase64": "[base64]",
              "documentId": "1",
              "fileExtension": "pdf",
              "name": "doc1.pdf"
            }
          ],
          "recipients": {
            "signers": [
              {
                "email": "[email protected]",
                "emailNotification": {
                  "emailBody": "Dear sir/madam, please sign upon agreement",
                  "emailSubject": "TEST signature request DocuSign",
                  "supportedLanguage": "en"
                },
                "emailRecipientPostSigningURL": "https://www.example.com/",
                "identityVerification": {
                  "inputOptions": [
                    {
                      "name": "phone_number_list",
                      "phoneNumberList": [
                        {
                          "countryCode": "55",
                          "number": "12345678901"
                        }
                      ],
                      "valueType": "PhoneNumberList"
                    }
                  ],
                  "workflowId": "d9212359-89fb-42a2-a96e-d6019481bb62"
                },
                "name": "Jane Smith",
                "recipientId": "1",
                "roleName": "Manager"
              },
              {
                "email": "[email protected]",
                "emailNotification": {
                  "emailBody": "Dear sir/madam, please sign upon agreement",
                  "emailSubject": "TEST signature request DocuSign",
                  "supportedLanguage": "en"
                },
                "emailRecipientPostSigningURL": "https://www.example.com/",
                "identityVerification": {
                  "inputOptions": [
                    {
                      "name": "phone_number_list",
                      "phoneNumberList": [
                        {
                          "countryCode": "55",
                          "number": "12345678902"
                        }
                      ],
                      "valueType": "PhoneNumberList"
                    }
                  ],
                  "workflowId": "d9212359-89fb-42a2-a96e-d6019481bb62"
                },
                "name": "John Smith",
                "recipientId": "2",
                "roleName": "Candidate"
              }
            ]
          },
          "sequence": "2"
        }
      ],
      "serverTemplates": [
        {
          "sequence": "1",
          "templateId": "55eef358-8081-4335-92bb-5d9298197093"
        }
      ]
    }
  ],
  "emailBlurb": "Dear sir/madam, please sign upon agreement",
  "emailSubject": "TEST signature request DocuSign",
  "notification": {
    "expirations": {
      "expireAfter": "2",
      "expireEnabled": "True",
      "expireWarn": "0"
    },
    "reminders": {
      "reminderDelay": "1",
      "reminderEnabled": "True",
      "reminderFrequency": "0"
    }
  },
  "status": "sent"
}

almost everything seems to be working including recipient fields, except that the document from the template is not replaced by the one in the envelope like with TemplateRoles.

how do i achieve this?

i haven't found enough documentation or examples, for how to change a TemplateRoles to a CompositeTemplates based envelope.

1 Answer 1

2

Remove documents from your inlineTemplate. Place in a document element at compositeTemplate level.

<compositeTemplate>{
    "document": "...",
    "serverTemplate":{...},
    "inlineTemplate":{...}
}

This will ensure the document at the composite level contributes the actual document, such that your templates don't contribute a physical file within this composite object.

Your sequences are correct. I have not inspected your templates in detail, but this should fix your immediate problem.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.