Is there a way to assign a custom variable in an email template? Here’s the scenario...
I have an event property that is a URL with a structure like this: https:test.com/customer/CUSTOMERID/event/EVENTID
I want to set the CUSTOMERID and EVENTID to separate variables. I understand that we can split the URL by forward slash like this: {{ event.URL | split: ‘/’ }} but that just prints an array.
I’d like to do something like:
{% url_split = event.URL | split: '/' %}
{% c_id = url_split[4] %}
{% e_id = url_split[6] %}
Customer ID: {{ c_id }}
Event ID: {{ e_id }}
Is this possible? I’ve also tried using a Python custom action before the email but I can’t figure out how to pass the variable to the email.
Thanks all.