0

I have an agreement that I need signed. The link to the document is opened up after the Client provides their company and payment information for our services. How can I pass values like company name or billing address to the document from a form?

Right now the Client clicks the "Go to Agreement" and it brings up the document. The problem lies in that they would be having to re-type the information they just submitted on our form again in the echosign document.

2 Answers2

0

You can use the mergeFieldInfo for this A sample Payload for the same

{
  "documentCreationInfo": {
    "fileInfos": [
      {
        "libraryDocumentId": "xxxxxxxxxx"
      }
    ],
    "name": "xxxxxxxxxx xxxxxxxxxx",
    "message": "Please sign the agreement",
    "recipientSetInfos": [
      {
        "recipientSetRole": "SIGNER",
        "recipientSetMemberInfos": [
          {
            "email": "xxxx@xxxx.com"
          }
        ]
      }
    ],
    "signatureType": "ESIGN",
    "signatureFlow": "SENDER_SIGNATURE_NOT_REQUIRED",
    "mergeFieldInfo": [
      {
        "fieldName": "firstName",
        "defaultValue": "xxxx"
      },
      {
        "fieldName": "lastName",
        "defaultValue": "xxxx"
      },
      {
        "fieldName": "email",
        "defaultValue": "xxxx@xxxx.com"
      },
      {
        "fieldName": "phone",
        "defaultValue": "xxxxxxxxxxxxxxxxx"
      },
      {
        "fieldName": "companyName",
        "defaultValue": "xxxx"
      },
      {
        "fieldName": "companyAddresss",
        "defaultValue": "xxxx xxxx"
      }
    ],
    "securityOptions": {
      "passwordProtection": "NONE",
      "kbaProtection": "NONE",
      "webIdentityProtection": "NONE",
      "protectOpen": false,
      "internalPassword": "",
      "externalPassword": "",
      "openPassword": ""
    }
  },
  "options": {
    "noChrome": false,
    "authoringRequested": false,
    "autoLoginUser": false
  }
}
Mohd Viqar
  • 238
  • 2
  • 5
  • 11
0

You can use POST /agreements API for this purpose. The request body of this API call has an optional paramenter called "formFields", here you can provide form-fields that you want to embeed on your document before sending the agreement for signing, you can also customize those fields by setting different properties to them like location, defaultValue, readOnly and many more.

For you use-case, you can pass this optional parameter while creating the agreement in POST call, specifying the field's default value that you took from user in the previous steep and the exact location where you want that field to be placed on the document, If you don't want the user to change those fields you can even mark them as read only.

To make it more convenient for you PFB the request snippet that you should provide in your POST call -

{ "formFields": [{ "alignment": "LEFT", "borderStyle": "SOLID", "fontColor": "", "fontName": "", "borderColor": "", "displayLabel": "", "radioCheckType": "CIRCLE", "calculatedExpression": "", "backgroundColor": "#0715cd", "formatData": "", "displayFormat": "", "contentType": "DATA", "validated": false, "calculated": false, "maxLength": -1, "locations": { "height": 20, "width": 20, "pageNumber": 1, "left": 100, "top": 100 }, "minLength": -1, "name": "Custom Field 2", "inputType": "TEXT_FIELD", "customDateFormat": "", "specialFormula": "", "required": true, "defaultValue": "", "minNumberValue": 0, "maxNumberValue": 0, "regularExpression": "", "showOrHide": "SHOW", "specialErrMsg": "", "format": "NONE", "fontSize": -1, "masked": false, "anyOrAll": "ANY", "displayFormatType": "DEFAULT", "conditions": { "value": "", "whenFieldLocationIndex": -1, "fieldName": "", "whenFieldName": "", "operator": "" }, "validationRule": "None", "readOnly": false, "borderWidth": -1, "hidden": false, "visibleOptions": [], "hiddenOptions": [], "tooltip": "This is a sample.", "recipientIndex": 1 }] }

Palash Jain
  • 305
  • 1
  • 7