> For the complete documentation index, see [llms.txt](https://docs.getmesa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getmesa.com/workflow-builder/fields/variables.md).

# 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](https://app.getmesa.com/discover/send-an-sms-message-if-a-customer-places-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.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2Fng1HIUVOzjIkwP6KTB46%2Fimage.png?alt=media&amp;token=75f5eca1-33cf-4a60-9649-649737da7981" alt="Screenshot of MESA workflow builder, SMS Send Message step of the fraudulent order template. Spotlight the Order Created > Phone variable in the To phone number field."><figcaption></figcaption></figure>

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.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FKea7oMgXmFwWkpgEYnKD%2Fimage.png?alt=media&amp;token=f29fa02f-11cb-4f29-bcd0-5c0658d8bbb1" alt="Screenshot of MESA workflow builder, SMS Send Message step To phone number field. Spotlight the <> icon that opens the Variables menu."><figcaption></figcaption></figure>

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.**

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FkUZWpIXVxc1JRoHP2TL8%2Fimage.png?alt=media&amp;token=811172f4-19bc-4e5b-80d0-b181bde528f4" alt="Screenshot of MESA workflow builder, right-hand Variables menu searched for Phone with objects expanded. Spotlight the Order Created > Phone variable."><figcaption></figcaption></figure>

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:

* `{{context.shop.email}}`: Your store's contact email. Set in the General page of your Shopify settings.
* `{{context.shop.domain}}`: Your store's url. Example: [www.mystore.com](http://www.mystore.com) if you have a custom domain, mystore.myshopify.com if you have not configured a custom domain.
* `{{context.shop.myshopify_domain}}`: Your .myshopify.com domain. Example: mystore.myshopify.com.
* `{{context.shop.name}}`: Your store's name. Example: My Store.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2F5nMVjSCxaCEUKT8cggVC%2Fimage.png?alt=media&amp;token=123fb341-6fad-471e-b79d-3679538582e4" alt="Screenshot of MESA workflow builder, field using context.shop global store settings variables. Spotlight the {{context.shop.PARAMETER}} variable in the field."><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.getmesa.com/workflow-builder/fields/variables.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
