Custom Webhook flow will allow you to receive data for all events, including recurring events for an email.
Prerequisites:To integrate Opensend with a Custom webhook flow, you will need:
- Webhook method
- Authorization (If it's required)
- Webhook URL
Webhook Integration Options
You can configure your webhook integration in one of two ways, depending on how you want to handle incoming events from Other Connections:
1. Single Integration
-
Setup: Use a single Custom Webhook Flow without any filters.
-
Behavior: All event types are delivered to the same endpoint.
-
Event Identification: The payload includes the event type, allowing you to distinguish events in your code.
2. Multiple Integrations
-
Setup: Create separate integrations for each event type.
-
Behavior: Apply filters to route specific events to different endpoints.
-
Use Case: Ideal if you want to isolate event handling across different services or systems.
Steps to integrate:
- Go to the integrations tab on the Opensend Dashboard
- Click Main Connections
- Click Add Destination
- Select Custom Webhook
- Add Name, Description, and Click Next
- Select Webhook configuration:
- Select the Webhook method (POST)
- Add Authorization details (header and key - If those are required) from these options:
- Select API Key and add the authorization details
Note: One header will be generated by default, but you can add as many headers as your webhook requires. - Select Oauth2 and add the authorization details
- Select API Key and add the authorization details
- Under the fields dropdown select any default fields from Opensend and any custom fields, you want to send to Custom Webhook
- Add the Custom Webhook URL and press the Send a test request button
- In the popup add the email address to send as a test to Custom Webhook and Press Send
- You should be able to find the test request sent to your Webhook URL with test email, custom fields, and authorization details in "headers".
- With the test request, you can see what data Opensend data is sending and map the data accordingly on your end
- Press Done to close the Popup
- Click Next
- Select the Traffic sources from where you want to receive the data
- Click Create Connections
- Select the connections and Click Publish
- Request Data format:
- For DTC: In the case of DTC product, on the bottom, you should be able to see Example request data
- For B2B: In the case of B2B product, on the bottom, you should be able to see Example request data and JavaScript example code you can use to post data on your end
- For DTC: In the case of DTC product, on the bottom, you should be able to see Example request data