Creating Next best recommendation fields in Oracle Eloqua
To enable next best recommendations in Oracle Eloqua, you will need to create custom contact fields in Eloqua with specific field names that will be mapped to next best recommendation data in Oracle Unity.
You have the option of creating fields in the Eloqua platform or using Postman.
To create custom contact fields in Eloqua:
-
Follow the steps for Creating contact fields in Eloqua.
-
In the Display name input field, you'll need to define the label used in Oracle Unity for Next best recommendations and match it with an Eloqua contact field. Enter the exact name of the label for the next best offer or next best action (either with or without machine learning) in Oracle Unity.
The table below displays the format of the labels for Next best recommendations. Each recommendation sent out will consist of these four columns. The "1" represents the ranking of the recommendation, with "1" being the highest ranking.
Catalog ID Catalog name Recommendation ID Recommendation name rec_catalogid_1 rec_catalogname_1 rec_id_1 rec_name_1 Note: You can create a maximum of ten recommendations: rec_catalogid_10, rec_catalogname_10, rec_id_10, rec_name_10.
-
Configure the remaining parameters for each custom contact field.
-
Data type: Text
-
Field type: Textbox
-
Default Update Logic: Always update
-
Ensure the custom fields were added and available to view by Creating custom views.
Leave the remaining parameters blank or with the existing default value.
Optional: Create contact fields using Postman
To create the contact fields using Postman:
-
Copy the postman collection below.
-
Import the postman collection into Postman.
-
Click the collection name, then click Variables.
-
For the variables username, password, and eloqua_url, enter your Eloqua instance URL and login credentials for the CURRENT VALUE column.
-
For the variable total_recommendation, enter a value for CURRENT VALUE that represents the number of recommendations you want created (a value from 1 to 10).
-
While still in the same collection, execute the API by clicking Run.
-
After running successfully, you should see the following response.
{
"info": {
"_postman_id": "790b3cdc-8ac2-451c-afcc-e9935784c15c",
"name": "Eloqua",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Create contact rec attributes",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"let c_attrs = pm.collectionVariables.get(\"rec_attrs\");",
"let totalNoOfRec = pm.collectionVariables.get(\"total_recommendation\");",
"",
"if(!c_attrs || c_attrs.length == 0) {",
" c_attrs =[];",
" for(let i=1;i<= totalNoOfRec;i++){",
" let rec = ['rec_catalogid_','rec_catalogname_','rec_id_','rec_name_'];",
" rec.forEach(element => {",
" c_attrs.push(element.concat(i));",
" })",
" }",
"}",
"",
"let currentAttr = c_attrs.shift();",
"pm.collectionVariables.set(\"rec_attr\", currentAttr);",
"pm.collectionVariables.set(\"rec_attrs\", c_attrs);"
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"const c_attrs = pm.collectionVariables.get(\"rec_attrs\");",
"",
"if (c_attrs && c_attrs.length > 0){",
" postman.setNextRequest(\"Create contact rec attributes\");",
"} else {",
" postman.setNextRequest(null);",
"}",
"",
"pm.test(\"Status code is 201\", function () {",
" pm.response.to.have.status(201);",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{password}}",
"type": "string"
},
{
"key": "username",
"value": "{{username}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "X-HTTP-Method-Override",
"value": "SEARCH",
"type": "text",
"disabled": true
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"{{rec_attr}}\",\n \"dataType\": \"text\",\n \"displayType\": \"text\",\n \"updateType\": \"always\"\n}"
},
"url": {
"raw": "{{eloqua_url}}/api/REST/1.0/assets/contact/field",
"host": [
"{{eloqua_url}}"
],
"path": [
"api",
"REST",
"1.0",
"assets",
"contact",
"field"
]
}
},
"response": [
]
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
{
"key": "total_recommendation",
"value": "10"
},
{
"key": "username",
"value": ""
},
{
"key": "password",
"value": ""
},
{
"key": "eloqua_url",
"value": ""
}
]
}
Next steps
Configuring an Oracle Eloqua destination for Next best recommendations