SmsGetLastMessagesByParents¶
internal bus only, no REST route
Returns the time of the most recent message for each id in the batch. It exists for CRM lists: rendering "last contacted" for a page of 100 customers must be one query, not 100.
The method has no REST route — it is called over the bus by the CRM.
Access Control¶
Called service-to-service. The result is scoped to the brand from __access.
Request¶
{
"command": "SmsGetLastMessagesByParents",
"extID": "1",
"data": {
"sendToParentType": "CUSTOMER",
"parentIds": [
140,
141,
142
]
}
}
const res = await platform.SmsGetLastMessagesByParents({
sendToParentType: "CUSTOMER",
parentIds: [
140,
141,
142
]
});
Request Data¶
| Field | Type | Required | Description |
|---|---|---|---|
sendToParentType |
enum | Yes | CUSTOMER, MANAGER, or LEAD |
parentIds |
array | Yes | Ids to look up; duplicates and non-positive values are ignored |
Response Data¶
Ids that were never messaged are absent from both rows and map — an absent key means "never", which is different from a null timestamp.
{
"rows": [
{ "sendToParentId": 140, "lastSmsTime": "2026-08-24 13:32:41" },
{ "sendToParentId": 142, "lastSmsTime": "2026-08-19 10:02:11" }
],
"map": {
"140": "2026-08-24 13:32:41",
"142": "2026-08-19 10:02:11"
}
}
Errors¶
| Code | Error | Description |
|---|---|---|
500 |
INTERNAL_ERROR |
Storage error |