Follow

Workflow - Creating a CRM Process with an AssureSign Template Map

Last updated 2017-04-27 15:24:29 UTC

Important: This documentation assumes an understanding of CRM workflow processes. Please consult CRM documentation for more general instruction on how processes may be created.

It is possible to automate submissions to the AssureSign service in CRM.

In order to automate submissions, certain pieces of information must be present:

  • the AssureSign instance and credentials must be known
  • the TemplateID of the template to use for the submission must be fixed
  • all Parameters and document properties of the submission must be mapped in advance, since manually entering data is not supported in a workflow

To accomplish this, an AssureSign Template Map must be created that will contain much of this information.

Then, when used in a workflow, an AssureSign Document entity record will be created without having to use the manual form. An AssureSign Document entity record created in a workflow will still be available to be viewed and operated on like a manually created record.

Create an AssureSign Template Map

  • Template Map Identifier - provide a descriptive name for the map (you will need to look up the map later when creating a process workflow)
  • Select an AssureSign Configuration to use for loading the template parameters
    • you can choose to run a workflow configured with this map using another AssureSign Configuration if you would like; for example, you could later select to use the AssureSign Configuration assigned to the user running the workflow
  • Enter the Template ID of the template to be used
    • This is accessible after creating a template by viewing the template in edit mode from the Existing link on the Templates tab. You may also access the Template ID by generating sample XML for an operation on a selected template on the DocumentNOW Integration Help page (click "Help" to be taken to the available links for your account)
    • It is possible to load and edit the parameters for a given template that was created in the sandbox, and then change the AssureSign Configuration and Template ID to match the version of the same template that has been later imported into production

After entering this information, you may then click Reload Parameters from AssureSign. This will query the AssureSign instance using the credentials and environment information in the selected AssureSign Configuration and pull back the template parameters. Each parameter will be shown as follows:

  • the parameter name required to be passed in later operations (this cannot be modified)
  • the Data to Map, which will be preloaded from the Tag on the parameter (see CRM Data Mapping Instructions)
    • While this interface supports adding all the information in this interface, it is probably best to design all the structure into the parameters in the AssureSign system. Re-clicking Reload Parameters from AssureSignwill requery the AssureSign system and overwrite any changes you have made locally. The concept of the AssureSign Template Map exists so that the template's properties do not need to be queried when the workflow runs.
  • default text to enter into the parameter at runtime in case the mapped value is empty

After ensuring that all required parameters have data maps and/or default values, click Preserve Edited Data to preserve the mappings.

Save the record.

Constraints with CRM Data Mapping used in workflows

When you launch a document through the user interface you are allowed to create links to multiple lookup entities. When you create a workflow you must specify a specific type of entity the workflow will be run against. Therefore, all your tag values must be based on the single root entity that the workflow will be run on.

If your workflow is created to run on an account, then a parameter performing this lookup would work:

account.name

But, this would not work:

contact.fullname

Using linked entity tags based on the workflow entity, however, will work:

contact[account.primarycontactid].fullname

Also,

  • The multiline formatter will be ignored
  • The owner shortcut is not supported, as you can get to it other ways anyways, for example, like this:

    systemuser[account.createdby].internalemailaddress

  • The this shortcut is not supported, and makes no sense in a workflow, since we can only perform lookups on the single entity on which we are running

Create a Process

  • You may create a process that will use the AssureSign Template Map through the normal mechanism in the Settings->Processes interface
  • Any normal process step may be added
  • To launch an AssureSign document,

Now, configure the Execute AssureSign Template process. For an entity besides Note:

  • Pick an AssureSign Template Map
  • You may choose to:
    • Load the user's AssureSign Configuration (they must have access to the template with the configuration's template ID)
    • Load a specific AssureSign Configuration
    • Or if neither of those are set, the process will use the AssureSign Configuration specified in the AssureSign Template Map
  • Populate a lookup field on the AssureSign Document:
    • For example, if you are running the workflow on account, and you want the account lookup field to be populated on the AssureSign Document entity record that will be created, you must specify the field name of the lookup record. The account lookup field (along with some others) is built in with the solution, and you would enter asign_accountid here. By default, the entity on which the workflow is running will be assumed to be the entity to be populated in this value
    • It is also possible to populate this lookup field with a related entity field's value that is present on the entity on which the workflow is running. For example, to launch a workflow on account, but attach the AssureSign document to the account's primary contact, set:
      • Populate THIS Lookup on the AssuresignDocument: asign_contactid
      • Get the Lookup from THIS Entity Field: primarycontactid
  • Enter a Document Name: this may include dynamic values set via the form assistant
  • Enter a Completed Document Password if you would like: this may include dynamic values set via the form assistant
  • Enter an Order ID if you would like: this may include dynamic values set via the form assistant
  • Enter the optional SharePoint values (available in our solution version 2.0.0.8+) if you would like. These may be used in SharePoint online instances to saving the signed document in SharePoint:
    • SharePoint Site: if the root URL of your Sharepoint site is passed, an additional parameter named AssureSignCRM:SharepointURL will be submitted to AssureSign with the value.
    • SharePoint Storage Library: if the relative path of a Sharepoint library is passed, an additional parameter named AssureSignCRM:Library will be submitted to AssureSign with the value.
  • Instead of the fixed SharePoint values, you may instead set Detect Workflow Entity SharePoint Storage Location to true (available in our solution version 2.0.0.9+). That will look up the SharePoint Site and Library values for the folder that has been created for the entity on which this process is running. The process will not fail if no SharePoint folder has been created for the entity, however no values will be passed to AssureSign.
  • If in this process you have created an AssureSign Envelope prior to this step, then you may elect to select that entity in the AssureSign Envelope Lookup field. Any process creating an envelope must ultimately also contain a Close Envelope step after documents have been assigned to the envelope.

Follow the normal steps for process activation. When a workflow is run that uses an Execute AssureSign Template step and fails, check the logs for messages that may have been returned from the AssureSign system.

Create a Process that Attaches a Document

It is possible to extract a document that has been attached to a note and use that in the AssureSign submission.

For example, the following scenario could work (this is just one possible scenario that could be created):

  • Build a reporting services automated process in code that attaches report output (which could contain dynamic JotBlocks) as a note on an account
  • Create a workflow that runs on the creation of a Note
  • Test the properties of the note:
    • Test that isdocument is Yes
    • Test that the note is linked to an account
    • When creating the report, do so with a consistent naming pattern, such as sendtoassuresign.contract[XXXXXXX].pdf, and test the document to see that the filename starts with sendtoassuresign
  • Create a step using AssureSign>Execute AssureSign Template
  • Set the Populate THIS Lookup on the AssureSign Document value to asign_accountid
  • Set Get the Lookup from THIS Entity Field to objectid - a note, or annotation under the hood, contains the value of the ID of the entity it is linked to in the objectid field
  • Use the form assistant to get the note itself into Document (from Note attachment) by selecting {Note(Note)}
  • If the document contains dynamic JotBlocks that must be read by the AssureSign system, set Document Attachment Contains Dynamic JotBlocks to True
  • set Delete Note After Submit to Yes (available in our solution version 2.0.0.8+) if you would like the note deleted after the attached document has been submitted to AssureSign.

Your template map parameter tags can access the note's owner account with this structure: account[annotation.objectid].fieldname

For example:

  • the composite address of the account the note is attached to:

    account[annotation.objectid].address1_composite

  • the email address of the primary contact on the account the note is attached to:

    contact[account[annotation.objectid].primarycontactid].emailaddress1

 

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

0 Comments

Article is closed for comments.