Tray.io

Introduction

Tray.io is an integration platform that allows organizations to easily automate complex processes through a powerful, flexible platform, and connect their entire cloud stack thanks to APIs.

MoEngage <> Tray.io

The MoEngage and Tray.io integration allows you to easily send data between MoEngage and other apps using custom logic and code functions. With this integration, you can - 

  1. Use MoEngage as a trigger on Tray.io via our Connector campaigns 
  2. Send data from Tray.io to MoEngage using our Data APIs 

Use Cases

  1. When an event occurs in MoEngage, add a new row in Google Sheets.
  2. Import users from HubSpot Leads into MoEngage.
  3. Send a Slack message when a user performs an event.
  4. Import events into MoEngage from a WebHook setup in Tray.io.

Integration Prerequisites 

  • Ensure you have access to your Tray.io account.
  • Ensure you have access to Data API keys in MoEngage Dashboard. 
  • We have revamped our dashboard settings UI. The Data API ID and Data API Key are available in the following navigations in the new and old UIs.
    • Revamped UI - You can access the Data API ID  in Settings -> Account -> APIs . The Data API ID is the same as the App ID. The Data API Key is available in the same screen in the API Keys -> Data section.
    • Old UI -> You can access the Data API ID and Data API Key in Settings -> App Settings -> APIs -> Data API Settings.

Use MoEngage as a Trigger

You can make use of MoEngage's Connector Campaigns to use MoEngage as a trigger.

Step 1: Add Webhook as a Trigger on Tray.io

  1. On your Tray.io Dashboard, click on "+ Add workflow" >> "From scratch" to create a new workflow.
  2. Give your workflow a name and fill out other details.
  3. In Step 2, select "Webhook" under the section "".

Step-1-Webhook-Trigger.png

  1. Click on "Create workflow" to begin.
  2. In the Workflow Editor, click on the three dots menu next to the trigger >> "Copy public URL".

Step1-Trigger-Dashboard.png

  1. This Public URL will be the endpoint to set up in MoEngage Connector Campaign.
  2. Click on "Enable workflow" at the bottom to make this URL live.

Step 2: Setup the Connector Campaign in MoEngage Dashboard

  1. Navigate to MoEngage Dashboard.
  2. Use any one of the following options:
    1. On the All Campaigns page, click Create Campaign.
      The Create Campaign page is displayed.
      CreateCampaign_RightNav.png
    2. Click Create New > Campaign.
      The Create Campaign page is displayed.
      CreateCampaignLeftNav.png
  3. Click Custom under Connectors.
  4. For the campaign delivery types, choose "Event-Triggered".
    • For more information about delivery types, refer to Delivery Types.
  5. On the next screen, give your Campaign a name, and select the Criteria as "Device Uninstall".
  6. For the trigger, choose "immediately".

UseCase2-Step3.png

  1. For the audience, let us choose "All users" for this use case. Click "Next" when satisfied.
  2. On the content screen, we will define our payload and webhook URL we got from the previous step.
  3. Choose the method as "POST" (know more about Tray.io Webhook Trigger).
  4. Enter the webhook URL (Public URL) you copied earlier.
  5. Define the headers and parameters as per your requirements. For this use case, we will just define our payload body- (you can type @ to insert personalized values as well)

Step-2-ConnectorCampaign.png

  1. Now you need to test this webhook, scroll down and enter a test user's data and click on "test".
  2. You should see a new modal saying the test was successful:

UseCase2-Step5.png

Step 2: Test the trigger on Tray.io

  1. Now go back to the Tray.io Workflow editor. Open the "logs" tab from the top.
  2. On the left sidebar, you should see new execution entries from the test you ran earlier.
  3. Select an execution entry, and then select "Webhook". Then verify if your data has successfully reached Tray.io:

Step-2-Verify.png

  1. Once you have verified the data, click on the "Use output" button above the output tab. This will make all fields in your payload available to access in other steps.

Step-2-Output.png

  1. In the next steps, type {$ to open up the interpolation dropdown. Select the fields you want to map from the trigger step. Read about working with data.

 

Previous

Next

Was this article helpful?
0 out of 0 found this helpful

How can we improve this article?