Paid feature

This is a paid feature. If you need more information, please contact tpm@deployteq.com for further details.

When rendering an email, this function can be used to store personalized information in the data model. This can be useful when working with dynamically generated emails and you want to keep track of the articles/products that have been previously sent to the recipient. The purpose is to exclude them from future mailings or for reporting purposes.

store_in_datamodeler

{{store_in_datamodeler table=<table> <column name>=<column value>}}

Good to know

  • This Smarty function can only add new data to the data model and cannot update existing data.
  • The table in which the data is stored can be linked to the standard customer table or can be a standalone table.
  • It is not possible to populate fields with a lookup relationship to a secondary table.

Arguments

ArgumentDescription
tableThe table name in the data model to which new information should be added.
column nameYou can specify one or more columns from the respective table and their corresponding values per customer.

Examples

Saving data in a table linked to the customer table

Below is an example data model where broadcast details are stored per customer:

Required Smarty code in the email content:

store_in_datamodel with contains tabel

{{* Collect data from the recipient and the broadcast, process it into the table 'send_products' *}}
<!--{store_in_datamodeler table="send_products" broadcastid={{broadcast field='id'}} campaignid={{broadcast field='campaignid'}} mailingtype={{broadcast field='mailingtype'}} subject={{broadcast field='subject'}} productid=123TEST senddate=$smarty.now|date_format:"%Y-%m-%d"}-->

Outcome in the data model:

Saving data in a standalone table

Below is an example where the target table is a standalone table. In addition, the columns customerid and email address have been added to trace the relationship to the customer, but this could also be done based on other system fields.

Required Smarty code in the email content:

store_in_datamodel in standalonetable

{{* Collect data from the recipient and the broadcast, process it into the table 'send_products' *}}
<!--{store_in_datamodeler table="send_products" customerid=$customer.id email=$customer.emailaddress broadcastid={{broadcast field='id'}} campaignid={{broadcast field='campaignid'}} mailingtype={{broadcast field='mailingtype'}} subject={{broadcast field='subject'}} productid=123TEST senddate=$smarty.now|date_format:"%Y-%m-%d"}-->

Outcome in the data model: