Launch an Ironclad Workflow Directly from Dynamics

Launch an Ironclad Workflow Directly from Dynamics

In the complex landscape of enterprise sales, initiating an Ironclad workflow for a Master Service Agreement (MSA) from Dynamics 365 can be critical for maintaining efficient contract management processes. These scenarios often arise when specific customer interactions, sales milestones, or opportunity stages necessitate immediate contract generation and routing.

Example Use Cases

Example use cases for triggering an MSA workflow in Ironclad from Dynamics 365 include:

  • When an enterprise customer reaches a specific sales opportunity stage
  • When a sales representative receives a verbal commitment from a key decision maker and want to submit an order form
  • When a qualified lead transitions from pipeline to committed opportunity status
  • After a technical evaluation or proof of concept (POC) has been successfully completed with a potential customer

How to Implement

The architecture diagram provides a visual framework for understanding the interaction for how an order form that is created in Dynamics 365 can trigger the launch of a workflow in Ironclad that uses the metadata from the order form agreement to populate the launchform in Ironclad.

Integration Architecture

Having established your Order Form workflow configuration in Ironclad and configured the Agreement table structure in Dynamics 365, we can now proceed with implementing the integration flow in Power Automate to connect these systems seamlessly. The Power Automate implementation consists of two key functional components that work together to create a comprehensive contract management automation.

Implementation Steps Overview

StepConnectorActionDescription
1Dataverse/DynamicsWhen a row is added, modified, or deletedFirst, we'll configure the agreement creation trigger in Dynamics 365, which listens for a new row being added in the table, which represents a new order form being created.
2IroncladCreate a Workflow AsynchronouslySecond, we'll implement the workflow launch function that takes the agreement details from Dynamics 365 and programmatically initiates the corresponding MSA workflow in Ironclad, ensuring all relevant data is mapped correctly to launch the workflow in Ironclad.

Detailed Power Automate Steps

When a row is added, modified or deleted (Dataverse/Dynamics Connector)

Create a Flow for the Dynamics 365 Trigger: Start by creating a new automated Flow and selecting a trigger. In this example, we are building an automated cloud flow and selecting a Dataverse connector 'When a row is added, modified or deleted.' We are using the Dataverse trigger and not a Dynamics 365 trigger, as Dataverse is the underlying infrastructure that supports your Dynamics 365 data and apps.

Configure the Dynamics Trigger: After selecting the trigger action, the fields in the corresponding window should be filled as follows:

  • Change Type: Select 'Added' which will trigger after a new agreement record has been saved.
  • Table Name: The agreements are stored in the 'Agreements' table.
  • Scope: The Scope is 'Organization' in the example.

Trigger Configuration Settings

Change Type: Added
Table Name: Agreements
Scope: Organization
Select Columns: [optional - comma-separated list of column unique names]
Filter Rows: [optional - OData expression to limit rows that can trigger the flow]

Create a Workflow Asynchronously (Ironclad Connector)

Launch Ironclad Workflow: Click on + Add an action and search for the Ironclad Connector. Once the connector has been selected a list of actions will be displayed and you will select the 'Create a Workflow Asynchronously' action, the fields in the corresponding window should be filled as follows:

Ironclad Workflow Configuration

  • Form: The default selection, Launch Form, will be the only non-custom value displayed.
  • Creator Attribute: You have the option to choose if you would like the Creator Attribute to be User Email or User ID. In this example we will use User Email.
  • Template: The Template you want to use is 'Dynamics MSA'.
  • Creator Information (select one):
    • Creator Email: In the dropdown, your options for Creator Emails that were configured in the workflow will be presented.
    • Creator ID: In the dropdown mention, your options for Creator ID that were configured in the workflow will be presented.
  • Counterparty Name: Mapped to the dynamic field in your Dynamics 365 environment 'Name'.
  • Counterparty Signer Name: Mapped to the dynamic field in your Dynamics 365 environment 'Counterparty Signer Name'.
  • Counterparty Signer Email: Mapped to the dynamic field in your Dynamics 365 environment 'Counterparty Signer Email'.
  • Dynamics MSA ID: Mapped to the dynamic field in your Dynamics 365 environment 'Agreement'.
  • Dynamics MSA Number: Mapped to the dynamic field in your Dynamics 365 environment 'Agreement Number'.
  • Total Contract Value Amount: Mapped to the dynamic field in your Dynamics 365 environment 'Agreement Value.'
  • Total Contract Value Currency: USD or whatever currency is applicable for your contract. You can also map the currency so that it matches with that of your record.
  • Agreement Date: Mapped to the dynamic field in your Dynamics 365 environment 'Agreement Start Date.'

Handling Asynchronous Processing

The standard Power Automate workflow execution has a critical time constraint: a 5-second response window in the user interface. For complex workflow initiations, particularly those involving external systems like Ironclad, processing can exceed this narrow timeframe. By implementing a 10-second delay and using the "Launch Workflow Asynchronously" endpoint, we proactively prevent a potential failure mode where the workflow successfully launches in Ironclad, but no confirmation is registered in the Power Platform interface.

Adding a Delay Step

Action: Delay
Count: 10
Unit: Second

Following this short pause, a "Retrieve the Status of an Async Workflow Create Job" endpoint step can be added, submitting the Async Job ID that was originally returned from the "Create a Workflow Asynchronously" endpoint. This approach allows for a quick verification of the workflow's status, ensuring that the job has been properly launched and providing immediate feedback about its initial state.

Complete Flow Structure

The flow should now be saved and tested. The completed flow should look as follows:

  1. Trigger: When a row is added, modified or deleted
  2. Action: Create a Workflow Asynchronously
  3. Action: Delay (10 seconds)
  4. Action: Retrieve the Status of an Async Workflow Create Job

Testing the Integration

When running the test, the Power Automate Flow will stand-by for the 'When a row is added, modified or deleted' trigger to fire. In Dynamics 365, create a new agreement, and complete the following fields in the Order Form:

  • Name: Dynamics Guide
  • Agreement Value: $100,000
  • Agreement Start Date: 12/18/2024
  • Counterparty Signer Name: Use the counterparty's signer name
  • Counterparty Signer Email: Use the counterparty's email address

All other fields should be blank.

Once the Order Form has been Saved the Power Automate flow will be initiated. The executed flow in Ironclad will now have all of the metadata properties that were in the order form in Dynamics.

Results

After successful execution:

Dynamics 365 Order Form

  • New Agreement record created with all required fields populated
  • Agreement Number automatically generated
  • Status tracking enabled

Ironclad MSA Workflow Launched

  • Workflow initiated with all metadata from Dynamics
  • Launch form pre-populated with agreement details
  • Properties correctly mapped from the order form
  • Workflow ready for approval routing

Best Practices

  1. Error Handling: Implement proper error handling for failed workflow launches
  2. Logging: Add logging steps to track successful and failed integrations
  3. Field Validation: Ensure required fields are validated before workflow launch
  4. Testing: Thoroughly test in non-production environment first
  5. Documentation: Document any custom field mappings for future reference

Troubleshooting

If the workflow doesn't launch:

  • Verify all required fields are mapped correctly
  • Check that the Ironclad connection is authenticated
  • Ensure the workflow template name matches exactly
  • Review Power Automate run history for error details
  • Confirm the delay is sufficient for async processing