variables.md

For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs; this page is available as Markdown.

Variables

What is a variable?

Variables are representations of data, and when a workflow runs, variables are replaced with real data. Think of variables as the stand-in for the data you want to use, and once the show begins (we hear you yelling action!) that's when the real data comes in to steal the scene.

Find and Use Variables

Let's begin with an example! Using one of our pre-built templates, Receive an SMS message when someone creates a fraudulent order. Let's look at the SMS Send Message step. Here, you can see that the Order Created > Phone variable is used. When this workflow runs, this will be replaced with your customer's actual phone number.

Phone variable in the To phone number field.">

Where do you find the variable that fits the part? You can find the Variables menu by clicking the [<>] icon in the To phone number field. A menu will be displayed on the right-hand side.

icon that opens the Variables menu.">

In the right-hand menu, feel free to use the search bar for "Phone" to find the Phone variable easily.

Since the variable data comes from an earlier step in the workflow, we'll want to select the step that best fits what we're looking to use for the customer's phone number. You'll notice there are several options.

You can click open the different objects that contain the variable you searched for to decide on the best one.

In this example, it's best to select the variable Order Created > Phone.

Phone variable.">

Once triggered, the order data will determine the customer's phone number for the SMS notification. For example, if an order is received from Jenny Smith (555-867-5309), the workflow will send a text message to 555-867-5309 when the order is flagged as fraudulent. In this particular case, it is recommended to add your phone number so you are notified of these flagged orders.

Advanced Variable Use

Next, we're going to get technical about variables you can create without the variable menu.

Using global store settings

Use the {{context.shop.PARAMETER}} variables to pull in settings from your Shopify store. Some common variables: