Creating a job

Job main details

The main details for the job are:

  • Title - used in the jobs list

  • Job type ** - manual or scheduled. Manual will require manual starting/running by pressing the Activate trigger. Scheduled will allow you to schedule the task to run automatically every day, week or month at a very specific given time:

** Job type might not be available for your app plan

Rules

This is where the magic happens. This is the place where you can choose which tags to which metafields to be copied. Let's break it down.

Every single rule defines a particular metafield which will be loaded with information from tags. Within one rule you can have 1 or multiple conditions for matching tags.

Rules examples

Single rule with single condition (1 tag to 1 metafield)

In this example all tags with prefix category: are copied to metafield with name & key myfields.category:

Single rule with multiple conditions (multiple tags to 1 metafield)

The above example can be extended by adding additional tags (conditions) converted to metafields. For example, if you have both prefixed tags like category: and type: you can combine them like that by just adding a second condition:

Multiple rules

1 job can operate over different rules too. For example, if you need the category and type from above to be set into separate metafields - then you need 2 rules with 1 condition per rule. Here is an example:

Conditions

Conditions are basically the tags you'll be copying to metafield. A condition is created, the tag must match the given conditions in order to be copied to the metafields.

Type: Exact tag

With Exact tag you can access tags that perfectly match your search and you can even change their values when copied to metafield.

The below example is for all products that has the tag Blouses and when this is converted to a metafield it will be written as Tops.

Type: Prefix

With the prefix type you can catch all tags starting with specific string as it was widely used in Shopify during the time. The value migrated to the metafield will be the data after the given prefix.

For example if you have tag like category: dressesand you set a condition with prefix category: , the value migrated to the metafield will be dresses.

Last updated