Sync Users to AppStorys Cohorts via Connector Campaigns
24 min
overview this integration uses moengage connector campaigns to add or remove users from appstorys integration cohorts in real time whenever a user enters a moengage campaign audience and satisfies the campaign trigger criteria, moengage sends a webhook request to appstorys containing the user's identifier based on the configured action upsert → user is added to the appstorys cohort and marked eligible delete → user is removed from the cohort and marked ineligible this integration is designed for real time user level cohort synchronization and supports high volume traffic prerequisites before configuring the integration, make sure you have appstorys account id your appstorys account identifier integration cohort create an integration cohort inside appstorys after publishing the cohort, note the generated appstorys token this token uniquely identifies the cohort and will be passed to moengage as a url parameter step 1 create an integration cohort in appstorys in the appstorys dashboard navigate to cohorts click create cohort select integration cohort configure the cohort publish the cohort after publishing, appstorys generates an appstorys token save this value it will be used as the appstorys token url parameter in moengage step 2 create a connector campaign in moengage navigate to engage → campaign select connector choose event triggered step 3 configure audience select the audience that should be synced to the appstorys cohort you can use user properties user behavior custom segments event filters example has executed purchase completed step 4 configure trigger criteria configure when the webhook should be fired example if user performs purchase completed set delivery mode immediately this ensures users are synced to appstorys in near real time step 5 configure connector request in the connector content screen configure the api request method post webhook url https //integrations appstorys com/moengage connector url parameters add the following parameters key value appstorys token \<your appstorys cohort token> action upsert or delete client id \<your appstorys account id> action values add users to cohort action=upsert users will be marked is eligible = true remove users from cohort action=delete users will be marked is eligible = false step 6 configure request body select body type → json add the following key key value user id id recommended configuration {{userattribute\['id']}} if the user identifier is missing, configure fallback as do not send connector this prevents invalid requests from being sent step 7 publish campaign review the campaign configuration and publish it once active, moengage will send a webhook request whenever a user satisfies the campaign trigger conditions example requests upsert user request post /moengage connector?appstorys token=\<token>\&action=upsert\&client id=\<client id> body { "user id" "12345" } result user added to appstorys cohort is eligible = true delete user request post /moengage connector?appstorys token=\<token>\&action=delete\&client id=\<client id> body { "user id" "12345" } result user removed from appstorys cohort is eligible = false configuration reference section field value connector method post connector url https //integrations appstorys com/moengage connector url parameter appstorys token appstorys cohort token url parameter action upsert or delete url parameter client id appstorys account id request body user id id key value do not send connector appstorys token \<your appstorys cohort token> action upsert or delete client id \<your appstorys account id> notes each webhook request contains a single user requests are processed asynchronously by appstorys cohort membership updates are near real time the same endpoint supports both additions and removals using the action parameter user id is mandatory for processing