Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 2.44 KB

File metadata and controls

51 lines (32 loc) · 2.44 KB

Copy draft order metafields to orders

Tags: Draft Orders, Metafields, Orders

This task will watch for orders created from draft, copying over any metafields to the order that match the ones configured in this task. If the "Copy all metafields" option is checked, then it will skip the matching and instead just copy any metafields that exist on the draft order.

Default options

{
  "metafields_to_copy__array": [
    "sample.change_me"
  ],
  "copy_all_metafields__boolean": false
}

Learn about task options in Mechanic

Subscriptions

shopify/orders/create
mechanic/user/order

Learn about event subscriptions in Mechanic

Documentation

This task will watch for orders created from draft, copying over any metafields to the order that match the ones configured in this task. If the "Copy all metafields" option is checked, then it will skip the matching and instead just copy any metafields that exist on the draft order.

When configuring metafields to copy, they should be entered as namespace.key (e.g. "custom.estimated_ship_date").

Orders may also be sent individually to this task from an admin link. Caution when using this feature though, as this task does not check if the metafields already exist on the order nor if the values are different; it will just overwrite them.

Installing this task

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.

Contributions

Found a bug? Got an improvement to add? Start here: ../../CONTRIBUTING.md.

Task requests

Submit your task requests for consideration by the Mechanic community, and they may be chosen for development and inclusion in the task library!