CleverTap
12 min
sync clevertap segments to appstorys cohorts via webhooks overview this integration uses clevertap's webhook channel to push segment membership to appstorys cohorts in real time each webhook call adds or removes a user from an appstorys cohort based on the action configured in your campaign prerequisites auth token from appstorys dashboard > integrations tab appstorys token generated when you create an integration cohort in appstorys each cohort has its own token step 1 create an integration cohort in appstorys in your appstorys dashboard, go to the cohorts tab and create a new cohort select the integration cohort option once you complete the cohort configuration and publish it, appstorys will generate an appstorys token for that cohort you will use this token as the appstorys token url parameter in your clevertap campaign step 2 create the webhook template in clevertap in clevertap, go to settings > channels > webhooks and create a new webhook template destination key value http method post destination url https //integrations appstorys com/clevertap https //integrations appstorys com/clevertap authorization header under the headers tab, add key value authorization bearer \<your auth token> the auth token is available in your appstorys dashboard under the integrations tab step 3 configure the campaign content when creating a webhook campaign in clevertap using this template, configure the content editor as follows url parameters add these key value pairs in the url key value pairs section key value action upsert or delete appstorys token \<your appstorys token> upsert — adds the user to the appstorys cohort use for segment entry campaigns delete — removes the user from the appstorys cohort use for segment exit campaigns create separate campaigns with separate action values to handle both entry and exit webhook content key value content format json content mode profile variables & custom key value pairs profile date check the following under profile variables email, identity, phone & clevertap id (checked by default, required) custom profile attributes — enable this to include your custom user attributes in the payload custom key value pair identifier add a custom key value pair to tell appstorys which field to use as the user identifier key value identifier \<your identifier field> set the value to the clevertap profile attribute that maps to the user’s id in appstorys (e g , phone , email , or a custom attribute like user id ) if no identifier key value pair is added, appstorys resolves the user as follows 1 identity attribute from the clevertap profile 2 objectid from clevertap system profile (fallback) only configure the identifier field if you use a different attribute as the primary user id in appstorys configuration reference section field value webhook template http method post webhook template destination url https //integrations appstorys com/clevertap webhook template header authorization bearer \<auth token> campaign content url param action upsert or delete campaign content url param appstorys token \<appstorys token> campaign content content format json campaign content content mode profile variables & custom key value pairs campaign content custom kv identifier \<field name> (optional)