In this article, we will explain how to build and use formulas to calculate different data using contact attributes and transactional parameters.
Before you start
- Make sure you're familiar with the different types of contact attributes.
How to build a formula?
In Sendinblue, the two basic functions to build formulas are COUNT and SUM.
COUNT - Count specific data
The COUNT function can be used to count specific data.
|COUNT[A]||Will count the number of A.|
A is mandatory; B, C, and D are optional.
|Will count the number of A, use B as a first condition, use C as an operator (=, < or >), and use D as a second condition.|
SUM - Calculate the total value of specific data
The SUM function can be used to calculate the total value of specific data.
|SUM[A]||Will calculate the total value of A.|
A is mandatory; B, C, and D are optional. D can be a fixed number or can be used with the command NOW where NOW(-x) is the date from x days ago.
|Will calculate the total value of A, use B as a first condition, use C as an operator (=, < or >), and use D as a second condition.|
How to use formulas?
A formula can be used in a calculated value to calculate specific data for each of your contacts using transactional parameters. Calculated values are displayed on your contacts' details page.
To learn how to add calculated values, check our dedicated article What are the different types of contact attributes?.
Global calculated values
A formula can be used in a global calculated value to calculate custom statistics for your contact lists and emails using contact attributes. Global calculated values are displayed under the Global Computed Values section of your dashboard.
To learn how to add a global calculated value, check our dedicated article Can I add custom statistics to calculate?.