Skip to main content
All CollectionsCampaign Management
Creating, Managing, and Formatting Custom Variables in Opta
Creating, Managing, and Formatting Custom Variables in Opta

This article explains how to create, managing, and format custom variables in Opta.

Cole Bridge avatar
Written by Cole Bridge
Updated over a month ago

Opta campaigns have basic fields, custom fields, and custom variables.

To learn more about basic and custom fields, read this article.

To create a custom variable, go to a posting flow while you're managing a campaign.

The top section allows you to create a custom variable.

There are three types of custom variables:

  • Preset Values: Values that are calculated based on collected values or created by Opta when a post is received.

  • Collected Values: Your campaign fields, which are collected from the post into Opta.
    ​Hardcoded Values: If you need a fixed value passed in your posting (you can also hardcode from posting flow designer by adding a value without the "@" symbol, which is my preferred method).

To create a custom variable, name the variable, select a variable type, and then select the specific variable you'd like.


For example:

Name: Age

Type: Preset Value

Value: Age

After you create a custom variable, you'll see it in your table of custom variables for this posting flow.

From the table, you can edit, modify, or delete a custom variable.

Editing allows you to revisit the original creation options.

Modifying allows you to add a prefix, suffix, replacement value, or choose the format of your custom variable.

For example, if you need date of birth or lead time/date passed in a specific format, you can select manage (the beaker icon), and select your desired format:

If you want to hardcode a value if the custom variable is empty, you can use "Modify Value," find a text, select {{empty}} and then replace it with your chosen value.

Still have questions about custom variables? Drop us a note via chat or [email protected] and we're happy to help.

Did this answer your question?