APSIS One + Make

How to integrate APSIS One to SEEN using Make

Prerequisites:

  • Marketing Automation and API access are available in the Essential and All-in-One licences of APSIS One.
  • MAKE plan that allows at least 3 simultaneous active scenarios, with enough monthly Ops to support the volume of profiles.

This guide will help you set up a trigger-based integration between APSIS One and SEEN using webhooks in Marketing Automation to send data to SEEN, and receive landing page URL and an email thumbnail URL back to APSIS One as a custom event.

 

This example uses the profiles first name and last name as the personalisations, and their email address as the identifier.

Send data to SEEN

A) APSIS One Marketing Automation

  1. Set up a new Marketing Automation flow in APSIS One, choose “Blank Canvas” and name your flow.
  1. Choose the conditions in the “Listen” node to decide which profiles will receive a personalised film.
  1. Add a “Webhook” node to your flow, and fill it out with following information:
      • HTTP Method → POST
      • Webhook Path → your MAKE webhook URL (you can add this later when we set up the MAKE flow)
      • Click “Add Profile Data as URL Parameter”
        • Parameter name → first_name
        • Profile Data → First Name (string)
      • Click “Add Profile Data as URL Parameter”
        • Parameter name → last_name
        • Profile Data → Last Name (string)
      • Click “Add Profile Data as URL Parameter”
        • Parameter name → email
        • Profile Data → Email (string)
      • Add error handling if needed.

Remember to add the Profile Data needed for your film personalisation.

B) MAKE Scenario

  1. Create a new scenario, and add the “Webhook” module.
  1. Click “ADD” to create a new webhook and choose “Custom webhook”. You will now receive the webkook URL to add to your APSIS One Marketing Automation webhook node.
  1. You can now send a test payload from APSIS One to MAKE to create your data structure.
  1. After you get a “Successfully determined” message, add an HTTP module, and choose “Make an API Key Auth Request”, and fill it out with the following:
      • Credentials → Add
        • Under “Key” add “Token {token}” (you will receive your Token from SEEN)
        • API Key placement → “In the header”
        • API Key parameter name → Authorization
      • URL → https://api.seen.io/v1/campaigns/{campaign_slug}/receivers/

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

      • Body type → Raw
      • Content type → JSON
      • Request content:
        • You can use the code below in this example (you might need to modify the values by dragging and dropping in the MAKE UI):
[
	{
		"first_name":"{{1.first_name}}",
		"last_name":"{{1.last_name}}",
		"email":"{{1.email}}",
		"customer_id":"{{1.email}}"
	}
]

If your film contains other personalisations, refer to our documentation for the payload structure.

  1. You can now click “Run once” and send a new profile from APSIS One to test your integration.
  1. If everything worked, you can now activate your flow.

Send data to APSIS One

A) Authentication

  1. Create a new new scenario, add the HTTP module, choose “Make a request” and fill it out with the following:
      • URL → https://api.apsis.one/oauth/token
      • Method → POST
      • Body type → Raw
      • Content type → JSON
      • Request content:
        • You can use the code below:
{
	"grant_type": "client_credentials",
  "client_id": "{your APSIS One client ID}",
  "client_secret": "{your APSIS One client secret}"
}

You need to create an API key in APSIS One to receive your client_id and client_secret.

  1. Click “Run once” to retrieve your Bearer token.
  1. Add a “JSON” module, and choose “Parse JSON”
      • Click on the line under JSON string and choose “data” from the list
Notion image
  1. Add a new Data Store to you MAKE account
      • Create a data structure for your data store with the following:
        • “Add item”
        • key (name) → key
          • Type → Text
        • value (name) → value
          • Type → Text
        • Toggle both as “Required” → “Yes”
        • Notion image
  1. Go back to your new scenario, and add a “Data Store” module after the “JSON” module.
      • Choose your Data Store and add “access_token” (from the “JSON” module) as the “Key”.
  1. Click “Run once” to get your access token saved to your Data Store.
  1. If everything worked as expected, turn on “Scheduling”, and Run the scenario at least once per 24 hours to keep your token updated.

Your APSIS One Bearer token is only valid for 24 hours per token

B) Data from SEEN to APSIS One

  1. You will first need to create a new custom event in your APSIS One account. Add following fields to your custom event:
      • Field Name → landingPageUrl
        • Field Type → Text
      • Field Name → thumbnailUrl
        • Field Type → Text
      • Allow operations for the identifier type you will be using.
  1. In MAKE, create a new Scenario, and add the “Webhook” node. Click “ADD” to create a new structure. Share your webhook URL with SEEN.
      • If you are using the callback payload defined in our documentation, you can use the payload below to define your data structure:
{
   "customer_id": "email@example.com",
   "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. After you have defined your data structure, add a new “Data Store” module and choose “Get a record”. This will be used to retrieve your APSIS One Bearer token.
      • Choose your data store, and write “Bearer” in the “Key” textfield.
  1. Add a new “HTTP” module, and choose “Make a request”. You can fill it out with following information:
      • URL → https://api.apsis.one/audience/keyspaces/{keyspace_discriminator}/profiles/{profile_key}/sections/{section_discriminator}/events
        • You need to fetch {keyspace_discriminator} and {section_discriminator} by using the correct endpoints in APSIS One.

          {profile_key} refers to the identifier of the profile in APSIS One, in this example their email address which you can choose by clicking on the “customer_id” variable from the “Webhook” module.

          Notion image
      • Method → POST
      • Header:
        • Name: Authorization
        • Value: Bearer {Record: value} (from the Data Store module)
          • Notion image
       
      • Body type → Raw
      • Content type → JSON
      • Request content: You can use the code below in this example:
      {"items":[
          {"data":
          {"source":"SEEN", 
          "landingPageURL":"{{1.landing_page_url}}",
          "thumbnailURL":"{{1.email_thumbnail_url}}"},
          "event_time":"{{parseDate(now; "YYYY-MM-DD")}}",
          "version_id":"{your SEEN specific event version ID}"}]}

You need to fetch the “version_id” by using the correct endpoint in APSIS One.

More information about posting custom events here.

  1. You can now test the full flow by clicking “Run once” and sending a profile through Marketing Automation in APSIS One. Make sure the other Scenarios are active.
  1. If everything worked as intended, you can now proceed to activate this final MAKE scenario as well.
Did this answer your question?
😞
😐
🤩

Last updated on September 27, 2024