Hi Jason,
Sample JSON:
{
"id": "7c63e9c4-c841-4971-82c9-fa4d42c9b419",
"conversationId": "4667c3de-87da-4cc0-b33f-d39cf7489a1b",
"startTime": "2024-01-30T07:03:37.444Z",
"endTime": "2024-01-30T08:57:41.391Z",
"media": "message",
"annotations": [],
"messagingTranscript": [
{
"from": "7b646d9c-fe8d-41df-aff8-5a20e478a7b0",
"fromExternalContact": {
"id": "74a557aa-ff41-4209-931a-7a8f025f032a",
"modifyDate": "2024-01-30T07:03:37Z",
"createDate": "2024-01-30T07:03:37Z",
"selfUri": "/api/v2/externalcontacts/contacts/74a557aa-ff41-4209-931a-7a8f025f032a"
},
"to": "b18c1163-d342-4072-b2ae-b84079bbc326",
"timestamp": "2024-01-30T07:03:36.890Z",
"id": "ec32a0748e61a3e084f862a3e42ff52b",
"purpose": "customer",
"participantId": "0fefc503-0f9b-4a5b-817f-e25be2d7f304",
"queue": {
"id": "1689f212-8c27-4c47-9c70-eb1b24616851",
"selfUri": "/api/v2/routing/queues/1689f212-8c27-4c47-9c70-eb1b24616851"
},
"events": [
{
"eventType": "Presence",
"presence": {
"type": "Join"
}
}
]
},
{
"from": "b18c1163-d342-4072-b2ae-b84079bbc326",
"to": "7b646d9c-fe8d-41df-aff8-5a20e478a7b0",
"timestamp": "2024-01-30T07:03:37.938Z",
"id": "720f929f77868291a15066907aaf3098",
"purpose": "workflow",
"participantId": "6760b165-b7a2-4564-867c-b511ac25d502",
"workflow": {
"id": "c3d28ea7-71c0-4c17-ae27-00f71fd5654c",
"selfUri": "/api/v2/flows/c3d28ea7-71c0-4c17-ae27-00f71fd5654c"
},
"messageText": "Hi There, an Agent will be with you soon"
},
{
"from": "b18c1163-d342-4072-b2ae-b84079bbc326",
"fromUser": {
"id": "328ffebb-076b-4068-9bab-f1ded1771628",
"name": "Dewald Smit",
"username": "dewald.smit@altron.com",
"images": [
{
"resolution": "x96",
"imageUri": "https://prod-euw1-inin-directory-service-profile.s3-eu-west-1.amazonaws.com/a63f424e/a7f1/4c74/b9c2/d6e402a71ac2.jpg"
},
{
"resolution": "x128",
"imageUri": "https://prod-euw1-inin-directory-service-profile.s3-eu-west-1.amazonaws.com/3bf216bf/7ca0/4877/ad39/28e0a551caf4.jpg"
},
{
"resolution": "x200",
"imageUri": "https://prod-euw1-inin-directory-service-profile.s3-eu-west-1.amazonaws.com/ad8161a5/21ff/497a/8409/d559fb12186c.jpg"
},
{
"resolution": "x48",
"imageUri": "https://prod-euw1-inin-directory-service-profile.s3-eu-west-1.amazonaws.com/68a8f90d/2c61/4830/96a4/78088a7b71e6.jpg"
},
{
"resolution": "x300",
"imageUri": "https://prod-euw1-inin-directory-service-profile.s3-eu-west-1.amazonaws.com/74244a87/112a/414e/a401/241994e93a4b.jpg"
},
{
"resolution": "x400",
"imageUri": "https://prod-euw1-inin-directory-service-profile.s3-eu-west-1.amazonaws.com/548dc779/2be6/4798/865d/222f7dac76fa.jpg"
}
],
"selfUri": "/api/v2/users/328ffebb-076b-4068-9bab-f1ded1771628"
},
"to": "7b646d9c-fe8d-41df-aff8-5a20e478a7b0",
"timestamp": "2024-01-30T08:57:41.401Z",
"id": "908e0e35025dbfd5bacd2bccc09aabd7",
"purpose": "agent",
"participantId": "fb648416-c1a5-4e88-912c-9c9cd2bdab3d",
"queue": {
"id": "1689f212-8c27-4c47-9c70-eb1b24616851",
"selfUri": "/api/v2/routing/queues/1689f212-8c27-4c47-9c70-eb1b24616851"
},
"events": [
{
"eventType": "Presence",
"presence": {
"type": "Disconnect"
}
}
]
}
],
What I would like to achieve in a workflow, is to send an agentless email with the messageText and purpose, aka Message Transcript, in the email body.
Build the email body from the array of objects.