How to Create Expressions for Conditional Execution of Integrations
How to Create Expressions for Conditional Execution of Integrations
Introduction
This document is designed to assist you in understanding and applying dynamic formulas to control the execution of integrations within our system. These formulas enable you to define logical conditions based on input data, which determine whether an integration will be executed.
Expression Standards
Expressions are written using placeholders for data and logical or comparative operators to formulate conditions. Below are the components you can use:
- Placeholders: Represented by
{{}}
, these identify specific data. Examples include{{field_id}}
,{{hidden_field_name}}
,{{utm_source}}
, and{{variable_name}}
. You can find more details on how to customize emails and messages using specific placeholders at this Guide to Placeholders. - Boolean Values:
TRUE
: Represents a true value.FALSE
: Represents a false value.
- Logical Operators:
AND
: Conjunction (and).OR
: Disjunction (or).NOT
: Negation.
- Comparison Operators:
EQUALS
: Equality.CONTAINS
: Contains text.>
: Greater than.<
: Less than.>=
: Greater than or equal to.<=
: Less than or equal to.
- Parentheses: Used to alter the standard precedence of operations, ensuring that specific expressions are evaluated first.
Examples of Expressions
- Simple Expression
- Formula:
{{629gf8238a124a052r02b98}} EQUALS "yes"
- Description: The integration is executed if the field
629gf8238a124a052r02b98
is equal to "yes".
- Formula:
- Using a Hidden Field
- Formula:
{{hidden_field}} EQUALS "beginner"
- Description: The integration is executed if a hidden field contains the value "beginner".
- Formula:
- UTM Tracking
- Formula:
{{utm_source}} EQUALS "google"
- Description: The integration is executed if the UTM source parameter is "google".
- Formula:
- Condition with a Variable
- Formula:
{{score}} EQUALS "10"
- Description: The integration is executed if a specific variable is set to "active".
- Formula:
- Compound Expression with Parentheses
- Formula:
({{629gf8238a124a052r02b981}} > 20 AND {{629gf8238a124a052r02b98}} < 30) OR ({{utm_campaign}} EQUALS "launch" AND NOT {{email}} CONTAINS "@gmail.com")
- Description: The integration is executed if the field
629gf8238a124a052r02b981
is greater than 20 and field629gf8238a124a052r02b98
is less than 30, or if the UTM campaign parameter is "launch" and an email does not contain "@gmail.com".
- Formula:
NOTE: You can get the ID of a question on the form editing screen. When selecting a question, the URL will end in something like this ?fieldid=629gf8238a124a052r02b98.
What comes after the equal sign is the question's ID.
Conclusion
Use this guide as a reference when defining conditions for the execution of your integrations. Understanding and using operators correctly, especially parentheses, are essential for creating effective and secure control logic.