How to use data prep functions for streaming data via HTTP API
Hi there,
Here is our use case: We have an event schema and in the schema there is an array field: "Status | string[]". And we send event data payload to AEP in the below format:
"_companyname": {
"user_id": "1234567",
"test_id": "123456",
"status": ['CREATED'],
},
"eventType": "test",
"producedBy": "test",
"timestamp": "2023-03-18T14:43:53.000Z",
"_id": "xxxxxxxxx"
and it works as expected, there is an event in AEP associated with the profile. But for the field 'status', if we would like to append some value to it, how should I update the payload by using these data prep functions? Or are there any other solutions? We tried the payload below, but failed. (_id is identical for both payloads)
"_companyname": {
"user_id": "1234567",
"test_id": "123456",
"status": "upsert_array_append(['UPDATED'])",
},
"eventType": "test",
"producedBy": "test",
"timestamp": "2023-03-18T14:43:53.000Z",
"_id": "xxxxxxxxx"