In this article we will explain how you can send triggered campaigns in Mailmodo from your CleverTap account.

Step 1 : Create the template in the template section.

Step 2 : Navigate to the 'Transactional' section on the left menu and click on 'New Transactional Campaign' to create the campaign.

Step 3 : Select the created template and click on next to add the details of the campaign.

Step 4 : Add the relevant 'Subject', 'Pre-Header', 'From Name', 'Reply to Email', and select the 'Sender Email' to complete the details section.

Step 5 : In select contact step. Select 'CleverTap' from the list in Trigger on events section and click Next.


Step 6 : In the review section, ensure all the details are correctly shown. After reviewing, click on 'Enable Campaign' to create the transactional campaign.


Step 7 : A Webhook URL will be generated on the Trigger Info page. Use this page to connect your campaign to your platform.


Step 8 : Use the copy URL button to copy the Webhook URL.

Step 9 : Go to settings in your CleverTap account, under the engage section, select Channel, and click on Webhooks

Step 10 : Create a new Webhook and enter the ‘Trigger Endpoint’ from your campaign into the ‘Destination URL’.

Choose ‘POST’ as the ‘HTTP method’ & name your Webhook

Step 11 : Now you can use this Webhook to trigger emails to be sent from Mailmodo in your CleverTap account

An example on how you can add Webhook to your CleverTap journeys. 


Step 1 - Click on the Webhook block to open its settings. Choose the Webhook you just created under the ‘Webhook URL’ dropdown


Step 2 - Then copy the following code snippet into the Webhook payload and choose the format as JSON:

{ "email":"john@example.com", "data":{ "firstName":"John" }
}


Step 3 - The argument to “email” points to recipient emails and “data” points to the personalisation parameters. Replace the email argument ‘john@example.com’ with ‘@’ and select the email field from your contact list.

Step 4 - Also replace the parameter ‘John’ with ‘@’ and select the appropriate field matching the parameter ‘firstName’.

Step 5 - You can add more parameters depending on the campaign, by adding a few extra lines of code in the “data” section

Step 6 - Make sure that the key of the parameter is exactly the same as the key written in the email campaign

Step 7 - Save and Close the Webhook. Now this Webhook trigger is part of your journey and can trigger emails from Mailmodo