Using Template Tags

{ }

Parsing data using template tags.

When parsing data into an interaction, it is important to note the difference between the initial interaction and a connected interaction, as they behave slightly differently.

An interaction has the ability to parse data into the headings subject, body and input values.

Content sent using parameters will be parsed in the initial interaction only.


Using the console

	
// HTML
data-fs-params=' 
{
   "trigger": {
        "moduleid": "..."
   },
   "rel": {
        "headings": {
            "subject": "Jacket",
            "body": "..."
        },
        "email": "..."
   }
}'

/**
 * In order to parse the subject into the subject headings
 * Using the console, when editing a module, you can add
 * the following or something similar to the subject.
 */
Product: {{headings.subject}}

/**
 * In order to parse a value into an form input,
 * Using the console, when editing a module, navigate
 * to form & data collection, expand the input add
 * the following or something similar to the value field.
 *
 * When using connected interactions, any collection within
 * the same sequence, can be parsed as well.
 */ 
{{email}}

	

Using the API

		
// HTML
data-fs-params='
{
   "trigger": {
        "moduleid": "..."
   },
   "rel": {
        "headings": {
            "subject": "Jacket",
            "body": "..."
        },
        "email": "..."
   }
}'

/**
 * In order to parse the subject into the subject headings
 * Using the API. Creating a module
 */
  // PHP API
 'headings' => [
    [
        'subject' => 'Product: {{headings.subject}}'
    ]
]

/**
 * In order to parse a value into an form input,
 * Using the console, when editing a module, navigate
 * to form & data collection, expand the input add
 * the following or something similar to the value field.
 *
 * When using connected interactions, any collection within
 * the same sequence, can be parsed as well. Creating a module
 */ 
 // PHP API
 'form' => [
     [
        'x' => 0,
        'type' => 'text',
        'system' => 'fname',
        'label' => 'First Name',
        'name' => 'fname',
        'value' => '{{fname}}',
        'class' => 'form-control'
    ]
 ]