DocuSign API 如何将模板中的标签与 Salesforce 字段同步 [英] DocuSign API how to sync tags in template with Salesforce fields
问题描述
我正在尝试使用 Salesforce 中的 SOAP APi 从模板发送文档.我使用了代码演练
此外,如果您希望该自定义对象说明上的 DocuSign 状态将其映射回来,则可以找到 此处.我认为尽管从 API 发送而不是 DocuSign for Salesforce 管理包,但状态会正确返回.
I'm trying to send a document from a template using SOAP APi in Salesforce. I used the code walkthrough NDA kiosk as an example. I can pre-set the values but the value of the fields isn't written back to Salesforce. When I send the document from DocuSign button the values are synced as expected. // Add data for fields DocuSignAPI.TemplateReferenceFieldDataDataValue fd1 = new DocuSignAPI.TemplateReferenceFieldDataDataValue(); fd1.TabLabel = 'Full Name 1'; fd1.Value = recipient.UserName;
ndaTemplate.FieldData = new DocuSignAPI.TemplateReferenceFieldData();
ndaTemplate.FieldData.DataValues = new DocuSignAPI.ArrayOfTemplateReferenceFieldDataDataValue();
ndaTemplate.FieldData.DataValues.DataValue = new DocuSignAPI.TemplateReferenceFieldDataDataValue[1];
ndaTemplate.FieldData.DataValues.DataValue[0] = fd1;
//LINK THE Object with custom field
DocusignNetApi.CustomField field = new DocusignNetApi.CustomField ();
//field.Name = 'DSFSSourceObjectId';
field.Name = '##SFCustom_Object__c';
field.Value = pCustomObjectId;
field.Show = 'false';
DocusignNetApi.ArrayOfCustomField arrayOfCustomField = new DocusignNetApi.ArrayOfCustomField();
arrayOfCustomField.CustomField = new DocusignNetApi.CustomField[1];
arrayOfCustomField.CustomField[0] = field;
pEnvelopeInformation.CustomFields = arrayOfCustomField;
I do set external object ID in the custom fields and the envelope and recipient status are related to my custom object. I'm not really sure how to achieve what I want. Can someone refer me to a doc?
I do not believe there is actual documentation on the process via the DS API, but you have it correct that you want the objectID to be an envelope custom field. The envelope custom field should be named "##SF{objectID}" so for an Opp it would be ##SFOpportunity.
You'll also need to map back the custom object to the custom field in Connect (via the DS web app), the screenshot is using Quotes, but it should be the same for any custom object.
Also if you want the DocuSign Status on that custom object instructions to map it back can be found here. I think the Status will come back properly despite being sent from the API as opposed to the DocuSign for Salesforce manage package.
这篇关于DocuSign API 如何将模板中的标签与 Salesforce 字段同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!