AEP - Upsert | Adobe Higher Education
Skip to main content
Level 2
January 23, 2024
Beantwortet

AEP - Upsert

  • January 23, 2024
  • 1 Antwort
  • 3787 Ansichten

Hi, 

 

My data is: Email: abc@test.com, Firstname: abc, Lastname: xyz

I want to change it to:  Email: abc@test.com, Firstname: abc, Lastname: xyz, City:Pune, Address:Halli

 

Steps i followed:

1)Created a dataset.

2) Disabled for profiling

3) Enabled for profiling and upsert.

 

When i want to create a new record, i send through API. Second time i sent through Batch, Upsert works perfect.

 

But when i create a new record through api, and try to update data through api by using below,

        "operations": {

            "data": "merge"

}

It does not work. Please note that  I have only 1 identity which is email so i did not create identity dataset.

Please let me know where I am going wrong ?

 

Dieses Thema wurde für Antworten geschlossen.
Beste Antwort von brekrut

I am always getting the following error - 

"detail": "The value supplied for the 'body' field does not match your input schema. Update the 'body' value and try again.",
 
@arijitg  @abhinavbalooni - any idea on this?

Hello 

 

using upsert via an API should us the following format.

 

curl --location 'https://dcs.adobedc.net/collection/<collectionid>?synchronousValidation=true' \
--header 'Authorization: Bearer <token>' \
--header 'x-api-key: <API-KEY>' \
--header 'x-gw-ims-org-id: <org>' \
--header 'x-sandbox-name: sandbox \
--header 'x-adobe-flow-id: <flowid>' \
--header 'Content-Type: application/json' \
--data-raw '{
"header": {
"flowId" : "<flowid>",
"imsOrgId": "<oprgiID",
"datasetId": "<dataSetID>",
"operations": {
"data": "merge"
}
},
"body": {
"_<tenant>": {
<profile details>
}
}
}
}

1 Antwort

arpan-garg
Community Advisor
Community Advisor
January 24, 2024

Hi @anujabh - Does your connection url has multiple datasets associated with it? Are you already passing flowid and dataset in the header?

 

AnujaBhAutor
Level 2
January 24, 2024

Hi @arpan-garg ,

 

I am using only 1 dataset. And yes my header does have flowid and dataset id. Below is what is not working for me:

"operations":{
        "data": "merge"
    }
Example:
 
When i send email, firstname, lastname to create a record, i used "data":"create" 
then i used "data":"merge" to send, email, firstname, lastname, City. City got appended.
But when i used merge, and sent email and Zip, all other details like firstname, lastname, city got deleted and only email and zip stayed.
 
brekrut
Adobe Employee
Adobe Employee
March 1, 2024

Hi @brekrut  - Did you tried it recently? Because i tried it and i get an error 

 

{
"status": 400,
"title": "Invalid request field",
"detail": "The value supplied for the 'body' field does not match your input schema. Update the 'body' value and try again.",
"report": {
"requestId": "739424ca-6995-4cfb-b5f3-26020eae565c",
"inletId": "d17cf367c583f455ab4d5b92f8fa3e7df94ce84bb3bfa2eb218ee8e537ee8405",
"imsOrgId": "BCF356A25FBF85370A495EA3@AdobeOrg",
"xactionId": "739424ca-6995-4cfb-b5f3-26020eae565c"
}
}
 
 
"Ingestion on Experience Data Model (XDM) Entity Update messages (with JSON PATCH operations) for Profile updates via the DCS inlet has been deprecated. As an alternative, you can ingest raw data into the DCS inlet and specify the necessary data mappings to transform your data into XDM-compliant messages for Profile updates."

hello @arpan-garg 

 

Yes I have used this payload to ingest using upsert via an API.

 

You will need to specify the body of the payload inbound of the dataset.