Flow Automation: Triggering Workflows When an Order’s Risk Level Is Added or Updated
You can use the Order risk updated trigger in Flow Automation to start a workflow whenever an order’s risk level is added or updated. For example, when an order is assessed as high risk, you can automatically add a tag to the order and alert your staff to hold the shipment. The risk level may come from SHOPLINE's fraud analysis of online-paid orders, from an installed app, or from the Create order risk assessment action in another workflow.
This guide explains when the trigger runs, the supported actions, how to test the workflow, and how to use it in a real-world scenario to stop high-risk orders early and reduce losses from fraudulent orders.
When the Trigger Runs
The Order risk updated trigger starts a workflow whenever a risk level is added to or updated on an order, regardless of where the risk level comes from. This includes when:
- SHOPLINE's fraud analysis is completed and a risk level (high, medium, or low) is generated for the order.
- An installed app adds or updates the order’s risk level.
- Another Flow Automation workflow identifies the order’s risk level through the Order risk level created action.
| Note: SHOPLINE’s fraud analysis usually takes 1–2 hours to complete, so the workflow may start some time after the order is created. For details on fraud analysis, please refer to "Assessing Order Risk with Fraud Analysis." |
Supported Actions
The following actions are primarily used in workflows initiated by the Order risk updated trigger:
- [General] Send email
- [General] Update counter
- [General] Delay
- [Order] Add order tags
- [Order] Update order tags
- [Order] Cancel order
| Note: We do not recommend using the Order risk level created action in workflows started by this trigger. Adding a risk level to the order fires the trigger again, which may cause the workflow to run repeatedly. |
Testing the Workflow
To test whether the workflow is successfully triggered when an order’s risk level is added or updated, follow these steps:
- In Flow Automation, set up a workflow using the Order risk updated trigger, then click Publish to activate it.
- Set up a separate test workflow using the Order creation trigger, add the Order risk level created action, set the risk level to High, and publish the workflow.
-
From your SHOPLINE Admin, go to Orders > Create Order and create a test order.
- The workflow from step 2 adds a risk level to the test order, which starts the workflow from step 1. Go to Flow Automation to check the execution results.
| Note: For more information on how to monitor the execution of your workflows, please refer to the "How to View the Running of a Flow" section in the "Introduction to Flow Automation" guide. |
- After testing, turn off the test workflow from step 2 so it doesn’t affect future orders.
Example Use Case
Here is a practical example of using the Order risk updated trigger to stop high-risk orders.
Scenario: When an order is assessed as high risk, automatically tag the order and notify the risk control team to verify it before shipping.
- Trigger: Order risk updated
- Condition: Fraud risk rating is equal to any of High
-
Action 1: Update order tags
- Order number: [order id]
- Tags: High-Risk-Hold-Shipment
-
Action 2: Send email
- Subject: High-risk order alert: [Order Number]
- Content: Order [Order Number] has been assessed as high risk. Please hold the shipment and contact the customer to verify their identity.
- Recipient: Manually enter your risk control team’s email address
- Outcome: High-risk orders are tagged automatically, so your warehouse can use the tag to set these orders aside, and your risk control team can verify them before shipping, which reduces losses from fraudulent chargebacks.
| Notes: To insert the information shown in square brackets (such as the Order number), click + Add variables and select the corresponding parameter. |