I'm Currently working on API Triggered campaign with in AJO and migrating Adobe V7 Realtime message center campaigns to AJO, when I'm trying to replicate the below JavaScript logic from ACC to AJO
Help me with any references or code snippets to transfer below ACC logic to AJO PQL Query logic
Logic:
<% var sections = rtEvent.ctx.complexVariables.sections;
for each (var section in sections){
if(section.sectionName.toString().toLowerCase() == "dealer information" && section.bucketName.toString().indexOf("DLR_") != -1)
{
var dealerBucketName = section.bucketName.toString();
var dealerSectionName = section.sectionName.toString().toLowerCase();
}
else if(section.sectionName.toString().toLowerCase() == "dealer information" && section.bucketName.toString().indexOf("DLR_") == -1){
var dealerBucketName = '';
}
}%>
Expected API JSON Payload:
"context": {
"eventinfo": {
"sections": [
{
"sectionName": "Pressure",
"bucketName": "TPM_4",
"status": "GREEN"
},
{
"sectionName": "Maintenance",
"bucketName": "SM_6",
"status": "GREEN"
},
{
"sectionName": "Recall",
"bucketName": "RC_X",
"status": ""
},
{
"sectionName": "Information",
"bucketName": "DLR_3",
"status": ""
},
{
"sectionName": "Service Plan",
"bucketName": "DC",
"status": "GREEN"
},
{
"sectionName": "Connected Plan",
"bucketName": "C0",
"status": "GREEN"
},
{
"sectionName": "SiriusXM",
"bucketName": "0",
"status": ""
},
{
"sectionName": "Data Plan",
"bucketName": "WD_0",
"status": ""
}
],