Braze

How to integrate Braze with SEEN

Send data to SEEN

  1. Create a new Webhook Campaign in Braze.
  1. Give your campaign a name, and follow these steps to compose your webhook:
      • Webhook URL
      https://api.seen.io/v1/campaigns/{campaign_slug}/receivers/

      You will receive your campaign_slug from SEEN to call the correct endpoint.

      • HTTP Method = POST
      • Request body = Raw Text
        • You can use the code below as a starting point. Use our documentation as a reference for the payload structure.
      [
          {
          "first_name":"{{${first_name}}}",
          "last_name":"{{${last_name}}}",
          "email":"{{${email_address}}}",
          "customer_id":"{{${braze_id}}}"
          }
      ]

      Remember to modify the payload depending on the personalisations in your film.

      • Request headers
        • Authorization → Token {token}
        • Content-Type → application/json

      You will receive your Authentication Token from SEEN.

  1. You can now test the webhook with a user by switching to the “Test” tab.
  1. If everything works as intended, you can proceed to finish the webhook setup.
 

Receive data back from SEEN

  1. Create new Custom Attribute fields for “landing_page_url” and “email_thumbnail_url”. These are the two attributes we will be using in this example.
  1. Open “Data Transformation” tool under “Data Settings”, and click on “Create transformation”.
  1. Give your transformation a name, and choose:
      • “Start from scratch”
      • Destination → POST: Track users
  1. Share your Webhook URL with SEEN.
  1. You can use the code below as the starting point for the transformation:
    1. let brazecall = {
        "attributes": [
          {
            "braze_id": payload.customer_id,
            "_update_existing_only": true,
            "landing_page_url": payload.landing_page_url,
            "email_thumbnail_url": payload.email_thumbnail_url
          }
        ]
      };
      return brazecall;

      If you want to include other data, make sure to include those as well. Remember to discuss with SEEN as well so that the callback payload includes all needed fields.

  1. Send a test payload to the provided endpoint. If you want to use the payload defined in our documentation, you can send this yourself via Postman or another similar service:
    1. {
              "customer_id": "101",
              "campaign_slug": "onboarding",
              "landing_page_url": "your.subdomain.com/v/12345",
              "video_url": "https://motions.seen.io/298abdcf-1f0f-46e7-9c26-a35b4c1e83cc/d3c1dffdf063986ad521a63e3e68fd7d1100c90a/output.m3u8",
              "thumbnail_url": "https://motions.seen.io/298abdcf-1f0f-46e7-9c26-a35b4c1e83cc/d3c1dffdf063986ad521a63e3e68fd7d1100c90a/thumbnail.jpg",
              "email_thumbnail_url": "https://motions.seen.io/298abdcf-1f0f-46e7-9c26-a35b4c1e83cc/d3c1dffdf063986ad521a63e3e68fd7d1100c90a/email_thumbnail.jpg"
             
      }
  1. Click “Validate” to make sure everything works as intended.
  1. If everything worked as intended, click “Save” and “Activate”.
 
Did this answer your question?
😞
😐
🤩

Last updated on September 18, 2024