Reputation: 23
When creating an envelope using a template, the recipient data is not merging with the role defined in the template despite having the same role name. Instead, the data defined in the request is sent in addition to the default template role. Here is the request being sent:
{
"emailSubject":"Example Email",
"status":"created",
"templateId":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"templateRoles":[
{
"email":"[email protected]",
"name":"John Doe",
"roleName":"role_01"
}
]
}
When I examine the draft saved in the app demo, there are now 2 recipients on the envelope: John Doe and the placeholder in the template. Despite having the same role name, John Doe does not inherit any of the template tabs for 'role_01'.
This request was made using Docusign's PHP SDK.
EDIT:
Here is the request logged in DocuSign:
POST https://demo.docusign.net:7802/restapi/v2/accounts/[omitted]/envelopes
TraceToken: 273fe6c7-ac95-46b5-8c04-27fb91b6b9a4
Timestamp: 2018-04-04T16:43:42.6317470Z
Content-Length: 221
Content-Type: application/json
Accept: application/json
Host: demo.docusign.net
User-Agent: Swagger-Codegen/2.0.1/php
X-DocuSign-Authentication: {"Username":"56eeb1f9-b9ae-40b1-94f7-5fff2ed2a67f","Password":"[omitted]","IntegratorKey":"[omitted]"}
X-DocuSign-SDK: PHP
X-SecurityProtocol-Version: TLSv1.2
X-SecurityProtocol-CipherSuite: ECDHE-RSA-AES256-GCM-SHA384
x-forwarded-for: 70.234.88.244
{"emailSubject":"Please Sign","status":"created","templateId":"a0e38e1b-a8af-4ce9-9398-cc1bb4bbb5d3","templateRoles":[{"email":"[email protected]","name":"John Doe","roleName":"role_01"}]}
201 Created
Content-Type: application/json; charset=utf-8
X-DocuSign-TraceToken: 273fe6c7-ac95-46b5-8c04-27fb91b6b9a4
{
"envelopeId": "e6a04bb7-f73f-4f22-84a5-b3d4e8ce1fea",
"uri": "/envelopes/e6a04bb7-f73f-4f22-84a5-b3d4e8ce1fea",
"statusDateTime": "2018-04-04T16:43:42.2270000Z",
"status": "created"
}
Upvotes: 2
Views: 203
Reputation: 6818
You should not be having Name
and Email
already present in the template. I think you have FirstName LastName
, [email protected]
in the template name, email respectively. Delete
these values in the template, template should only have roleName.
Upvotes: 0