Triggering Pendula flows from Segment
Segment offers a robust customer data platform that streamlines the collection, organisation, and utilisation of customer data across various channels.
Integrating Segment with Pendula gives you the ability to trigger flows at the optimal time in the customer journey, allowing for seamless synchronisation of detailed customer profiles and real-time behaviour data, and enabling highly personalised and targeted messaging.
Pre-requisites
To trigger a Pendula flow, you'll need:
- A Pendula API Token
- A Segment source, with incoming events.
Refer to the Segment Documentation for information on creating sources.
To Trigger Pendula from Segment Events
- Create a new destination in Segment, and select Webhooks (Actions) from the catalog.
- Select the data source you'd like to connect to.
- Once created, navigate to mappings and create a new mapping.
- Specify conditions that will trigger an event being sent to Pendula. e.g.
- Event Name is
XYZ
- Event Trait is not
ABC
- User ID starts with
SA
- Event Name is
- Load a test event from source, or add sample data into the test event field.
- Keep in mind if a test event is loaded and sent later, it'll trigger a flow within Pendula - don't use customer data at this stage.
- Create a flow in Pendula, with a Webhook trigger.
- Use the test event from Segment as a payload sample.
- Set up mappings as below:
- URL - Webhook trigger URL
- Method - POST
- Batch Size - 0
- Headers - An authorization header, using the API token generated within Pendula
- Data - The payload to be sent to Pendula. Typically, sending the entire event is the easiest way to get started - but it's also possible to create custom payloads within Segment. Refer to the Segment Documentation for more information.
-
Enable Batching - No
- Send test event to destination.
- If the Pendula flow is active, this will trigger the flow with whatever data was in the test event.
- Enable mapping in Segment destination.
The destination is active as soon as the mapping is enabled, so you can quickly start messaging your customers through Pendula.