header-logo
Getting started with WixBuild your website and business with Wix. Try using our AI tools to create your website, customize templates, or hire professionals to build or enhance your online presence.
Creating a websiteRead how to use the Wix Editor and manage content on your site. Discover how to protect your visitors' privacy and make your site accessible.
Account & billingReview your account settings, manage your subscriptions and plans and understand your invoices.
Using the Wix mobile appsUse our mobile apps to run your business efficiently on the go and set up a dedicated app for your site members to stay in touch.
Connecting a domainFollow our step-by step guides to learn how to purchase, connect or transfer a domain for your site, and find out how to keep your site’s data secure.
Managing your businessGet tools to grow your business and web presence. Find the right tools for your specific needs, set up online payments and keep track of your site's analytics.
Promoting your siteLearn to make your site more visible promoting it on search engines, sending emails and running paid ads. Improve your online presence with practical tips.
Studio, Partners & EnterpriseGet the most out of your Studio or Enterprise account with advanced features that'll help you work more efficiently.
Need more help?Find solutions for site performance and technical issues, learn about issues we’re working to fix or contact us for help.
placeholder-preview-image
Wix LearnImprove your skills with our courses and tutorials.
Wix BlogGet tips for web design, marketing and more.
SEO Learning HubLearn to increase organic site traffic from search engines.
Website developmentBuild a custom site using our full-stack platform.
Hire a ProfessionalGet matched with a specialist to help you reach your goals.
placeholder-preview-image

Wix Automations: Setting Up and Using Local Variables

In this article
  • Adding a local variable to your automation
  • FAQs
Before you begin:
This article is intended for advanced users. Creating advanced automations using the local variable step requires familiarity with customizing your data with a formula field. 
Local variables let you create a placeholder for information you use repeatedly in your automation. This gives you the flexibility to manipulate your data and reuse it in conditions or actions.
Instead of adding or calculating the same details over and over, you set up a local variable once and reuse it as many times as necessary. If you ever want to update the variable, you only need to do so in one place and it updates throughout your automation.
Screenshot of a full automation flow using variables.

Adding a local variable to your automation

Add a local variable to your automation by adding a new step. To work with variables effectively, make sure to add them before the point in the flow where you plan on using them. 
For example, you can add a local variable right after selecting a trigger so it's available to use in all of the steps that follow (e.g. condition, action). 

To add a local variable to an automation:

  1. Go to Automations in your site's dashboard.
  2. Create a new automation or edit an existing automation.
  3. Click + to add a step.
  4. Click Custom value.
  5. Click Local variable.
  6. Add your variable info:
    1. Variable name: Add an easily identifiable name.
    2. Data type: Select the appropriate data type (e.g. number, text, boolean).
    3. Value: Set the variable's value. You can also click Customize to create a complex calculation made up of properties, functions and values. 
  7. (Optional) Click + Add Variable to add another variable.
  8. Click Apply.
  9. Continue building your automation as needed. 
Screenshot of a configuration of a local variables step.

FAQs

Click a question below to learn more about using local variables.