In Connectif, variables represent data that can change their value depending on the contact browsing and their web context. This allows you to create personalized content and experiences based on the user and their behavior, increasing loyalty and conversion.
1. Properties
- A variable in Connectif is the representation of data that changes depending on the contact and their behavior.
- Any data collected in a workflow can be assigned to a variable, whether it's related to, for example, product or contact information.
- Each variable is distinguished by a name and a unique identifier.
- Variables can have a format type depending on the data they represent. These formats are Number, Date, Currency, and Percentage. By default, variables are defined as Unformatted. This undefined type is used to represent text or data that won't be displayed in a special way.
- Variables can be included in any type of content from their respective editors and linked to any data collected in previous nodes of a workflow.
- Data is assigned to variables in the configuration of action nodes responsible for sending content to the contact: "Send web content", "Send email", "Show push" and "Send SMS".
- When creating a variable, it is possible to define a default value, which will be automatically assigned when there are no values to link from the data source. If it's not linked to any data and doesn't have this default value, a blank space will be displayed instead.
2. How it is used in Connectif
2.1. Use of predefined variables
There are some variables that Connectif provides for use in content without needing to explicitly associate data in the nodes that send or display the content:
These variables do not allow the definition of a default value.
-
{{__cn_available_width}}: this variable is available in all Connectif content except for Web Push Notifications. It is automatically replaced with the pixel value of the width of the cell where the variable is located.
-
{{__cn_email_subject}}: this variable is only available in the email content type. It can be used anywhere in the email, and is automatically replaced with the email's Subject. -
{{__cn_email_from}}: this variable is only available in the email content type. It can be used anywhere in the email, and is automatically replaced with the From used to send the email.
2.2. Creating variables
Web content
1. Go to "Content > Web Content" and click on Create new web content. If you want to create variables in an existing web content design, click More to expand the menu and select Edit.
2. Add or select the component in your design where you want to create a new variable.
3. Click on (Edit element).
4. In the editor, click the Variables button.
5. Enter a name to identify the variable in Variable identifier.
6. (Optional) Set the Default value if necessary.
7. (Optional) Assign a Data type if necessary.
8. Click Accept to save the changes in the node and Save to save the changes in the workflow.
Emails
1. Go to "Content > Email" and click on Create new email. If you want to create variables in an existing email design, click More to expand the menu and select Edit.
2. Add or select the component in your design where you want to create a new variable.
3. Click on (Edit element).
4. In the editor, click the Variables button.
5. Enter a name to identify the variable in Variable identifier.
6. (Optional) Set the Default value if necessary.
8. Click Accept to save the changes in the node and Save to save the changes in the workflow.
Web push notifications
1. Go to "Content > Push Notifications" and click on Create new push notification. If you want to create variables in an existing design, click More to expand the menu and select Edit.
2. In the Content or Compact version tabs, click the {} (Define a dynamic variable) button.
3. Enter a name to identify the variable in Variable identifier.
4. (Optional) Set the Default value if necessary.
5. Click Accept.
6. Click Accept to save the changes in the node and Save to save the changes in the workflow.
SMS
1. Go to "Content > SMS" and click on Create new SMS. If you want to create variables in an existing design, click More to expand the menu and select Edit.
2. In the Content tab, click the {} (Define a dynamic variable) button.
3. Enter a name to identify the variable in Variable identifier.
4. (Optional) Set the Default value if necessary.
5. Click Accept.
6. Click Accept to save the changes in the node and Save to save the changes in the workflow.
2.3. Modifying the data type of a variable
1. In the editor, click on General properties.
2. Select the Variables tab.
3. Click on (Edit).
4. Modify the data type.
5. Click Accept to save the changes to the variable and Save to save the changes in the design.
2.4. Assigning variables
"Send web content" node
1. Go to "Workflows" and click on Create new workflow. If you want to assign variables in an existing strategy, click More to expand the menu and select Edit.
2. In the "Send web content" node, click on (Edit node settings).
3. Select the web content with variables.
4. Click Next .
5. In the second step, set the sending configuration according to the type of web content.
6. In the third configuration step, establish the relationship between the data obtained in the previous nodes and the variables created in the web content design.
7. Click Finish .
8. In the workflow, click Save to save the changes and Start to activate it.
"Send email" node
1. Go to "Workflows" and click on Create new workflow. If you want to assign variables in an existing strategy, click More to expand the menu and select Edit.
2. In the "Send email" node, click on (Edit node settings).
3. Select the email design with variables.
4. Click Next .
5. In the second step, set the configuration and sending parameters.
6. In the third configuration step, establish the relationship between the data obtained in the previous nodes and the variables created in the web content design.
7. Click Finish .
8. In the workflow, click Save to save the changes and Start to activate it.
"Show push" node
1. Go to "Workflows" and click on Create new workflow. If you want to assign variables in an existing strategy, click More to expand the menu and select Edit.
2. In the "Show push" node, click on (Edit node settings).
3. Select the web push notification design with variables.
4. Click Next .
5. In the second configuration step, establish the relationship between the data obtained in previous nodes and the variables created in the web content design.
6. Click Finish .
7. In the workflow, click Save to save the changes and Start to activate it.
"Send SMS" node
1. Go to "Workflows" and click on Create new workflow. If you want to assign variables in an existing strategy, click More to expand the menu and select Edit.
2. In the "Send SMS" node, click on (Edit node settings).
3. Select the SMS design with variables.
4. Click Next .
5. In the second step, configure the settings and sending parameters.
6. In the third configuration step, establish the relationship between the data obtained in previous nodes and the variables created in the SMS design.
7. Click Finish .
8. In the workflow, click Save to save the changes and Start to activate it.
2.5. Identifying variables
1. Assign the data obtained in the workflow to the corresponding variable.
2. (Optional). Assign literal values to the variables that require them.
3. Click Finish.
4. In the workflow, click Save to save the changes and Start to activate it.
Keep learning!
To make the most of your Connectif account, we recommend continuing with the following articles:
- Create a block of personalized products in web content, to create a dynamic product block in web content using variables.
- Display personalized products in content, to show products using variables.
- Advanced variable assignment, to work with additional filters when selecting data to personalize content.
- Predefined variables for personalizing emails and content, to use system variables in your content.