Creating a Campaign Message with Zenloop

  • Log in to your CrossEngage account.

  • Go to Campaigns and click "Create new campaign" in the top right corner of the page.

  • Choose whether you want to create an Audience or a Realtime campaign. Information about the distinction between these types of campaigns found here.

  • Once you have created your campaign and filled in the “Campaign setup” and “Target group” sections, go to the Messages section and click Create new message.

    • More information on the segmentation of target groups using user events can be found here

  • Select Webhook from the dropdown menu.

  • Under the “Send via integration” heading, select the Webhook that you set up earlier.

  • Select "Add URL part," and add the following to the destination URL: Public_Hash_ID/survey_recipients. Please make sure that "/survey_recipients" is added after your public hash id.

  • This will direct the Webhook to your specific survey.

  • Fill in the Message box using JSON format. To better understand the possibilities of this integration, see the text below, which uses Handlebars as well.

Example JSON Text:

{
"send_at": "{{computeDate '{"timePhrase": "+ 0 day", "outputFormat": "yyyy-MM-dd"}'}}T{{computeDate '{"timePhrase": "+ 0 day", "outputFormat": "HH:mm:ss"}'}}Z",
"recipient": {
"identity": "{{user.[traits.email]}}",
"identity_type": "email",
"first_name": "{{user.[trait.firstName]}}",
"last_name": "{{user.[trait.lastName]}}",
"properties": [
{"name": "country", "value": "{{user.[trait.country]}}"},
{"name": "gender", "value": "{{user.[trait.gender]}}"},
{"name":"ce_externalId","value":"{{user.[traits.externalId]}}"}
],
"metatags": {
"survey_question": "How likely are you to recommend %[question subject]?",
"question_subject": "metatags",
"request_for_comment_all": "Tell us a bit more about why you chose %[score] for metatags",
"thank_you_link_text_all": "example text",
"thank_you_link_url_all": "www.example.com",
"thank_you_note_all": "Thanks for your feedback!"
}
}
}

Explanation of Example Text

"send_at": "{{computeDate '{"timePhrase": "+ 0 day", "outputFormat": "yyyy-MM-dd"}'}}T{{computeDate '{"timePhrase": "+ 0 day", "outputFormat": "HH:mm:ss"}'}}Z",

This section of the example JSON text defines the time at which the message will be sent. This formulation will print year-month-date, and hour-minute-second. The ‘T’ and ‘Z’ in this formula is a requirement of zenloop’s ‘send_at’ format.

Note that this section is not necessary: if left empty, the message will be sent anyway.

"recipient": {
"identity": "{{user.[traits.email]}}",
"identity_type": "email",
"first_name": "{{user.[trait.firstName]}}",
"last_name": "{{user.[trait.lastName]}}",
"properties": [
{"name": "country", "value": "{{user.[trait.country]}}"},
{"name": "gender", "value": "{{user.[trait.gender]}}"},
{"name":"ce_externalId","value":"{{user.[traits.externalId]}}"}
],

This section of the example JSON text defines the recipient of the message. The Handlebars in this message allow the recipient field to be personalized, inserting specific users’ email addresses, first names, last names, countries, and genders. For more information on Personalisation in CrossEngage, check our documentation here.

"metatags": {
"survey_question": "How likely are you to recommend %[question subject]?",
"question_subject": "metatags",
"request_for_comment_all": "Tell us a bit more about why you chose %[score] for metatags",
"thank_you_link_text_all": "example text",
"thank_you_link_url_all": "www.example.com",
"thank_you_note_all": "Thanks for your feedback!"
}

This section of the example JSON text defines metatags, which are used for personalizations in Zenloop. The question in the above example would show, “How likely are you to recommend metatags?” For further information, check the Zenloop integration here

If the handlebar you have included in the message can't be resolved, webhook dispatch will fail.