Skip to content

Using webhook response data in your journey

When you map values from a webhook response, Pushwoosh stores them as variables you can use later in the journey, anywhere you’d otherwise use an Event attribute.

Save a webhook value as a Tag with Update user profile

Anchor link to

A Webhook can return data from an external system, such as a CRM user ID or subscription status, that Pushwoosh does not store on the user profile yet. Update user profile saves mapped values as Tags so you can use them in segments, dynamic content, and later journey steps.

Example: save a CRM user ID as a Tag

Anchor link to

A new user signs up in your app, and the journey creates a matching record in your CRM. Saving the returned CRM user ID as a Tag lets you reference or update the same CRM record later, for example from another journey or a follow-up Webhook call, instead of creating a duplicate record each time the user re-enters the journey.

Journey flow: Trigger-based Entry → Webhook → Update user profile → Exit

  1. Create a journey with Trigger-based Entry on the SignUp event.
  2. Add a Webhook element after the entry step. Name it (for example, Create user in CRM) and set the request URL to your CRM create-user endpoint.
  3. In Response mapping, set Path to the ID field in the response (for example, data.user.id) and Attribute to crm_user_id.
Webhook response mapping with Path data.user.id and Attribute crm_user_id
  1. Add an Update user profile element after the Webhook step.

  2. In Dynamic Tag Value, click + Dynamic Value. In Tag, select the Tag that stores the CRM ID (create it in advance if needed). In Event, select the webhook step by the name you gave it (Create user in CRM). In Dynamic Value, select crm_user_id.

Dynamic Tag Value with Tag for CRM ID, Event Webhook step, and Dynamic Value crm_user_id
  1. Add Exit at the end of the branch.
Journey branch ending with Exit after Update user profile step

Schedule a delay from a webhook value with Time Delay

Anchor link to

Visit dates, renewal deadlines, and delivery windows often live in an external booking or billing system. After a Webhook maps the date from the API response, Time Delay can pause the journey until that moment, for example 2 days before an appointment, so the next message goes out on time.

Example: schedule a reminder from a date in the response

Anchor link to

A user books an appointment in your app. The journey fetches the visit date from your booking system and sends a push reminder 2 days before the visit.

  1. Create a journey with Trigger-based Entry on the AppointmentBooked event.
  2. Add a Webhook element after the entry step. Name it (for example, Get appointment details) and set the request URL to your booking system API.
  3. In Response mapping, set Path to the date field in the response (for example, appointment.date) and Attribute to visit_date.
Webhook step with response mapping for appointment.date to visit_date
  1. Add a Time Delay element after the Webhook step. Select Based on user/event data, set Get date from to Event, set Event to the webhook step by the name you gave it (Get appointment details), set Event value to visit_date, and set the delay to Before 2 Days.
Time Delay configured from webhook visit_date with Before 2 Days offset
  1. If users can book less than 2 days before the visit, enable Split to branches if the date’s in the past or date is empty on the Time Delay element. This creates two branches, In the past and In the future. See Split branches when the date is in the past or empty.
  2. Add a Push step with your reminder message. If split is enabled, add this Push in both branches: In the past (send immediately) and In the future (after Time Delay).
  3. Add Exit at the end of each branch.
Time Delay split into In the past and In the future branches, each with Push and Exit steps

Things to keep in mind

Anchor link to
  • Path syntax: use a dot-separated path (for example, data.user.id). Wildcards and filters are not supported. See Webhook response mapping for details.
  • Response size: responses larger than 64 KB are not processed for mapping.
  • Testing: run Test webhook in the Webhook element before you use mapped values in a live journey.