If you want to trigger workflows from an external application into Magentrix, you can leverage Zapier supported applications to set up “Zaps” between Magentrix and external applications. In many situations, a Zap can take upwards of 15 minutes to trigger which can add an increased overhead to the overall application flow.
In situations where a workflow needs to be triggered instantaneously, Zapier webhooks can be leveraged where an external application calls Zapier’s webhook endpoint, in which a follow-up action is triggered immediately. In the example below, Zapier webhooks are used to progress a user’s onboarding in Magentrix when a document is signed in DocuSign. This is achieved by triggering the webhook from DocuSign to update the Magentrix user entity record associated with the user who signed the document.
What you need in Zapier to achieve this:
Zapier requires a premium account in order to leverage its Webhook capabilities. For more information, refer to Zapier’s plans.
Ensure that the external application you are integrating with has the ability to call webhooks via HTTP POST:
In the case of DocuSign, you need a valid DocuSign account with admin access to DocuSign Connect.
Instructions:
- Start by creating your “Zap” in Zapier with the first step “When this happens...” selected as “Webhooks by Zapier”.
- There are three options for the “Trigger Event” when a Webhook is used.
- In the case of DocuSign, we want DocuSign to call Zapier when a document is signed. So in essence, “Catch Hook” is the option we want to go with. Do not use “Catch Raw Hook” as the request body is not parsed and will be difficult to use when extracting information for Magentrix.
- Next, Zapier will provide a “Custom Webhook URL” that you can use in DocuSign to trigger your workflow. Copy this URL can navigate to DocuSign. Leave the rest of the settings as default.
- Log in to your DocuSign account as an administrator and navigate to the “Admin” dashboard at the top of your home page.
- Scroll down and click on “Connect” on the left-hand side of the admin dashboard menu items.
- Here, you will set up the real-time push service that will call your Zapier Webhook.
- Click on “ADD CONFIGURATION” -> “Custom” to create a custom push service.
- Configure the service by referencing the URL from “Step 2”. Name your service and ensure that the following settings are checked.
- Enable Log (For later troubleshooting and maintenance).
- Require Acknowledgement (Your Webhook will send a success/failure message back to be logged).
- Ensure that the response includes: Sender Account as Customer Field & Document Fields (Optional if the client wants to use that in Magentrix).
- Associated Users set to “All users (Includes new users).
- Envelope Events: Envelope Signed/Completed (Unless the client wants the webhook triggered at a different stage).
- Next, navigate back to Zapier to finish your Webhook configuration.
- The next step involves validating your Webhook request. In the “Find Data” step, you will need to trigger the push service from “Step 5”.
- Create a DocuSign envelope and sign it. Once you have successfully signed the envelope, navigate back to Zapier and click on “Test Trigger” to find data.
- You will see that your Webhook has received a data dump from DocuSign indicating that the webhook was successfully executed via a POST request from your push service.
- In the subsequent steps, you can define your criteria for Zapier to determine what happens after the webhook is triggered. In this case, if a DocuSign envelope is signed, we want Magentrix to update a user entity record and set the “Partnership Signed” custom checkbox field to checked.
- We first need to select the Magentrix app and choose “Find Entity Record” action event.
- Next, connect Zapier to your Magentrix instance.
- We now need to map the DocuSign’s incoming data from “Step 7” to the Magentrix user entity. In this case, we will use the DocuSign recipient (signer) email address to map it to a user in Magentrix in our search.
- In Step 7, we can see that one of the incoming webhook caught data keys is called “DocuSignEnvelopeInformation__EnvelopeStatus__RecipientStatuses__RecipientStatus__Email” which matches the end user’s email address who signs the document. We will map the User entity’s email field.
- Test to ensure that Magentrix can locate a user in your instance with the Webhook’s response key-value pair.
- Click the + sign to create a new step to update the entity record after it has been found in the previous step.
- We first need to select the Magentrix app and choose “Update Entity Record” action event.
- Next, connect Zapier to your Magentrix instance.
- We now need to map the resulting record ID from the search in the previous step to the record ID of the user entity in this step and make any necessary changes to the record’s data. In this case, we are setting the “Partnership Signed” custom checkbox to checked (true).
- Test your zap and you are done!
Troubleshooting:
Consult your third-party application troubleshooting guide for any additional troubleshooting resources. Zapier task history allows you to see all activities related to your Zaps and any related issues to them.
DocuSign connect has activity logs and failure logs to help further troubleshoot the flow on the DocuSign aspect.