Jinja template language
Main tools in Jinja templating language:
-
Placeholders
{{{ system.retail_name }}
- When rendering a template, a particular variable value is substituted for the placeholder -
Executable expressions
{% a = abort() %}
- Render the template by executing code within the structure
Available variables by default¶
Available in all Jinja fields:
{{{ system.retailer_name }}
- retailer name{{{ system.external_api_url }}
- URL of the external NeuCurrent api
Available in Jinja message template fields:
{ message.unsubscribe_url }}
- Personally generated unsubscribe URL{ message.full_url }}
- Personally generated URL of web message{{ communication.template_unique_id }}
- template identifier{{ communication.template_name }}
- template name{{ communication.scenario_unique_id }}
- scenario identifier{{ communication.scenario_name }}
- scenario name{{ communication.experiment_unique_id }}
- experiment identifier{{ communication.experiment_name }}
- name of experiment
Executable expressions available¶
Expressions are only available in Jinja fields of message templates.
Get client events that match the given filters
get_client_events(event_condition, max_n=99)
"""
event_condition
max_n - maximum number of events
returns [events matching conditions for given user]
"""