This page provides information about the Custom Attributes API integration process for the following scenario:
Data engineers want to streamline data management processes through API integrations for daily flat file transfers. Their objective is to manage data with more flexibility and less manual tasks.
The following are the important considerations to manage and configure API integration:
When developing a fully automated solution and streamlining the process, see the API policy page to ensure the successful construction of your automated framework.
Use the following checklist to test and push a payload of email events from an ESP to CDP:
Click Add folder to create a new folder for Payload.
POST.Select Key as scheme and Value as a1user.
Post URL: https://api7-green.agilone.com/v2/*TENANTID*/dw/tracker?scheme=a1user.
The following are the URL parameters:
| Cloud Region | URL Endpoint | Parameter Description |
|---|---|---|
| AWS | api7-green.agilone.com/v2 |
|
Use the following procedure to validate data integration in the CDP:
In the left panel, check the list of entities.
This list enables API data validation through entities starting with zone.datavalidation.dw_batch_<name entity>.
Query each entity individually or combine them based on the validation requirements.
Example: Querying individual batch entities
-- Customer entity
SELECT *
FROM zone_datavalidation.dw_batch_customer;
-- Event entity
SELECT *
FROM zone_datavalidation.dw_batch_event;Example: Combining batch entities
SELECT *
FROM zone_datavalidation.dw_batch_customer AS c
LEFT JOIN zone_datavalidation.dw_batch_event AS e
ON c.customer_id = e.customer_id; -- Replace with the actual join keyUsers create a view based on the entities and validations necessary for reviewing the dataset from the API integration.
Refer to CDP referential integrity IDs to understand the primary key relationships used for table joins. This step helps to validate how entity fields align with upstream data mappings.
*TenantID indicates the path numerical identifier correlating to the tenant ID for accessing the account.
/dw/tracker indicates the path to the data warehouse (dw) that points towards a service named tracker.
scheme=a1user indicates the authentication or authorization scheme to be used. The indication to the server that the request is made under the A1User scheme may affect how the token is generated or the permissions associated with it.
Click the Headers tab.
Add Key as Content-Type and Value as application/json.
Click Body.
The following is the sample code:
{
"Events":[
{
"SourceSystemID":"ERP",
"TenantId":"465",
"Type":"StoreVisit",
"SourceCustomerNumber":"L01",
"Email":"[email protected]",
"EventTimeStamp":{{epochVariable}},
"c_eventstringattribute01":"Enrolled"
}
],
"Customers":[
{
"SourceSystemID":"ERP",
"SourceCustomerNumber":"L01",
"FirstName":"Jane",
"LastName":"Smith",
"Email":"[email protected]",
"c_customerstringattribute02":"Gold",
"c_customerdateattribute02":"2023-11-20",
"c_customerintergerattribute01":"10010",
"c_customerintergerattribute02":"9990",
"c_customerstringattribute03":"In-Store Promo"
}
]
}Click Pre-request Script and add the provided Postman script.
The system populates the current epoch date as {{epochVariable}}. For example:
function epoch (date) {
pm.collectionVariables.set("epochVariable", Date.parse(date))
console.log(pm.collectionVariables.get("epochVariable"))
}
const dateToday = new Date()
const timestamp = epoch(dateToday)The EventTimeStamp object contains the date and time when the payload is pushed to CDP.
Click Save and click Send.
For successful requests, Postman displays Status: 200 OK.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
*TenantID indicates the path numerical identifier correlating to the tenant ID for accessing the account.
/dw/tracker indicates the path to the data warehouse (dw) that points towards a service named tracker.
scheme=a1user indicates the authentication or authorization scheme to be used. The indication to the server that the request is made under the A1User scheme may affect how the token is generated or the permissions associated with it.
Click the Headers tab.
Add Key as Content-Type and Value as application/json.
Click Body.
The following is the sample code:
{
"Events":[
{
"SourceSystemID":"ERP",
"TenantId":"465",
"Type":"StoreVisit",
"SourceCustomerNumber":"L01",
"Email":"[email protected]",
"EventTimeStamp":{{epochVariable}},
"c_eventstringattribute01":"Enrolled"
}
],
"Customers":[
{
"SourceSystemID":"ERP",
"SourceCustomerNumber":"L01",
"FirstName":"Jane",
"LastName":"Smith",
"Email":"[email protected]",
"c_customerstringattribute02":"Gold",
"c_customerdateattribute02":"2023-11-20",
"c_customerintergerattribute01":"10010",
"c_customerintergerattribute02":"9990",
"c_customerstringattribute03":"In-Store Promo"
}
]
}Click Pre-request Script and add the provided Postman script.
The system populates the current epoch date as {{epochVariable}}. For example:
function epoch (date) {
pm.collectionVariables.set("epochVariable", Date.parse(date))
console.log(pm.collectionVariables.get("epochVariable"))
}
const dateToday = new Date()
const timestamp = epoch(dateToday)The EventTimeStamp object contains the date and time when the payload is pushed to CDP.
Click Save and click Send.
For successful requests, Postman displays Status: 200 OK.
If this content did not answer your questions, try searching or contacting our support team for further assistance.