Integrating Snowflake with SAP Emarsys enables marketers to leverage external data for advanced segmentation and personalization without duplicating data. This is achieved through SAP Emarsys' Relational Data Service (RDS), which connects to client-hosted databases like Snowflake.
In this blog we’ll walk through the process of setting up a Snowflake trial account, creating a sample database table, and integrating it with SAP Emarsys to enable RDS-based segmentation.
Setting Up Snowflake Trail Account:
Setting Up Snowflake connection in Emarsys
Step 1: Login to your Emarsys account and go to Add-ons -> Relational Data.
Step 2: Under connections tab click on "Create Connections" and then select Snowflake from the list of connection types.
Step 3: Now we'll have to add the Snowflake account details. To get the Account Name go to your Snowflake account and select your profile on the bottom-left section. Click on "Account" -> "View Account Details".
You will find the Account Name as highlighted below.
Step 4: For the further details click on "Query Data" on Snowflake home page.
From the Databases dropdown list Select "SNOWFLAKE_LEARNING_DB" and select schema "PUBLIC" and on the same page on the top-right you will find the warehouse name "COMPUTE_WH". Add these details in Emarsys.
Step 5: In Emarsys give the username and password same as the ones that you have created at the time of Snowflake account setup. Finally save and click on "Test". You'll get the message the connection is successful.
Creating Database Table in Snowflake
Step 1: Click on "Query Data" on Snowflake home page. And select the database "SNOWFLAKE_LEARNING_DB" and schema "PUBLIC" as mentioned before.
Step 2: Now In Emarsys, go to Add- Ons->Relational Data->Tables & Views search for the table that we have created and click on Personalization settings
Under the reference field, you'll have to select the database field with which you want to link your contacts in Emarsys. Here I'm selecting "Email" as my refence field and then click on "Save field configuration".
Your table is now available and ready to use in Emarsys for creating segments.
Creating Relational Segments in Emarsys:
Sample Use Case: Here we are creating a segment to identify contracts from the DEMO table that are ending within a specified number of upcoming days, so that we can communicate them before contract expiration.
Step 1: In Emarsys, go to Add- Ons->Relational Data->Segment Templates and click on "Create Segment Templates".
Step 2: Give the name of the Segment template. Now under segment template definition click on "Create Parameter". Give the name of the parameter as "number_of_days" and select parameter type as number input.
Step 3: Give the segment template definition and SQL query as below. While writing the SQL query, drag and drop the parameter that we have created to place it in the SQL query.
Map the contact reference field and the database reference fields as "Email".
Step 4: To test the SQL query, under "Preview and test" enter a number and click on Run.
You'll get a few contract details with end date with in the next 90 days.
Step 5: Now to create the Relational Segment using the above segment template, go to Contacts->Segments and click on Create Segment->Standard segment->Relational Segment.
Step 6: Give the name of the segment. Under Template, select the template that we have created from the drop-down list. Enter the number 90 in the segment definition and click on save & apply.
The segment result will show the total number of contacts matching the given criteria.
Relational Data Personalization Tokens:
To use business-specific data stored in the relational databases to personalize campaigns across channels we need to create Relational Data Personalization Tokens. They are placeholders in your content that dynamically pull values from relational tables connected to Emarsys.
Step 1: Go to Content->Personalization and click on "Create Token" and select "Relational Data"
Step 2: Give the token name, here we are creating token for contact ID and below Relational data preset click on "New".
Give the name of your preset, select connection as Snowflake, select the table DEMO and under Set Parameters select type as contact field, value as Email.
Step 3: Now select the data preset that we have created and under "Field" you'll get all the database fields of the table DEMO, from the drop-down select Contract ID and click on Save.
Step 4: Once the token is created it will be available while creating the campaigns under personalization section.
In this way we can setup and configure Relational Databases in Emarsys and utilize the external data without actually storing the data in Emarsys.
I hope you found this blog helpful.
Regards,
Swetha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 12 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |