Tags: Order Attributes, Orders
This task will remove order attributes from newly created or paid orders after a configurable amount of minutes. This can be helpful when order attributes are set by apps or other processes that are not necessary to keep on the order after initial processing.
- View in the task library: tasks.mechanic.dev/auto-remove-attributes-on-new-orders-after-x-minutes
- Task JSON, for direct import: task.json
- Preview task code: script.liquid
{
"minutes_to_wait_before_removing_order_attributes__number_required": "15",
"order_attributes_to_remove__array": null,
"remove_all_order_attributes__boolean": false,
"only_run_for_paid_orders__boolean": false
}
Learn about task options in Mechanic
{% assign delay = options.minutes_to_wait_before_removing_order_attributes__number_required | default: 0 %}
{% if options.only_run_for_paid_orders__boolean %}
shopify/orders/paid+{{ delay }}.minutes
{% else %}
shopify/orders/create+{{ delay }}.minutes
{% endif %}
Learn about event subscriptions in Mechanic
This task will remove order attributes from newly created or paid orders after a configurable amount of minutes. This can be helpful when order attributes are set by apps or other processes that are not necessary to keep on the order after initial processing.
Either configure one or more exact order attributes to be removed (e.g. "__app_track_id"), or choose the Remove all order attributes option.
Find this task in the library at tasks.mechanic.dev, and use the "Try this task" button. Or, import this task's JSON export – see Importing and exporting tasks to learn how imports work.
Found a bug? Got an improvement to add? Start here: ../../CONTRIBUTING.md.
Submit your task requests for consideration by the Mechanic community, and they may be chosen for development and inclusion in the task library!