Update cohorts (Audience)

Introduction

Zapier is an online platform that helps you automate workflows by connecting your apps and services you use. Using the MoEngage <> Zapier integration, you can create custom workflow automations for more than 5,000+ apps on Zapier. 

The action "Add or Remove User From Cohort (Audience)" helps to update a cohort (Audience) in MoEngage. You can either choose to add a user, or remove a user from the cohort. If a user already exists in the cohort, the action does nothing. 

Use Cases

With this action, you can update cohorts from multiple sources in near real-time using Zapier. Some ideas to get you started - 

  1. Add new GoTo Webinar registrants into a cohort in MoEngage.
  2. Remove users from a cohort in MoEngage when a new row is added in Google Sheets.
  3. Add a user to a cohort in MoEngage when a Google Form is submitted.
  4. Add new Facebook Lead Ad leads to a cohort inside MoEngage.
  5. Remove user from a cohort when a new Typeform entry is created.
 

PREREQUISITES

Integration

The action makes use of MoEngage Cohort/ Audience APIs. For this tutorial, we will pick up Use Case #1: Add new GoTo Webinar registrants into a cohort in MoEngage. On your Zapier Dashboard, and click on "+ Create Zap" on the top-left corner. 

Step 1: Select GoTo Webinar as the Trigger App

For the trigger, type "GoTo Webinar" and select it. This will be the trigger that will start your zap.

Action2-Step1.png

Step 2: Setup the trigger app

  1. Select the event from the dropdown: "New Registrant". Click continue.
  2. Connect your GoTo Webinar Account, if not done already. Click "Allow" to connect with Zapier. Once selected, click continue to move to the next step.

Action2-Step2.png

  1. Under the "Set up trigger" step, select the Webinar from the dropdown. Click continue.
  2. Click on "Test Trigger" to pull in a recent registrant as sample data. If no data is present, you can create a new registrant from your GoTo Webinar Dashboard.
  3. Once you are satisfied with this data, click continue. 

Action-TestTrigger-1.png

Action-TestTrigger-2.png

Step 3: Add MoEngage as the Action app

Click on "+" to add a new step. Then, search for "MoEngage" from the apps and select it.

Step8.png

Step 4: Setup MoEngage Action

  1. From the event dropdown, select: "Add or Remove User From Cohort (Audience)". Click continue.
  2. If you have followed the prerequisites, you should see your MoEngage account already listed. You can either choose that or connect a new one. Click continue once done.
  3. In the next step "Set up action", you will see a form for you to either fill-in or map from the previous step. Click here to know more.

Action2-Step3-1.png

Action2-Step3-2.png

Select if you want to add or remove user. Fill in all the mandatory fields and you will then be presented an option to test this setup. Do make sure you fill in at least one of "User ID" or "Anonymous ID". To know more, read the Cohort API docs.

You can also choose to add custom attributes in the form of key-value pairs and map them to inputs from the previous trigger app:

Action3.png

Once you have selected your mapping data from the previous step, it should look like this:

Action4.png

  1. For our setup, we have linked the following:
    1. Cohort Name -> "goto_sample_webinar"
    2. Cohort ID -> "goto_sample_webinar"
    3. User ID -> GoTo Webinar (Email)
    4. Anonymous ID -> GoTo Webinar (Email)
    5. Once you are satisfied with your mappings, click on "Continue".
  2. You will now be presented with an option to test this setup.

Action5.png

  1. Click on "Test & continue" to test this setup.
  2. If the API call was successful, you should see a "success" return.

Action6.png

You can also verify this in your MoEngage dashboard. Go to your MoEngage Dashboard >> Segment >> Create segment. Filter users by "Custom Segment" and you should see your newly created cohort here. This confirms that your Zap was successful.

Action7.png

  1. Once you are satisfied that everything works, click on "Publish Zap" and it will run every time a new registrant is added to your Webinar.
Was this article helpful?
0 out of 0 found this helpful