Flow Automation: Triggering Workflows When a Return Is Created
You can use the Return created trigger in Flow Automation to start a workflow when a customer submits a return request from your online store, or when you create a return for an order in your SHOPLINE Admin. With this trigger, you can automatically tag return orders and look up the customer’s order history, so your customer service or risk team can quickly assess return risk and follow up.
This guide explains the supported actions for this trigger, how to test the workflow, and how to use it in a real-world scenario to tag return orders automatically and assess return risk more efficiently.
Supported Actions
The following actions are primarily used in workflows initiated by the Return created trigger:
- [Order] Batch query orders
- [Order] Batch query abandoned orders
- [Order] Add order tags
- [Customer] Batch query customers
Testing the Workflow
To test whether the workflow is successfully triggered when a return is created, follow these steps:
- In Flow Automation, set up a workflow using the Return created trigger, then click Publish to activate it.
-
From your SHOPLINE Admin > Orders, open a paid test order, and create a return for it.
Note: For detailed steps on creating a return, please refer to "Creating Returns and Refund Requests for Orders." -
After saving the return, 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.
Example Use Case
Here is a practical example of using the Return created trigger to tag return orders automatically and look up the customer’s order history.
Scenario: When a customer submits a return request, automatically retrieve the customer’s past orders (up to 100) and tag the return order "Return requested," so your customer service team can quickly assess the customer’s return frequency and purchase value.
- Trigger: Return created
-
Action 1: Batch query orders (1)
- Query conditions: Order IDs: [Order ID]
- How to sort query results: Earliest order created
- The quantity to keep in the query result: 1
-
Action 2: Batch query orders (2)
- Query Conditions: The ID of the buyer who placed the order [buyer id]
- How to sort query results: Earliest order created
- The quantity to keep in the query result: 100
-
Action 3: Add order tags
- Order ID: [Order number]
- tags: Return requested
- Outcome: Every new return is tagged automatically, and up to 100 of the customer’s past orders are retrieved. Your customer service team can then decide whether to follow up or take risk-control measures without looking up orders manually.
| Note: To insert the information shown in square brackets (such as [Order number] and [Buyer ID]), click Add variable and select the corresponding parameter. |