Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

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

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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


     Manoj
     Find me on LinkedIn

View solution in original post

6 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

Correct answer by
Community Advisor

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


     Manoj
     Find me on LinkedIn

Avatar

Community Advisor

@Uditgupta1  - Can you make an API call with the correct data which don't need transformation and see if you get the error

 

Thanks,

Arpan

Avatar

Employee

I can see you are attempting to perform an HTTP API update to a profile record.  xdmEntityUpdate is indication you are attempting to perform an upSert.  xdmEntity will use activity to write data upon a dataSet.

 

Are you attempting to write data upon a profile or experience dataSet?