Hi! I started to using Create a banch of emails API endpoint from Engagements V3 and started to noticed that data not returning in the order that I sent it.
For example, here is a request body:
“inputs”: [
{
“properties”: {
“hs_timestamp”: “2022-09-05T16:37:43Z”,
“hubspot_owner_id”: null,
“hs_email_direction”: “EMAIL”,
“hs_email_status”: “SENT”,
“hs_email_subject”: “Subject 0”,
“hs_email_text”: “text 0”,
“hs_email_headers”: null
}
},
{
“properties”: {
“hs_timestamp”: “2022-09-05T16:37:43Z”,
“hubspot_owner_id”: null,
“hs_email_direction”: “EMAIL”,
“hs_email_status”: “SENT”,
“hs_email_subject”: “Subject 1”,
“hs_email_text”: “text 1”,
“hs_email_headers”: null
}
}
}
It gives me response with something like that:
{
“status”: “COMPLETE”,
“results”: [
{
“id”: “25414471200”,
“properties”: {
“hs_body_preview”: “text 1”,
“hs_body_preview_html”: “text 1”,
“hs_body_preview_is_truncated”: “false”,
“hs_email_direction”: “EMAIL”,
“hs_email_status”: “SENT”,
“hs_email_subject”: “Subject 1”,
“hs_email_text”: “text 1”,
“hs_lastmodifieddate”: “2022-09-07T11:03:38.976Z”,
“hs_object_id”: “25414471261”,
“hs_timestamp”: “2022-09-05T16:37:43Z”
},
“createdAt”: “2022-09-07T11:03:38.976Z”,
“updatedAt”: “2022-09-07T11:03:38.976Z”,
“archived”: false
},
{
“id”: “25414471260”,
“properties”: {
“hs_body_preview”: “text 0”,
“hs_body_preview_html”: “text 0”,
“hs_email_direction”: “EMAIL”,
“hs_email_status”: “SENT”,
“hs_email_subject”: “Subject 0”,
“hs_email_text”: “text 0”,
“hs_lastmodifieddate”: “2022-09-07T11:03:38.976Z”,
“hs_timestamp”: “2022-09-05T16:37:43Z”
},
“createdAt”: “2022-09-07T11:03:38.976Z”,
“updatedAt”: “2022-09-07T11:03:38.976Z”,
“archived”: false
}
],
“startedAt”: “2022-09-07T11:03:38.955Z”,
“completedAt”: “2022-09-07T11:03:39.103Z”
}
I increased the amount of engagements in the request and it seems like response data returned random, without any order.
Is there any way to return the response in some order, so I could link it to the request data for association in the next request? How should I know which one created engagement is linked to one of my tasks in request? It’s crucial for us before starting to use engagements v3 API.
Can anyone advice me or give more information?
Thanks for your answer!![]()