curl --request POST \
--url https://api.sandbox.asapp.com/metadata-ingestion/v1/many-convo-metadata \
--header 'Content-Type: application/json' \
--header 'asapp-api-id: <api-key>' \
--header 'asapp-api-secret: <api-key>' \
--data @- <<EOF
{
"items": [
{
"externalConversationId": "id-1389",
"eventId": "eventId-1388",
"lobId": "1038",
"lobName": "manufacturing",
"groupId": "group59",
"groupName": "groupXYZ",
"agentRoutingCode": "route-13988",
"campaign": "campaign-A",
"deviceType": "TABLET",
"platform": "IOS",
"companySegment": [
"Sales",
"Marketing"
],
"companySubdivision": "operating",
"businessRule": "Apply customer's discount",
"entryType": "reactive",
"operatingSystem": "MAC_OS",
"browserType": "Safari",
"browserVersion": "14.1.2",
"attributes": [
{
"name": "attr1_name",
"value": "attr1_value"
},
{
"name": "attr2_name",
"value": "attr2_value"
}
]
},
{
"externlConversationId": "issue1390",
"eventId": "eventId-1268",
"lobId": "930",
"lobName": "retail",
"groupId": "store-93",
"groupName": "PlazaA",
"agentRoutingCode": "route-1983",
"campaign": "campaign-B",
"deviceType": "PHONE",
"platform": "ANDROID",
"companySegment": [
"SALES",
"FINANCE"
],
"companySubdivision": "operating",
"businessRule": "Apply customer's discount",
"entryType": "proactive",
"operatingSystem": "ANDROID",
"browserType": "Chrome",
"browserVersion": "103.0.5060.128",
"attributes": [
{
"name": "attr1_name",
"value": "attr1_value"
},
{
"name": "attr2_name",
"value": "attr2_value"
}
]
}
]
}
EOF{
"errorCount": 1,
"results": [
{
"eventId": "5484e507-feaf-11ec-bfc1-fda566fa9333",
"error": "FAIL_BAD_PARAMS: ERROR: agent id cannot be blank"
},
{
"eventId": "fcf99667-feaf-11ec-a42e-11799134528c",
"error": ""
}
]
}Add multiple issue/conversation metadata items; submit items in a batch in one request
curl --request POST \
--url https://api.sandbox.asapp.com/metadata-ingestion/v1/many-convo-metadata \
--header 'Content-Type: application/json' \
--header 'asapp-api-id: <api-key>' \
--header 'asapp-api-secret: <api-key>' \
--data @- <<EOF
{
"items": [
{
"externalConversationId": "id-1389",
"eventId": "eventId-1388",
"lobId": "1038",
"lobName": "manufacturing",
"groupId": "group59",
"groupName": "groupXYZ",
"agentRoutingCode": "route-13988",
"campaign": "campaign-A",
"deviceType": "TABLET",
"platform": "IOS",
"companySegment": [
"Sales",
"Marketing"
],
"companySubdivision": "operating",
"businessRule": "Apply customer's discount",
"entryType": "reactive",
"operatingSystem": "MAC_OS",
"browserType": "Safari",
"browserVersion": "14.1.2",
"attributes": [
{
"name": "attr1_name",
"value": "attr1_value"
},
{
"name": "attr2_name",
"value": "attr2_value"
}
]
},
{
"externlConversationId": "issue1390",
"eventId": "eventId-1268",
"lobId": "930",
"lobName": "retail",
"groupId": "store-93",
"groupName": "PlazaA",
"agentRoutingCode": "route-1983",
"campaign": "campaign-B",
"deviceType": "PHONE",
"platform": "ANDROID",
"companySegment": [
"SALES",
"FINANCE"
],
"companySubdivision": "operating",
"businessRule": "Apply customer's discount",
"entryType": "proactive",
"operatingSystem": "ANDROID",
"browserType": "Chrome",
"browserVersion": "103.0.5060.128",
"attributes": [
{
"name": "attr1_name",
"value": "attr1_value"
},
{
"name": "attr2_name",
"value": "attr2_value"
}
]
}
]
}
EOF{
"errorCount": 1,
"results": [
{
"eventId": "5484e507-feaf-11ec-bfc1-fda566fa9333",
"error": "FAIL_BAD_PARAMS: ERROR: agent id cannot be blank"
},
{
"eventId": "fcf99667-feaf-11ec-a42e-11799134528c",
"error": ""
}
]
}A request to send more than one conversation metadata attributes; send a list of items
1 - 1000 elementsShow child attributes
Conversation ID from the external chat / voice system
256"issue1389"
An event id used to track the submission; if none is provided, service will generate one
256"eventId-1388"
The line of business id
256"1038"
The descriptive name of the line of business
256"manufacturing"
The group id of which the agent belong to
256"group59"
The descriptive name of the group
256"groupXYZ"
The agent's routing attribute
256"route-13988"
The activities related to the issue
256"campaign-A"
The client's device type
TABLET, PHONE, DESKTOP, WATCH, OTHER "TABLET"
The client's platform type WAB: WhatsApp Business
SMS, WEB, IOS, ANDROID, APP, LOCAL, VOICE, VOICE_IOS, VOICE_ANDROID, VOICE_ECHO, VOICE_HOMEPOD, VOICE_GGLHOME, VOICE_WEB, APPLEBIZ, GOOGLEBIZ, GBM, WAB "IOS"
The company's segment of which the issue belongs to
64["Sales", "Marketing"]The company's subdivision of which the issue belongs to
256"Operating"
The business rule to use
256"Apply customer's discount"
The way the issue started and created in the system
256"reactive"
The operating system used to enter the issue
MAC_OS, LINUX, WINDOWS, ANDROID, IOS, OTHER "MAC_OS"
The browser type used
64"Safari"
The browser version used
16"14.1.2"
A map of key-value pairs for extra metadata attributes
10[
{
"name": "attr1_name",
"value": "attr1_value"
},
{
"name": "attr2_name",
"value": "attr2_value"
}
]200 - Success | Partial Success Submit a batch of items to the service to be ingested. Record can be traced back to the submitted record by the eventId. If any of the records encounter issue during the ingestion, a message sent status will be returned with an error message for each record. A 200 success is returned as long as there is one item ingested successfully, i.e., "partial success".
Number of message sent with error(s)
A list of send result
Show child attributes
An UUID identifier string computed for the submitted event message
"5484e507-feaf-11ec-bfc1-fda566fa9333"
Status of the failed message if value is not blank; the error is contained in the string
"FAIL_BAD_PARAMS: ERROR: agent id cannot be blank"
Was this page helpful?