Create powerful logic using variables

Hey power users! ūüĎč Guess what??

You can now use data column variables when creating form rules to make your actions even more dynamic - with less work! Instead of defining a static value for a rule action, you can use a data column variable. Variables can be used for the following rule actions:

  • Set field value
  • Set redirect URL
  • Add tag to customer¬†
  • Remove tag from customer

Variable syntax 

The syntax used for data column variables is quite simple; it consists of double curly brackets, spaces, and the data column key. Here's an example of a variable for a data column that has the key of size_preference:

{{ size_preference }}

Example use case 

Use a variable to automatically redirect customers to certain collection pages based on field selection 

For this example, there is a required radio button field on the form for "Truck manufacturer", using a data column key of truck_manufacturer:

The field has lowercase values for each of the options, which happen match the URLs for the collections we're going to redirect to:

Based on the truck manufacturer the customer selects, we're going to redirect them to a specific collection page on the storefront once the form is submitted. This is accomplished using a rule with a single condition and a single action:  

Once saved, here's what this looks like in action on the storefront: 

Have questions or need help? 

Please contact our support team via chat or email ūüĎć ¬†

Did this answer your question?