Skip to main content
Nintex Community Menu Bar

Code Sample in C#

 

The ListTemplates operation makes it possible to provide a menu or list of available templates available for integration to the AssureSign user who is querying. In this way, it will not be necessary to have knowledge of the AssureSign Template ID in order to launch a document submission operation. The ListTemplates operation will return a list of Template IDs (and descriptions) which can be submitted with a ListParameters operation to allow dynamic building of a Submit operation.

It is also possible to enter information into a Tag field when creating templates for integration purposes from within the AssureSign administrative application; the value of the Tag on a particular template will be returned and could possibly be used to help create a mapping or filtering mechanism in a CRM or custom client application.

The ListTemplates operation requires knowledge of the following:

  • the AssureSign account ContextIdentifier (this is exposed in the AssureSign administrative application account settings and serves to provide some security to the transaction)
  • the UserName of the AssureSign user that will be the owner of the document within AssureSign

 

Sample XML

<?xml version="1.0" encoding="utf-8"?> 
<ListTemplates xmlns="https://www.assuresign.net/Services/DocumentNOW/ListTemplates">
<TemplateListQuery ContextIdentifier="06C4A84A-693C-46CB-8DF2-40A8215AA056" UserName="georgeuser@company.com" />
</ListTemplates>

The SOAP Action header is

https://www.assuresign.net/Services/DocumentNOW/ListTemplates/IListTemplatesService/ListTemplates

The result returned will contain information required to allow a query of the parameters via the ListParameters operation:

<?xml version="1.0" encoding="utf-8"?> 
<ListTemplatesResponse xmlns="https://www.assuresign.net/Services/DocumentNOW/ListTemplates">
<TemplateListQueryResult>
<Templates>
<TemplateItem Id="7727CE6C-6A39-DD11-8735-00065B8CE99B" Name="Contract Type 1" Description="Description for Template 1" CreationDate="2008-03-19T11:24:09.0857026-04:00" Accessibility="Account" Owner="Account" ImmediatePresentment="true" PasswordRequired="false" Tag="MyTag1" DocumentTemplateType="Standard" Culture="en-US" SignatureDeviceSupportEnabled="false">
<TermsAndConditions>
<AdditionalComplianceStatement>
Terms Sample Text
</AdditionalComplianceStatement>
<AdditionalAgreementStatement>
Agreement Sample Text
</AdditionalAgreementStatement>
<AdditionalExtendedDisclosures>
Disclosure Sample Text
</AdditionalExtendedDisclosures>
</TermsAndConditions>
</TemplateItem>
<TemplateItem Id="2C01A518-B443-DD11-8735-00065B8CE99B" Name="Form Type 2" Description="Description for Template 2" CreationDate="2008-03-19T11:24:09.0857026-04:00" Accessibility="User" Owner="georgeuser@company.com" ImmediatePresentment="true" PasswordRequired="true" Tag="MyTag2" DocumentTemplateType="Standard" Culture="en-US" SignatureDeviceSupportEnabled="false" ModifiedDate="2008-03-15T08:43:11.0124923-04:00" PageCount="0">
<TermsAndConditions>
<AdditionalComplianceStatement>
Terms Sample Text
</AdditionalComplianceStatement>
<AdditionalAgreementStatement>
Agreement Sample Text
</AdditionalAgreementStatement>
<AdditionalExtendedDisclosures>
Disclosure Sample Text
</AdditionalExtendedDisclosures>
</TermsAndConditions>
</TemplateItem>
</Templates>
</TemplateListQueryResult>
</ListTemplatesResponse>

The TemplateListQueryResult should be checked for the presence of an Exceptions element, which may contain multiple TemplateListException items.

Certain TemplateItem attributes returned by the ListTemplates operation require some explanation:

  • Although the returned list will only include templates that the passed-in user account may access, the Accessibility and Owner attributes will indicate whether the template is assigned to the user specifically or is available across the account to which the user is assigned.
  • The ImmediatePresentment flag indicates whether a document may be presented for signing immediately online; the ListSignatories operation will not be able to be called if you have configured a template to block immediate presentment.
  • If PasswordRequired is returned as True, then you will need to populate the Password attribute in the MetaData section of any document submission operation.
  • If DocumentTemplateType is “WorkflowOnly” rather than “Standard” then the template does not contain any pre-defined JotBlocks; this type of template requires passing in dynamic JotBlocks on any document submission operation.
Be the first to reply!

Reply