Flow Automation: Creating URL Redirects via Action
You can use the Create redirect link action in Flow Automation to automatically redirect specific store URLs to a designated destination when predefined conditions are met. This is particularly useful for managing traffic during product status update, product sunsets, or promotional updates.
This guide explains the field descriptions for this action, the applicable workflows, and how to test and apply it in real-world scenarios.
Field Descriptions
The Create redirect link action allows you to define the source and destination paths.
| Important: This action requires relative URL paths (starting with /). Entering a full URL (including the domain name) will cause the workflow to fail. |
| Field | Description |
| Redirect from |
The original URL path to be redirected. Format: Enter a relative path starting with a forward slash (e.g., /products/old-item). Do not include your store domain. |
| Redirect to |
The target URL path where the visitor will be sent. Format: Enter a relative path (e.g., /collections/all). |
Applicable Workflows
The Create redirect link action is primarily used in workflows initiated by the following trigger:
- Product status update
| Note: For more details on how to set up the Product status update trigger, please refer to "Flow Automation: Triggering Workflows When a Product Status Changes." |
Testing the Workflow
To test whether the workflow successfully creates a URL redirect, follow these steps:
- In Flow Automation, set up a workflow using the Product status update trigger and the Create redirect link action.
-
From your SHOPLINE admin panel, go to Products and update the status of a specific product to trigger the workflow (e.g., change it from "Activate" to "Deactivate").
Note: For detailed instructions on how to trigger this workflow for testing, please refer to the "Testing the Workflow" section in the "Flow Automation: Triggering Workflows When a Product Status Changes" guide. -
Once the condition is met, go to the Flow Automation app 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. -
Verify that the new redirect has been successfully created by going to the Settings > Domains > 301 redirect section.
Note: For more details on 301 redirects, please refer to the "Creating and Managing 301 URL Redirects" guide.
Example Use Case
Here is a practical example of using the Create redirect link action to manage traffic for unavailable products.
Scenario: Automatically redirect customers to a collection page when a product's status changes.
- Trigger: Product status update
- Action: Create redirect link
- Condition: Check if the product status is equal to Deactivated or Archived.
- Redirect from: /products/{{product.handle}} (Using the product handle to ensure a relative path format)
- Redirect to: /collections/all (or a specific "Similar Items" page path, e.g., /collections/similar-items)
- Outcome: When a product becomes unavailable (for example, when it is deactivated or archived), the system automatically creates a redirect to guide customers to other available products, reducing bounce rates and improving the shopping experience.