APSIS One + Make
How to integrate APSIS One to SEEN using Make
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
- Set up a new Marketing Automation flow in APSIS One, choose “Blank Canvas” and name your flow.
- Choose the conditions in the “Listen” node to decide which profiles will receive a personalised film.
- 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
- Create a new scenario, and add the “Webhook” module.
- Click “ADD” to create a new webhook and choose “Custom webhook”. You will now receive the webhook URL to add to your APSIS One Marketing Automation webhook node.
- You can now send a test payload from APSIS One to MAKE to create your data structure.
- After you get a “Successfully determined” message, add a “SEEN - Create a Video” module, and fill it out with the following:
- Create a Connection:
- Add the Token you have received from SEEN.
- Add the Campaign Slug you have received from SEEN.
- Standard fields:
- Add the standard fields you will be sending in. Note that both First Name and Customer ID are mandatory fields
- Extra Arguments:
- If you use additional data fields in you video, you can map them by using Key-Value pairs under Extra Arguments.
- You can now click “Run once” and send a new profile from APSIS One to test your integration.
- If everything worked, you can now activate your flow.
Send data to APSIS One
A) Authentication
- 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.
- Click “Run once” to retrieve your Bearer token.
- Add a “JSON” module, and choose “Parse JSON”
- Click on the line under JSON string and choose “data” from the list
- 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”
- 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”.
- Click “Run once” to get your access token saved to your Data Store.
- 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
- 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.
- In MAKE, create a new Scenario, and add a “SEEN - Watch for created video” module. Click “Create a Webhook”. Share your webhook URL with SEEN.
- Next, 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.
- 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
- Method → POST
- Header:
- Name: Authorization
- Value: Bearer {Record: value} (from the Data Store module)
- Body type → Raw
- Content type → JSON
- Request content: You can use the code below in this example:
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 “Watch for created video” module.
{"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.
- 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.
- If everything worked as intended, you can now proceed to activate this final MAKE scenario as well.
Last updated on November 25, 2024