Appearance
Braze
In the following example, we will be sending user data to Seen for video generation, and receiving a unique video player link and personalised email thumbnail back to Braze for distribution. This example uses a POST webhook in Braze to send data to Seen, a POST webhook in a Seen Project, and data transformation to receive the data back into Braze.
If you have multiple video campaigns with Seen, repeat the process to connect Braze with all video campaigns. You can reach out to your Customer Success Manager at Seen for assistance.
A Project needs to be created and published in Seen Platform prior to setting up the integration.
Send data to Seen
- Create a new Webhook Campaign in Braze.
- Give your campaign a name, and follow these steps to compose your webhook:
Webhook URL
https://next.seen.io/v1/projects/{{project_id}}/dataYou can find your endpoint in the Run tab of your Seen Platform project.
HTTP Method =
POSTRequest body = Raw Text. Use the code below as a starting point (see Create Data for the payload structure):
json{ "first_name": "{{${first_name}}}", "last_name": "{{${last_name}}}", "id": "{{${braze_id}}}" }Remember to modify the payload depending on the personalisations in your video.
Request headers
Authorization→Bearer {token}Content-Type→application/json
You can create an API token in your Seen Platform Workspace settings.
- You can now test the webhook with a user by switching to the Test tab.
- If everything works as intended, you can proceed to finish the webhook setup.
Set up your Project Webhook in Seen Platform
- Navigate to your Project.
- Click Add webhook.
- Configure your webhook (see Webhook for the full configuration).
Receive data back from Seen
- Create new Custom Attribute fields for "player_url" and "email_thumbnail_url". These are the two attributes we will be using in this example.
- Open Data Transformation under Data Settings, and click on Create transformation.
- Give your transformation a name, and choose:
- Start from scratch
- Destination → POST: Track users
- Add your Braze Webhook URL to your Seen Project Webhook. Use the payload below as a starting point for the Seen webhook body. Replace the
{{ }}placeholders with the dynamic output references available in the Seen webhook editor:json{ "id": "{{ id }}", "player_url": "{{ Player link }}", "email_thumbnail_url": "{{ Email thumbnail link }}" } - Use the code below as the starting point for the Braze transformation:javascript
let brazecall = { "attributes": [ { "braze_id": payload.id, "_update_existing_only": true, "player_url": payload.player_url, "email_thumbnail_url": payload.email_thumbnail_url } ] }; return brazecall; - Send a test payload to the provided endpoint. If you want to use the payload defined in this example, you can send this yourself via Postman or another similar service:json
{ "id": "101", "player_url": "https://player.seen.io/v/AhdlZ6Qq28LDQAptGHUY", "email_thumbnail_url": "https://motions.seen.io/298abdcf-1f0f-46e7-9c26-a35b4c1e83cc/d3c1dffdf063986ad521a63e3e68fd7d1100c90a/email_thumbnail.jpg" } - Click Validate to make sure everything works as intended.
- If everything worked as intended, click Save and Activate.