Pre-requisites: Created a workflow
Workflows allow you to set up automations that can run 24/7. We encourage you to regularly monitor your workflows to make sure everything still works as expected.
Primer provides you with a set of monitoring tools and statistics that will support you while troubleshooting your workflows. These tools bring visibility to the execution of your workflows and enable you to detect any problems with ease.
A published workflow will be started automatically every time an App emits an event matching that Trigger.
Each Workflow Run is unique and will have a dedicated timeline. The timeline of that run can be found in the Primer dashboard, alongside an overview of the workflow route that was taken. This can be used for validating that the workflow was set up correctly.
Workflow Run status
A Workflow Run can have one of the following four statuses:
The workflow has started and is still running
The Workflow Run is waiting for an external event in order to be continued (e.g. shopper needs to complete authentication for 3DS)
The run has reached the end of the configured workflow
Something went wrong during the execution of the workflow or one of its actions
Workflow Run status vs payment status
When using Workflows to process payments, be aware that the payment status is completely decoupled from its run status.
A workflow run marked as does not necessarily mean that the payment has been successfully authorized.
Let’s look at a workflow to authorize a payment as an example. If the processor declines the payment the payment status will be set to , and the workflow execution will continue and could end with a workflow run status of .
Similarly: a Workflow Run marked as does not mean that the payment has failed. For this example, assume a workflow authorizing a payment and then sending a message to Slack. If the processor successfully authorizes the payment, the payment status will be and the workflow run will continue. However, if Slack is down and the message was not sent, then the workflow will be marked as because it did not get to execute all expected steps.
Workflow Run details
Each Workflow Run comes with a detailed timeline. This timeline shows events that happened during the execution in chronological order. You can choose to reverse the order in which the timeline is displayed so that the most recent blocks are presented first.
You can access the runs for each workflow within the Dashboard. Then you can select a Workflow Run to learn more about the route that was taken, the Actions that were executed, and the Utilities that were used.
Click on one of the blocks of the Workflow Run to retrieve additional details, such as:
- the set of Inputs and Outputs used by the Trigger or Action
- the API calls made by the Trigger or Action
- the Conditions met by the Conditions Utility (the ‘all other conditions’ block will show when none of the conditions were applicable)
For additional details on the Payments App, visit the Payments section of the dashboard. The Payments timeline will give you additional insights on the steps a payment went through.
The duration for each workflow run - and even for each individual block - is displayed on the Workflow Runs list, the timeline, and each block and it's drawer. This way you know exactly how long any given step took. This is based on the time it took from the run start to when it finished and is not displayed for runs that are ongoing or in a waiting state.
The displayed duration also includes any time that the workflow might have been put into a "waiting" state, for example by waiting for the user to complete an action like performing a 3D Secure authentication.
Now that you know how to troubleshoot and debug your workflow, check our best practices guide to learn how to create powerful and resilient workflows!