Xml 如何使用模板处理自定义字段
我一直在使用API,当我试图使用自定义字段将信息传递到信封时,有一个问题具体化了,可以帮助我跟踪它。 据我所知,它们是某种元数据,无论是否可见,在创建时都与我们创建和存储的每个模板(serverTemplates)相关联。 我已经能够使用两个不同的文档创建模板,并且在发送信封时使用API添加了自定义选项卡。 不幸的是,我无法得到的是自定义字段。 我按照以下方式创建了它们: 但我无法覆盖API中的值。 下面是我使用的XML调用的一部分:Xml 如何使用模板处理自定义字段,xml,rest,templates,docusignapi,custom-fields,Xml,Rest,Templates,Docusignapi,Custom Fields,我一直在使用API,当我试图使用自定义字段将信息传递到信封时,有一个问题具体化了,可以帮助我跟踪它。 据我所知,它们是某种元数据,无论是否可见,在创建时都与我们创建和存储的每个模板(serverTemplates)相关联。 我已经能够使用两个不同的文档创建模板,并且在发送信封时使用API添加了自定义选项卡。 不幸的是,我无法得到的是自定义字段。 我按照以下方式创建了它们: 但我无法覆盖API中的值。 下面是我使用的XML调用的一部分: body = "<envelopeDefinition
body = "<envelopeDefinition xmlns=\"http://www.docusign.com/restapi\">" +
"<accountId>" + accountId + "</accountId>" +
"<status>sent</status>" +
"<emailSubject>DocuSign API Call - Signature request from template</emailSubject>" +
"<customFields>" +
"<textCustomFields>" +
"<textCustomField>" +
"<fieldId>1</fieldId>" +
"<name>agreement_id</name>" +
"<required>true</required>" +
"<show>true</show>" +
"<value>" + agreementId + "</value>" +
"</textCustomField>" +
"<textCustomField>" +
"<fieldId>2</fieldId>" +
"<name>party_name</name>" +
"<required>true</required>" +
"<show>true</show>" +
"<value>" + partyName + "</value>" +
"</textCustomField>" +
"</textCustomFields>" +
"</customFields>" +
"<compositeTemplates>" +
"<compositeTemplate>" +
"<serverTemplates>" +
"<serverTemplate>" +
"<sequence>1</sequence>" +
"<templateId>" + templateId + "</templateId>" +
"</serverTemplate>" +
"</serverTemplates>" +
"<inlineTemplates>" +
"<inlineTemplate>" +
"<sequence>2</sequence>" +
"<recipients>" +
"<signers>" +
"<signer>" +
"<email>" + email + "</email>" +
"<name>" + recipientName + "</name>" +
"<recipientId>1</recipientId>" +
"<roleName>" + roleName + "</roleName>" +
"<tabs>" +
"<textTabs>" +
"<text>" +
"<tabLabel>agreement_id</tabLabel>" +
"<value>" + agreementId + "</value>" +
"<xPosition>220</xPosition>" +
"<yPosition>348</yPosition>" +
"<documentId>2</documentId>" +
"<pageNumber>1</pageNumber>" +
"</text> " +
"<text>" +
"<tabLabel>party_name</tabLabel>" +
"<value>" + partyName + "</value>" +
"<xPosition>130</xPosition>" +
"<yPosition>142</yPosition>" +
"<documentId>2</documentId>" +
"<pageNumber>1</pageNumber>" +
"</text> " +
"</textTabs> " +
"</tabs>" +
"</signer>" +
"</signers>" +
"</recipients>" +
"</inlineTemplate>" +
"</inlineTemplates>" +
"</compositeTemplate>" +
"</compositeTemplates>" +
"</envelopeDefinition>";
body=“”+
“”+accountId+“”+
“已发送”+
“DocuSign API调用-来自模板的签名请求”+
"" +
"" +
"" +
"1" +
“协议编号”+
“对”+
“对”+
“”+协议ID+“”+
"" +
"" +
"2" +
“当事人姓名”+
“对”+
“对”+
“”+partyName+“”+
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"1" +
“”+模板ID+“”+
"" +
"" +
"" +
"" +
"2" +
"" +
"" +
"" +
“”+电子邮件+“”+
“”+recipientName+“”+
"1" +
“+roleName+”+
"" +
"" +
"" +
“协议编号”+
“”+协议ID+“”+
"220" +
"348" +
"2" +
"1" +
" " +
"" +
“当事人姓名”+
“”+partyName+“”+
"130" +
"142" +
"2" +
"1" +
" " +
" " +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"";
有人能给我建议吗
谢谢在复合模板表单中,似乎必须在内联模板中定义自定义字段。使用下面的请求,我定义了三个字段。一个是信封信息级别,未反映在文档签名系统中。我在inlineTemplate中定义了另外两个。一个是在帐户级别配置的(在我的首选项中),另一个不是。创建信封后,两者都会显示在UI中(UI正确地接受新创建字段上的“显示”标志)
DocuSign API-文档签名请求
发送
1.
疯狂酷自定义字段3
真的
真的
67890
1.
A32AA85C-EE69-4ABB-BE67-3B98A9FDC901
1.
协议号
真的
真的
12345
1.
疯狂自定义内联字段
真的
真的
54321
2.
1.
me@u.them
鲍勃·琼斯
签字人1
恩达公司
12345
100
100
1.
1.
你能澄清这个问题吗?您是否试图使用API访问信封自定义字段(ECF)?我确实知道,如果您有一个定义了ECF的模板,甚至在帐户级别,如果您在该信封的API调用中指定了任何ECF,那么只有API中指定的ECF才会生效。就好像ECF在模板/帐户级别上从未存在过,所以API在这种情况下胜过一切。嗨,路易斯,你明白了。我正在尝试使用API访问ECFs。我已经使用“协议id”和“协议方名称”作为名称定义了它们,“必需”勾选和“文本”类型。在我上面提供的代码中,我试图访问它们并插入一个自定义值,我将使用该值来跟踪这个信封。如果仍然不清楚,请告诉我,并感谢您的帮助。此外,我应该指出,ECF是由模板正确创建和使用的,因为如果我使用DocuSign UI创建和发送信封,我得到的所有信息都是正确的。谢谢Jeff,它现在可以工作了!对于那些ECF,我肯定使用了错误的级别定义。
<envelopeDefinition xmlns="http://www.docusign.com/restapi">
<emailSubject>DocuSign API - Signature Request on Document</emailSubject>
<status>sent</status>
<customFields>
<textCustomFields>
<textCustomField>
<fieldId>1</fieldId>
<name>Crazy Cool Custom Field Number 3</name>
<required>true</required>
<show>true</show>
<value>67890</value>
</textCustomField>
</textCustomFields>
</customFields>
<compositeTemplates>
<compositeTemplate>
<serverTemplates>
<serverTemplate>
<sequence>1</sequence>
<templateId>A32AA85C-EE69-4ABB-BE67-3B98A9FDC901</templateId>
</serverTemplate>
</serverTemplates>
<inlineTemplates>
<inlineTemplate>
<customFields>
<textCustomFields>
<textCustomField>
<fieldId>1</fieldId>
<name>agreement_id</name>
<required>true</required>
<show>true</show>
<value>12345</value>
</textCustomField>
<textCustomField>
<fieldId>1</fieldId>
<name>Crazy Custom Inline Field</name>
<required>true</required>
<show>true</show>
<value>54321</value>
</textCustomField>
</textCustomFields>
</customFields>
<sequence>2</sequence>
<recipients>
<signers>
<signer>
<recipientId>1</recipientId>
<email>me@u.them</email>
<name>Bob Jones</name>
<roleName>Signer1</roleName>
<tabs>
<textTabs>
<text>
<tabLabel>NDACompany</tabLabel>
<value>12345</value>
<xPosition>100</xPosition>
<yPosition>100</yPosition>
<documentId>1</documentId>
<pageNumber>1</pageNumber>
</text>
</textTabs>
</tabs>
</signer>
</signers>
</recipients>
</inlineTemplate>
</inlineTemplates>
</compositeTemplate>
</compositeTemplates>
</envelopeDefinition>