The AsyncSubmitWithFileRetrieval operation is used to launch an instance of a Template asynchronously where timing of the return response is critical, and where a document has been created prior to the submission and is accessible via a URL. Just as in the SubmitWithFileRetrieval operation, any values passed as pre-fill information for the document will be applied and be made visible to any signers of the document. As with SubmitWithFileRetrieval, the workflow and email designs attached to a template will be used, along with any dynamically populated information intended to guide the flow of the document. The AsyncSubmitWithFileRetrieval operation does not return back the document ID and AuthToken, but a temporary SessionID. This SessionID may be used in calls to the LookupSession operation to obtain the document ID and AuthToken (or any error messages) that would have been returned back synchronously in the Submit operation. This allows a developer to create a faster page load experience for their user and do a separate lookup of the document information to pull down the status.
The AsyncSubmitWithFileRetrieval operation may be executed using either the W3C standard Message Transmission Optimization Mechanism (MTOM) protocol or not. Using MTOM is not critical to the structure body of the communication, as opposed to the AsyncSubmitWithFile operation, as no document is passed in the AsyncSubmitWithFileRetrieval operation; however, the MTOM protocol environment is provided as a consistent parallel option to the options available in the AsyncSubmitWithFile method calls.
In general, you will be submitting similar information in an AsyncSubmitWithFileRetrieval operation as in a SubmitWithFileRetrieval operation.
Note: AssureSign is configured to support documents that are a maximum of 2,000 pages in length (documents being parsed for Dynamic JotBlock text tags must be 250 pages in length or less). If an attempt is made to submit a document that exceeds this configured maximum, AssureSign will return an appropriate error message. See Defining JotBlocks Through Embedded Text Tags for information on attributes that may be set to increase the 250 page limit on a given document when only a subset of pages need be parsed for Dynamic JotBlocks.font>
<?xml version="1.0" encoding="utf-8"?> <AsyncSubmitWithFileRetrieval xmlns="https://www.assuresign.net/Services/DocumentNOW/Submit"> <Documents> <FileRetrievalDocument ContextIdentifier="06C4A84A-693C-46CB-8DF2-40A8215AA056"> <Metadata UserName="firstname.lastname@example.org" DocumentName="John Doe Contract 2-15-2007" OrderNumber="7xe-123478" ExpirationDate="2007-04-13" Password="" Culture="en-US" SignatureDeviceSupportEnabled="false" EnvelopeId="EBB73445-AB39-CD1F-8AF5-BC06AB44E93A"> <TermsAndConditions> <AdditionalComplianceStatement> This information will be displayed at the bottom of the page and is being added for a specific jurisdiction by my code. </AdditionalComplianceStatement> <AdditionalAgreementStatement> I acknowledge that all terms and conditions of this sale have been explained to me. </AdditionalAgreementStatement> <AdditionalExtendedDisclosures> Longer extended disclosures are appended to in this section. </AdditionalExtendedDisclosures> </TermsAndConditions> </Metadata> <Template Id="DCB79445-4D39-DD11-8735-00065B8CE99B"> <Parameters> <Parameter Name="Signatory 1 First Name" Value="John" /> <Parameter Name="Signatory 1 Last Name" Value="Doe" /> <Parameter Name="Signatory 1 Email Address" Value="email@example.com" /> <Parameter Name="Signatory 1 Password" Value="jdoe1234" /> </Parameters> </Template> <UnderlyingFileMetadata FileType="PDF" RequiresAuthentication="true" RetrievalMethod="BasicHttp" Url="http://yoursite/pdftest.pdf"> <Credential Username="jdoe" Password="" Domain=""/> </UnderlyingFileMetadata> </FileRetrievalDocument> </Documents> </AsyncSubmitWithFileRetrieval>
The SOAP Action header is
Using the AsyncSubmitWithFileRetrieval requires the including of an UnderlyingFileMetadata element which contains information needed to access the document remotely. Typically, “BasicHttp” will be specified as the retrieval method if the URL is accessed via http, https or ftp. If the file is to be retrieved via sftp, the retrieval method should be “Sftp”. An additional RetrievalMethod customized for Salesforce.com clients may be passed: “SalesforceApi”; please contact your AssureSign account representative for information on the integration possibilities available from within Salesforce.com.
The FileType attribute of the UnderlyingFile element should be one of:
A SessionID will be returned that may be used to pull down the document ID and AuthToken via the LookupSession operation. The SessionID, Document ID and AuthToken returned are in the form of a global unique identifier (GUID). The Document ID and AuthToken will be required to request any further operations on an active document. The SessionID will remain active for a substantial time on the AssureSign site, so it will be possible to a limited degree to query for the asynchronous submit result for some time after the original submission. Sample XML returned by the AsyncSubmitWithFileRetrieval operation is presented here:
<?xml version="1.0" encoding="utf-8"?> <AsyncSubmitWithFileRetrievalResponse xmlns="https://www.assuresign.net/Services/DocumentNOW/Submit"> <AsyncSubmitWithFileRetrievalResult SessionId="96059412-2f90-48d5-ba66-8f798f3cbd8d"/> </AsyncSubmitWithFileRetrievalResponse>
The AsyncSubmitWithFileRetrievalResult should be checked for the presence of an Exceptions element, which may contain multiple DocumentException items.