Expand my Community achievements bar.

Profile Ingestion using Streaming HTTP API

Avatar

Level 3

Hi there,

 

I've set up a http api source which feeds data into a dataset. I've tried sending a sample payload via API, and I keep getting this error in the dataset UI:

 

The transformed message is empty. Please check the mapping set...

 
I want to update the profile parameter's like firstname and lastname when user submit the form. My Primary key is email and below is my sample payload-

var url = "https://dcs.adobedc.net/collection/xyz";


// Building the JSON payload with header and body configurations.
var json = {
header: {
msgType: "xdmEntityUpdate",
datasetId: "65a----------",
imsOrgId: "73D-------@AdobeOrg",
source: {
name: "web",
},
sandboxName: "abc",
schemaRef: {
id: "https://ns.adobe.com/spnam/schemas/weed9",
contentType: "application/json",
},
},
body: {
xdmMeta: {
schemaRef: {
id: "https://ns.adobe.com/spnam/schemas/weed9",
contentType: "application/json",
},
},
xdmEntityUpdates: {

"customerID": _satellite.getVar('customerID'),
"firstName": _satellite.getVar('firstName'),
"lastName": _satellite.getVar('lastName'),
"personID": _satellite.getVar('customerID'),
"email": _satellite.getVar('emailID'),
"gender": _satellite.getVar('gender'),
"city": _satellite.getVar('city'),
"country": _satellite.getVar('country'),
"mobile": _satellite.getVar('mobile'),
"ecid": _satellite.getVar('ECID'),
},
},
};

// Creating and sending an XMLHttpRequest.
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4) { // Check if request is complete.
if (this.status == 200) {
console.log("Success");
} else {
console.error("Request failed with status: " + this.status + " and response: " + this.responseText);
}
}
};
xhttp.open("POST", url, true); // Asynchronous call.
xhttp.setRequestHeader("Content-type", "application/json");
xhttp.send(JSON.stringify(json)); // Send the JSON payload as a string.

Attaching my mapping dataset also.

Uditgupta1_0-1714371195850.png

 

4 Replies

Avatar

Community Advisor

@Uditgupta1 

 

Do you see all required values populated in the payload when someone updates their information?


     Manoj
     Find me on LinkedIn

Avatar

Level 3

Yes @Manoj_Kumar_  they are getting populated in the payload and I can see them in the Network logs also but still this error is coming.

Avatar

Community Advisor

@Uditgupta1  Check the streaming connection (HTTP API) for any mis match in the payload and mappings.


     Manoj
     Find me on LinkedIn