With the ‘Snapshot’ function you can create an internal table in Ternair Marketing Cloud in which output details from a selection are registered. Then, the snapshot can be used as input for other selection or output blocks.
Drag a snapshot block onto the worksheet and connect the block to an input block.
A snapshot can only be made when a selection is saved.
Double click the snapshot block to open the settings screen.
On the left hand side in a snapshot the preview of the internal table is displayed. On the right hand side the settings can be found.
This section focuses on the following topics; each topic consists of a tab in the settings (right hand side) of a snapshot block.
Icon | Option | Description |
Mapping | Mapping personalized snapshot fields | |
Changes in data | Possibility to edit fields | |
Settings | Define a retention period |
Filling out the Mapping and Settings tabs is mandatory, Changes in data are optional.
Preview
The snapshot previews (left hand side of the screen) is available on all tabs.
In the upper left corner, you can customize the preview data with the following options:
Refresh data N.B. If an existing snapshot block is reopened, the preview is outdated. Click the button to refresh the preview. |
|
Show 10, 25, 50 or 100 records | |
Show random data |
In the upper right corner, you can change the preview mode from an individual record to table view.
Mapping
Creating the mapping of a snapshot consists of three steps:
- Add columns;
- Select desired fields.
- Settings;
- Rename/ edit columns
- Define keys for the relevant fields.
- Define aggregations.
- Edit field
- Possibility to edit/transform/combine columns.
Add columns
As a first step, select the desired field(s) to be included in the snapshot.
When you click on the + icon, you will now see a menu with three options.
The ‘Mapping’ option allows you to add one or more fields to the mapping.
Apart from the available database fields it is possible to include fields with a fixed text value. Click on the ‘Fixed values +’ field in order to add a fixed value text field. Both the header as well as the value of the field needs to be provided.
The Calculated value option allows you to create a calculated field based on Scriban. You can use this for example when generating the current date.
Select an item to move it to the preview on the left.
N.B.: by selecting an entity type in the search screen all (underlying) entities will be selected at once (max 25 fields at once).
More details: Mapping.
Settings
Adding / renaming columns
After adding an item it is possible to edit the column header in the snapshot. The name of the columns can be changed by clicking on an item.
Key
A key must be assigned to field(s) that contain a key value. By clicking on the key field, a drop-down menu appears with the available keys.
The key icon indicates a key is assigned.
Example: select the key ’email’ for the field email address.
By assigning the ’email’ key you can combine the snapshot with all other sources that also contain an ’email’ key.
The key ‘Unique key (non shareable)’ can be used for an entity that contains a key value that is not found anywhere else in Ternair Marketing Cloud.
N.B.: a key must be assigned to at least 1 field and at least 1 key must be assigned.
Aggregations
Depending upon the (field) data type aggregations are available.
Aggregations can be used on fields with the calculated item.
|
For numeric and date fields in snapshots blocks aggregations can be selected. When no aggregation is selected, no aggregation is applied (default setting).
Nummeric fields
For numeric fields the following aggregation types are available:
- Sum
- Average
- Highest
- Lowest
- Count
Date fields
For date fields the following aggregation types are available:
- Highest
- Lowest
Edit field
In step 3, it is possible to edit the fields.
- Change upper case/ lower case
- Split fields
- Merge fields
- Shield fields
- Replace text
- Convert snapshot data into (numerical) values, where you can perform calculations for selection criteria, such as a minimum order value
- Remove whitespace characters
- Hashing fields/columns
- Look up
One-to-many functionality
Within a Snapshot block, you can retrieve and snap data. This data is retrieved based on the selected key. It is possible that there are multiple values for one key, you can now select the desired value(s) using the one-to-many functionality.
The icon below indicates whether the one-to-many functionality is available:
For example, you can use this to retrieve multiple orders from a customer. After all, a customer may have multiple orders. To see a customer’s most recent orders, it is possible to choose descending ‘Sorting’. With the number under ‘Limit’ you specify the maximum number of records.
The results can be represented by a separator, JSON or XML. If you choose a separator, you have a choice of a comma, pipe, semicolon or tab.
N.B. The one-to-many functionality can only be applied to a Snapshot block and can never be used in combination with aggregation.
Changes in data
Edit fields that have been added on the ‘Mapping’ tab are, chronologically, displayed in the ‘Changes in data’ tab.
You can undo changes by clicking the trashcan.
Settings
On the ‘Settings’ tab you can define a retention period.
Retention
The retention determines which period the snapshot is available within Ternair Marketing Cloud.
The default retention period for snapshot blocks is one day.
General settings
Options | Description |
Block template | Each snapshot block can be saved as a template. After saving a snapshot block as a template it is available as template for other snapshot blocks. A block template can be re-used by clicking ‘Open block template’ in the bottom left corner of a snapshot block and selecting the template from the list. |
Description | You can define a description for a snapshot block. The description field is intended to provide a logical description for the block. As a result, the content of the output block is easy to recognize in the selection flowchart. |
Apply | Clicking the ‘Apply’ button will save the provisional selection block settings. |
Cancel | Use the ‘Cancel’ button to undo your changes. |
Save | The ‘Save’ button can be used to save your changes without (re-)calculating the block. |
Execute
As a final step, the snapshot must be executed. Select the snapshot block, click on the right mouse button and click on ‘execute’.
By executing the snapshot, the internal table in Ternair Marketing Cloud is filled with data.
By creating a snapshot the values of the selected fields, as they are at the time of the execution of the block, are captured in the database.
The snapshot can then, at a later point in time, be used as input for other blocks (in the selection), such as Selection, Split, Sample, Switch or Deduplication. Connect the snapshot block with another (blue) function block by dragging an arrow from the snapshot block to the block.