Flow Automation: Deleting a URL Redirect via Action
In Flow Automation, you can use the Delete URL redirect action to automatically delete a specified URL redirect at a scheduled time.
A URL redirect automatically directs visitors from one URL to another, such as redirecting a campaign link in an ad to the corresponding campaign collection page. With this action, you can automatically remove temporary redirects after a marketing campaign ends, preventing customers from landing on outdated campaign pages and reducing manual work.
This guide explains when to use this action, how to configure its field, compatible workflows, testing methods, and usage limitations, along with a practical workflow example.
| Note: You can view all your store's URL redirects in the 301 Redirect section under Settings > Domains in your SHOPLINE Admin. For more information about URL redirects, refer to "Creating and Managing 301 URL Redirects." |
When to Use the Delete URL Redirect Action
You can use the Delete URL redirect action in the following scenario:
- Removing temporary campaign redirects: Automatically delete URL redirects created for a limited-time marketing campaign when the campaign ends, eliminating the need for manual cleanup.
| Note: For instructions on automatically creating URL redirects, refer to "Flow Automation: Creating URL Redirects via Action." |
Field Descriptions
The Delete URL redirect action identifies the URL redirect to delete using its unique ID.
The following table describes the required field:
| Field | Description |
| Redirect id that needs to be removed (redirect_id) | Enter the unique ID of the URL redirect you want to delete, such as 6a12c57c39abf5983677d247. Each action supports only one redirect ID. |
Applicable Workflows
The Delete URL redirect action is primarily used in workflows initiated by the following trigger:
- [General] Scheduled time
| Note: For detailed instructions on configuring the Scheduled time trigger, refer to "Flow Automation: Scheduled Trigger." |
Testing the Workflow
To verify that your workflow successfully deletes the specified URL redirect, follow these steps:
From your SHOPLINE Admin, go to Settings > Domains, locate the 301 Redirect section, and click Manage redirections. Create a test URL redirect (for example, redirect /flow-test to your store's homepage) and obtain its redirect ID.
Note: Deleted URL redirects cannot be restored automatically. Use a redirect created specifically for testing to avoid affecting existing redirect rules. For detailed instructions on creating URL redirects, refer to "Creating and Managing 301 URL Redirects." - In Flow Automation, create a workflow using the Scheduled time trigger and the Delete URL redirect action. Configure the following settings, then click Publish:
- Scheduled time: Set First trigger time to a few minutes from the current time and Repeat or not to Not repeating.
- Delete URL redirect: Enter the ID of the test redirect in the Redirect id that needs to be removed field.
Once the scheduled trigger time has passed, return to Flow Automation to review the workflow execution results.
Note: For detailed instructions on checking workflow execution results, refer to the "How to View the Running of a Flow" section in the "Introduction to Flow Automation" guide. - From your SHOPLINE Admin, return to Settings > Domains, locate the 301 Redirect section, and click Manage redirections. Verify that the test redirect has been removed from the list. You can also visit the test URL in a new private browsing window to confirm that the redirect rule no longer applies.
Example Use Case
The following example demonstrates how to use the Delete URL redirect action to automatically remove a temporary URL redirect after a marketing campaign ends.
Scenario: During your year-end sale, you temporarily redirect your "New Arrivals" collection page (/collections/new-arrivals) to your "Year-End Sale" collection page, allowing customers who access the original URL through navigation menus or existing links to view sale products directly. The sale ends at 10:00 PM on December 31, 2026, and you want to automatically delete the redirect at that time so customers can access the original "New Arrivals" collection page again.
Configure the workflow as follows:
- Trigger: Scheduled time (Starts the workflow at the specified time.)
- First trigger time: 2026-12-31 22:00:00 (the campaign end time)
- Repeat or not: Not repeating
- Action: Delete URL redirect
- Redirect id that needs to be removed: Enter the ID of the redirect from /collections/new-arrivals to the "Year-End Sale" collection page, such as 6a12c57c39abf5983677d247.
Result: When the year-end sale ends, the workflow automatically deletes the URL redirect. Customers visiting /collections/new-arrivals can access the original "New Arrivals" collection page instead of the expired campaign page, without requiring you to manually update the redirect settings.
| Note: Deleted URL redirects cannot be restored automatically. To reuse the same redirect for a future campaign, recreate it in the 301 Redirect section under Settings > Domains in your SHOPLINE Admin. |
Usage Limitations and Considerations
When using the Delete URL redirect action, keep the following rules and limitations in mind:
- One redirect per action: Each action can delete only one URL redirect. To delete multiple redirects, add a separate action to your workflow for each redirect.
- Permanent deletion: Once a URL redirect is deleted, its redirect rule no longer applies. To reinstate the rule, you must recreate the URL redirect.
- Original URL availability: If the original URL does not point to a valid page, customers may encounter a 404 error after the redirect is deleted. Before publishing the workflow, ensure that deleting the redirect will not disrupt customers' access to your store.
- Browser caching: Browsers may cache 301 redirects, so some customers may continue to be redirected to the previous destination after a redirect is deleted or updated. To verify the latest redirect behavior, use a new private browsing window or clear your browser cache.