To send user-specific data collected inside a Journey to your own system, store the answers in Tags and then read them back in a Webhook payload using Dynamic Data macros.
- Create Tags. For each value you want to capture (e.g. an answer to a quiz question), create a Tag in Audience > User data (Tags).
- Store the responses. In the journey, after the point where the user gives a response, add an Update user profile element and set the Tag to the user's value. Repeat for each value you collect.
-
Add a Webhook element at the point where the data should be sent out. Set the URL and REQUEST TYPE (GET or POST), and adjust HEADERS if your endpoint needs a different
Content-Typeor anAuthorizationheader. -
Build the payload. In the DATA section enter valid JSON. Use the DATA BUILDER panel to pick a category (Device, Tag or Event) and a parameter; Pushwoosh generates the macro for you and you paste it into the JSON. The macro form is
{{tag:TagName}},{{device:hwid}}and the event equivalents — dotted forms such as{{user.id}}or{{user.tags.name}}are not supported and will not be substituted.
{
"hwid": "{{device:hwid}}",
"answer1": "{{tag:quiz_answer_1}}",
"answer2": "{{tag:quiz_answer_2}}"
}
- Test and save. Click Test webhook to verify the request, then Apply.
Notes
- If a macro has no value for a given user,
nullis transmitted. - The Webhook element can also read data back: under RESPONSE MAPPING add a Path (dot-separated, e.g.
data.user.id) and an Attribute name to reuse the returned value later in the journey (for example in Update user profile or Time delay). Responses larger than 64 KB are not processed for mapping.
See the Webhook element documentation for the full reference.
Comments
0 comments
Article is closed for comments.