Skip to main content

Dynamic content in orders using variables

Viewing and using dynamic content with variables in Operations1 orders

Operations1 Support avatar
Written by Operations1 Support
Updated this week

⚠️ NOTE: Variables are currently still in beta and their functionality may change.

Variables allow you to display dynamic content in documents and interactions in Operations1. This enables you to customize orders—for example, by automatically inserting serial numbers, customer names, or other specific information.


What are variables?

Variables are freely definable text modules that can be added to a job.

  • The names and values of the variables are not predefined.

  • They can be defined individually for each job.

  • Variables are used to dynamically display information in the document or in interactions.


Using and creating documents with variables

  1. Create a new document or edit an existing document.

  2. In the “Information” tab, activate the “Contains variables” option. Important: To do this, the “Make visible to others” setting must be deactivated:

  3. Insert the desired placeholder for the variable in an interaction:

    %%Variable%%fdf

    Example: For the variable Serial number, the placeholder is:

    %%Serialnumber%%

Creating orders with variables

Variables can only be set when creating orders via the API. This is done via:

  • the order connector (details on configuration here) or

  • directly via the REST API (details on application here)

Executing either of these options then proceeds according to the following pattern:

  • The expected structure for transferring the variables is:

    {  
    “VariableName1”: “Value1”,
    ‘VariableName2’: “Value2”
    }

    an object with key and value pairs as string values.

  • Add the document with variables to the created order.

  • Start the order and the report – the variables will be replaced automatically.

Example:

If you have defined a variable named “Serialnumber” with the value “SN-2025-01” in the job:

{  “Serialnumber”: “SN-2025-01”}

and the placeholder %%Serialnumber%% is in your document, the following will be displayed automatically when the job is started:


Notes on variables

Where can I find variables once they have been set?

The variables used in the order are visible in the “Information” tab of the order (if set):

How can I change variables?

Variablen können nachträglich nicht geändert werden.

In welchen Dokumenten werden Variablen gesetzt?

Variables cannot be changed retrospectively.

Why can't I start documents with variables as reports?

Documents with variables can only be used within jobs.

Why are some interactions not displayed, and why does the variable name appear instead of the value for others?

If variable values are not set, interactions with variables without a value are hidden by default, unless they are marked as “mandatory.” In this case, hiding is prevented and the variable name is displayed instead of a value.

Can I use multiple variables in a single interaction?

Yes

Where can I use variables within documents?

Variables can only be used in interaction titles and link interactions.

What do I need to do if I want to use variables in a module?

To use variables in modules, the documents they contain must also be configured for variables, otherwise this will lead to errors:

What should I do if the “contains variables” function is not visible?

Please contact our support team.

Did this answer your question?