Follow

Pushing Data to CRM

Last updated 2016-11-14 21:38:47 UTC

Overview

We have implemented a proxy service that simplifies communications to Dynamics CRM instances in order to update the status of AssureSign Document OR AssureSign Envelope entity records. This service can be invoked via a DocumentTRAK notification.

Once the DocumentTRAK communication is invoked, the service authenticates with the remote CRM instance and tells the entity to refresh itself. CRM then triggers a web communication to the AssureSign server to pull down the record's current status, the signing history, and the completed document.

If called on an AssureSign Envelope, all documents that are part of the AssureSign Envelope in CRM will be refreshed by just performing a single DocumentTRAK communication on the Envelope.

Your CRM instance must be an Internet Facing Deployment (IFD) in order to use this process.

Creating the Notification

While logged into your AssureSign account, go to the Notifications\DocumentTRAK editor on the Administration tab. Create a new Web Notification.

Give your notification a unique Design Name, and set the "Service Endpoint (URL)" to:

[the assuresign root URL]/Custom/CRMDocumentTrakProxy/CRMDataFileHandler.ashx

Modify the bracketed section of the address to be the root URL of the AssureSign instance you log into. For a sandbox account, the complete service address will be:

https://sb.assuresign.net/Custom/CRMDocumentTrakProxy/CRMDataFileHandler.ashx

The other settings should be configured as follows:

  • Enable Basic HTTP Authentication? Yes
  • Design Used for Authentication? None
  • Is this a SOAP-based service? No
  • SOAP Action: leave empty

Then click Next ...

For Authentication Credentials, enter the Username and Password for a user in your CRM system that has rights to update AssureSign Document entity records. For example, for an Office365 CRM instance, enter the user email address used for login in the Username, along with the password. For communicating to a private IFD CRM instance using Active Directory for authentication, enter the login in the form [domain][username] completely in the Username field. Do not use the Domain field.

Since this communication is merely a proxy service, it is not really using basic HTTP authentication. These encrypted credentials will merely be passed along to the proxy service which will determine the type of login required by your CRM instance.

Click Next to continue ...

In Request Message XML, select "Paste Raw XML".

Click Next to continue ...

DocumentTRAK may be used to update either an AssureSign Document or an AssureSign Envelope in CRM. The XML will vary based on which object you want to update.

For an AssureSign Document, Configure the XML ...

Use the following XML as a template to perform an update of an AssureSign Document record in CRM, and replace {your CRM root URL} with the real address of your CRM instance:

<CRMDocumentTRAKRequest Username="[Authentication - Username]" Password="[Authentication - Password]" DocumentId="[Document ID]" URL="https://{your CRM root URL}/XRMServices/2011/Organization.svc"></CRMDocumentTRAKRequest>

For example, if the external address of your CRM instance is https://corporatecrm.mycompany.com, then the XML should be:

<CRMDocumentTRAKRequest Username="[Authentication - Username]" Password="[Authentication - Password]" DocumentId="[Document ID]" URL="https://corporatecrm.mycompany.com/XRMServices/2011/Organization.svc"></CRMDocumentTRAKRequest>

The other bracketed strings still present in the XML are merge fields.

For an AssureSign Envelope, Configure the XML ...

Use the following XML as a template to perform an update of an AssureSign Envelope record in CRM, and replace {your CRM root URL} with the real address of your CRM instance:

<CRMDocumentTRAKRequest Username="[Authentication - Username]" Password="[Authentication - Password]" EnvelopeId="[Envelope ID]" UseEnvelope="true" URL="https://{your CRM root URL}/XRMServices/2011/Organization.svc"></CRMDocumentTRAKRequest>

For example, if the external address of your CRM instance is https://corporatecrm.mycompany.com, then the XML should be:

<CRMDocumentTRAKRequest Username="[Authentication - Username]" Password="[Authentication - Password]" EnvelopeId="[Envelope ID]" UseEnvelope="true" URL="https://corporatecrm.mycompany.com/XRMServices/2011/Organization.svc"></CRMDocumentTRAKRequest>

The other bracketed strings still present in the XML are merge fields.

If this is called on an AssureSign Envelope, all documents that are part of the AssureSign Envelope in CRM will be refreshed by just performing a single DocumentTRAK communication on the Envelope.

Click Next to continue ...

In Response Validation Method, select "Compare response to expected XML string", click Next, select "Paste Raw XML" and click Next again.
Enter the string

OK

Click Next, and then Finish to save

Add the Notification to Document Templates

For AssureSign Document Templates that will be used through the CRM solution that are not part of an AssureSign Envelope, modify the templates as follows to use your DocumentTRAK document notification:

For existing document templates, select Edit on the Existing template to be modified. Then, Select Edit Workflow.
On "Web Notifications", select "Click here to create a new notification."

You will want to add this notification to lifecycle events that should trigger a communication to CRM. To start, you may want to add this notification to:

  • Step 1: select timing "Before Step", and choose your new design
  • Document Completed
  • Document Expired
  • Document Cancelled
  • Document Declined
  • Feedback Submitted

Save any steps in the Web Notifications section that you have added.

Add the Notification to Envelope Templates

For AssureSign Envelope Templates that will be used through the CRM solution, modify the templates as follows to use your DocumentTRAK document notification:

For existing envelope templates, select Edit on the envelope template to be modified. Then, Select Edit Notifications.
To start, you may want to add this notification to:

  • Envelope Started
  • Envelope Completed
  • Envelope Expired
  • Envelope Cancelled
  • Envelope Declined

Save any steps in the Web Notifications section that you have added.

Using Templates Outside CRM

It is important to note that any time your templates are used the AssureSign system will attempt to perform these DocumentTRAK notifications. If you intend to use these templates to launch documents from other tools, such as through the AssureSign web UI or a desktop application, you will not want to apply these web notifications since CRM will receive a communication for every document created from these templates.

Configure you Account Notification Preferences

You will want to configure the DocumentTRAK Retry Policy and the Account Technical Contacts, which are set globally on your account.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.