> For the complete documentation index, see [llms.txt](https://help.openloyalty.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.openloyalty.io/implementation-guide/integrations-and-data-exchange/expressions.md).

# Expressions

In this section, you will learn about Open Loyalty language and more complex campaign conditions.

### **Introduction to Open Loyalty Language**

\
When setting up conditions and effects for rules in [Campaigns](https://help.openloyalty.io/campaigns), you may find that some situations are not covered by premade values. However, you are not limited to using these values - you can use an Open Loyalty language to create very specific conditions and values. \
\
In conditions, you can find a condition called **Expressions**. <br>

<figure><img src="https://content.gitbook.com/content/Z4Fuoa1PTF0DrNTgjzJu/blobs/0dSIEmLjYegVaBoQ4AzH/image.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/Z4Fuoa1PTF0DrNTgjzJu/blobs/zhrtkyzXLLitQOUBQiiJ/image.png" alt=""><figcaption></figcaption></figure>

You can set the value of such an expression. It can be set as a combination of attributes and operators using the meta language created by Open Loyalty. It allows you to create a fully customizable condition that meets the rules of your planned loyalty program.&#x20;

For example, you can create a campaign that is triggered when a customer buys a product from a certain category. You can do it in two ways:

Set a premade condition:

<figure><img src="https://content.gitbook.com/content/Z4Fuoa1PTF0DrNTgjzJu/blobs/LS2mP86zyxoSOnUwHdPr/image.png" alt=""><figcaption></figcaption></figure>

Or use an expression:

<figure><img src="https://content.gitbook.com/content/Z4Fuoa1PTF0DrNTgjzJu/blobs/IKPaE2LvH2Ccs8eqEI5P/image.png" alt=""><figcaption></figcaption></figure>

In the same way, you can create custom campaign effects - you can use premade values, or enter them yourself:

<figure><img src="https://content.gitbook.com/content/Z4Fuoa1PTF0DrNTgjzJu/blobs/ZTbavZl0uDvARZPJ969o/image.png" alt=""><figcaption></figcaption></figure>

In this section, you will find a description of the meta-language together with all the supported syntaxes, which is based on the expression syntax of Symfony Expression.

***

#### **The component supports**

* strings - single and double quotes (e.g. 'hello')&#x20;
* numbers - integers (e.g. 103), decimals (e.g. 9.95), decimals without leading zeros (e.g. .99, equivalent to 0.99); all numbers support optional underscores as separators to improve readability (e.g. 1\_000\_000, 3.14159\_26535)
* arrays - using JSON-like notation (e.g. \[1, 2])
* hashes - using JSON-like notation (e.g. { foo: 'bar' })
* booleans - true and false
* null - null
* exponential - also known as scientific (e.g. 1.99E+3 or 1e-2)


---

# 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 dynamically by asking a question.

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

```
GET https://help.openloyalty.io/implementation-guide/integrations-and-data-exchange/expressions.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 `build a script that syncs our docs to a CMS` 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.
