Profile Ingestion using Streaming HTTP API | Community
Skip to main content
Level 3
April 29, 2024
Solved

Profile Ingestion using Streaming HTTP API

  • April 29, 2024
  • 2 replies
  • 1569 views

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.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Manoj_Kumar

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

2 replies

Manoj_Kumar
Community Advisor
Community Advisor
April 30, 2024

@uditgupta1 

 

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

Manoj  | https://themartech.pro
Level 3
May 2, 2024

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.

NimashaJain
Adobe Employee
Adobe Employee
May 13, 2024

@_manoj_kumar_ Can you guide further?

arpan-garg
Community Advisor
Community Advisor
May 22, 2024

@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

brekrut
Adobe Employee
Adobe Employee
May 22, 2024

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?