Chat
  • 12 Jan 2024
  • 17 Minutes to read
  • Dark
    Light

Chat

  • Dark
    Light

Article summary

Chat JSON Format

Chat is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idintegerId of the chat.
sessionIdguidId of the session.
startTimedatetimeTime when the chat started.
endTimedatetimeTime when the chat ended.
isQueuedboolWhether the chat is queued or not.
ifAudioChatHappenedboolWhether audio chat happened during the live chat session or not.
ifVideoChatHappenedboolWhether video chat happened during the live chat session or not.
statusstringAllowed values are 0("normal"), 1("refused"), 2("missed").
messagesstringMessages of the chat.
requestingPageTitlestringPage title of the requesting page.
requestingPageURLstringPage URL of the requesting page.
sourcestringAllowed values are 0("chatButton"), 1("autoInvitation"), 2("manualInvitation").
autoInvitationIdguidId of the auto invitation.
preChatSocialMediaSourceintegerAllowed values are 0("none"), 1("facebook").
preChatSocialProfileURLstringPre-chat social profile URL of the chat.
preChatNamestringPre-chat name of the chat.
preChatEmailstringPre-chat email of the chat.
preChatPhonestringPre-chat phone of the chat.
preChatCompanystringPre-chat company of the chat.
preChatProductServicestringPre-chat product service of the chat.
preChatTicketIdintegerId of the ticket to which this chat is attached.
departmentIdguidId of the department.
skillIdguidId of the skill.
requestedTimedatetimeThe time when the chat is requested.
avgResponseTimefloatThe average response time of the chat.
visitorMessagesCountintegerThe number of messages sent by visitors.
agentMessagesCountintegerThe number of messages sent by agents.
campaignIdguidId of the campaign.
waitingTimeintegerThe waiting time before the chat got accepted/missed.
durationintegerThe duration of the chat.
cannedMessageCountintegerThe number of canned messages sent during the chat.
botDurationintegerThe bot duration of the chat.
agentDurationintegerThe agent duration of the chat.
lastMessageSentBystringAllowed values are 0("visitor"), 1("agent"), 2("system"), 3("chatBot").
botIdguidId of the bot.
guidguidGuid of the chat.
visitorIdguidId of the visitor.
contactIdentityIdguidId of the contact identity.
chatAgentschatAgents[]Reference to .
chatTypestringType of the chat. 0("agentOnly"), 1("chatBotOnly"), 2("fromBotToAgent"), 3("chatBot"), 4("fromBottoOfflineMessage"), 32("taskBotOnly")

Chat Agent JSON Format:

NameTypeDescription
chatIdintegerId of the chat.
agentIdguidId of the agent.
startTimedatetimeTime when the chat started.
endTimedatetimeTime when the chat ended.
durationintegerDuration of the chat.
idintegerContent of the custom page.

Chat Field Result JSON Format

Chat Field Result is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idselfIncrementIdId of the chat field result.
chatIdintegerId of the chat which the chat field result belongs to.
formTypestringForm field type of the chat field result.Allowed values are "preChat", "offlineMessage", "postChat", "wrapUp", "pciForm", "customVariable".
fieldIdguidId of the field which the chat field result belongs to.
fieldNamestringName of the field which the chat field result belongs to.
valuestringValue of the chat field result.
urlstringUrl of the chat field result.

Get a single Chat

GET livechat/chats/{id}

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAvailable values for Include are: "autoInvitation", "campaign", "chatAgent", "chatChatbotMap","chatAttachment", "chatFieldResult", "chatSegmentResult", "chatWrapup", "chatWrapupCategory", "contactIdentity", "department", "postChatSurvey", "session", "skill", "visitor".
idinteger or guidpathyesId of the chat or Guid of the chat.
  • Response:

Chat

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/chats/4875 \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "id": 4875,
  "guid": "2efc01b2-b7c1-40a9-b049-b0db9fbc4dbc",
  "sessionId": "f8383a83-48e9-4d0d-a3bd-fb19ce5c12db",
  "visitorId": "e11203f5-1d97-4c48-8fc2-fc6257d4e13b",
  "contactIdentityId": "00000000-0000-0000-0000-000000000000",
  "startTime": "2021-04-27T07:50:28.753Z",
  "endTime": "2021-04-27T08:01:29.003Z",
  "status": "normal",
  "requestingPageTitle": "Preview",
  "requestingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=bd8fc603-6d63-49e2-b594-db015c221b40&siteId=10000&q=1619509862473",
  "preChatSocialMediaSource": 0,
  "preChatSocialProfileURL": "",
  "preChatName": "1",
  "preChatEmail": "1@1.com",
  "preChatProductService": "",
  "preChatPhone": "",
  "preChatCompany": "",
  "preChatTicketId": -1,
  "departmentId": "00000000-0000-0000-0000-000000000000",
  "skillId": "00000000-0000-0000-0000-000000000000",
  "requestedTime": "2021-04-27T07:50:28.7533333Z",
  "offlineMessageId": 0,
  "avgResponseTime": 6.0,
  "visitorMessagesCount": 1,
  "agentMessagesCount": 4,
  "campaignId": "bd8fc603-6d63-49e2-b594-db015c221b40",
  "lastMessageSentBy": "agent",
  "duration": "00:11:00",
  "source": "chatButton",
  "waitingTime": "00:00:00",
  "autoInvitationId": "00000000-0000-0000-0000-000000000000",
  "botDuration": "00:00:00",
  "agentDuration": "00:11:00",
  "botId": "00000000-0000-0000-0000-000000000000",
  "chatType": "agentOnly",
  "messages": [
      {
          "chatAction": "agentAcceptChat",
          "message": "Agent may1 may has joined the chat.",
          "senderType": "system",
          "senderName": "",
          "time": "2021-04-27T07:50:29Z",
          "translatedMessage": "",
          "attachment": ""
      },
      {
          "chatAction": "visitorAddTextMessage",
          "message": "13",
          "senderType": "visitor",
          "senderName": "1",
          "time": "2021-04-27T08:00:15Z",
          "translatedMessage": "",
          "attachment": ""
      },
      {
          "chatAction": "agentSendText",
          "message": "123",
          "senderType": "agent",
          "senderName": "may1 may",
          "time": "2021-04-27T08:00:21Z",
          "translatedMessage": "",
          "attachment": ""
      },
      {
          "chatAction": "agentSendText",
          "message": "1223",
          "senderType": "agent",
          "senderName": "may1 may",
          "time": "2021-04-27T08:00:23Z",
          "translatedMessage": "",
          "attachment": ""
      },
      {
          "chatAction": "agentSendNoteText",
          "message": "hello",
          "senderType": "agent",
          "senderName": "may1 may",
          "time": "2021-04-27T08:01:01Z",
          "translatedMessage": "",
          "attachment": ""
      },
      {
          "chatAction": "agentSendNoteText",
          "message": "hello",
          "senderType": "agent",
          "senderName": "may1 may",
          "time": "2021-04-27T08:01:03Z",
          "translatedMessage": "",
          "attachment": ""
      },
      {
          "chatAction": "agentSendText",
          "message": "12321",
          "senderType": "agent",
          "senderName": "may1 may",
          "time": "2021-04-27T08:01:12Z",
          "translatedMessage": "",
          "attachment": ""
      },
      {
          "chatAction": "agentSendNoteFile",
          "message": "Agent may1 may has sent a file: Chats_20210305 (5).csv",
          "senderType": "agent",
          "senderName": "https://api11.comm100.io/FileService/v1/files/H7UXY7FigsxUUInQBoKTqn4QYq9yanARl5jD2iZzSD-ZZQm_A4X_QhFkvatVYg9ljsmPfllZ6LAF0JkxfJoiSAqko0HU35tUkKqTJlmltzUAb2-scyNlY7Z7EvRyJsYpDZIOgscGydXov-X3zJ6vtzB51_fEGdnrEhbrBXwI9pww?Chats_20210305 (5).csv?may1 may",
          "time": "2021-04-27T08:01:20Z",
          "translatedMessage": "",
          "attachment": "H7UXY7FigsxUUInQBoKTqn4QYq9yanARl5jD2iZzSD-ZZQm_A4X_QhFkvatVYg9ljsmPfllZ6LAF0JkxfJoiSAqko0HU35tUkKqTJlmltzUAb2-scyNlY7Z7EvRyJsYpDZIOgscGydXov-X3zJ6vtzB51_fEGdnrEhbrBXwI9pww"
      },
      {
          "chatAction": "agentSendText",
          "message": "31232312",
          "senderType": "agent",
          "senderName": "may1 may",
          "time": "2021-04-27T08:01:23Z",
          "translatedMessage": "",
          "attachment": ""
      },
      {
          "chatAction": "agentEndChat",
          "message": "Agent may1 may has left the chat.",
          "senderType": "agent",
          "senderName": "",
          "time": "2021-04-27T08:01:29Z",
          "translatedMessage": "",
          "attachment": ""
      },
      {
          "chatAction": "systemEndChat",
          "message": "The chat is ended.",
          "senderType": "system",
          "senderName": "",
          "time": "2021-04-27T08:01:29Z",
          "translatedMessage": "",
          "attachment": ""
      }
  ]
} 

Attach to Ticket

POST livechat/chats/{id}:AttachToTicket

  • Parameters:

NameTypeinRequiredDescription
idintpathyesId of the chat.
utcOffsetintbodynoUTC Offset of the user.
targetIdintegerbodyyesId of the ticket to which this chat is attached.
dateTimeFormatstringbodynoDatetime format of the user.
  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/chats/1:AttachToTicket \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"targetId":"2858","utcOffset":-420,"datetimeFormat":"YYYY/MM/DD HH:mm:ss"}' 

Response:

HTTP/1.1 200 OK

Search Chats

POST livechat/chats:Search

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAvailable values for Include are: "autoInvitation", "campaign", "chatAgent", "chatAttachment", "chatFieldResult", "chatSegmentResult", "chatWrapup", "chatWrapupCategory", "contactIdentity", "department", "postChatSurvey", "session", "skill", "visitor".
pageIndexintegerquerynoPage index.
filtersarraybodynoFilter array. Available items are: requestedTime, departmentId, skillId, agent, chatChatbotMap.botId, categoryOptionId, keywords and other custom filters.
nameoperatornote
requestedTimeisRequested Time, selected time range, e.g., ["2024-01-11T00:00:00+08:00", "2024-01-12T00:00:00+08:00"]
departmentIdis/isNotDepartment, selected department id, e.g., ["3ed53140-8cc9-4149-9ee6-5b3f0a44c822"]
skillIdis/isNotSkill, selected skill id, e.g., ["ae99aa1e-eb77-4546-942f-2f590e4c7b5d"]
agentis/existsAgent, selected agent id, e.g., ["fe99111e-eb77-4546-942f-2f590e4c7b5d"]. When operator is exists, the value should be [""]
chatChatbotMap.botIdis/isNotBot, selected bot id, e.g., ["7184f6f3-0d13-4bd1-a55b-a4c21f375d9b"]
categoryOptionIdis/exists/notExistsCategory, selected category option id, e.g., ["09dfb586-4692-4b09-a815-c541337d59da"]
keywordsisKeywords, input string, e.g., ["Comm100"]
campaignisOneOf/isNotOneOf/contains/notContains/regularExpressionCampaign, selected campaign id(s) array, e.g., ["87441e0b-056f-4008-b455-b6e1e9098c91"]
durationis/isMoreThan/isLessThanDuration, selected int, e.g., [1]. The unit of the value is second.
preChatNamecontains/notContainsName, input string, e.g., ["Kate"]
preChatEmailcontains/notContainsEmail, input string, e.g., ["kate@comm100.com"]
preChatPhonecontains/notContainsPhone, input string, e.g., ["800231111"]
preChatCompanycontains/notContainsCompany, input string, e.g., ["comm100"]
preChatProductServiceis/isNotProduce Service, selected string, e.g., ["Support"]
guidis/isNotChat ID, input chat guid, e.g., ["09dfb586-4692-4b09-a815-c541337d59da"]
chatTypeis/isNotChat Type, selected chat type enum int value, e.g., ["0"]
{!postChatSurvey.ratingGrade}is/isNot/exists/notExistsRating, selected rating int value array, e.g., ["1"]
{!postChatSurvey.ratingComment}contains/notContains/isNot/isRating Comment, input string, e.g., ["Kate Comment"]
{!botSentimentRecord.veryNegativeCount}is/isNot/isMoreThan/isLessThanCounts of Very Negative, selected int value, e.g., ["0"]
{!botSentimentRecord.negativeCount}is/isNot/isMoreThan/isLessThanCounts of Negative, selected int value, e.g., ["0"]
{!chatWrapup.comment}contains/notContainsAgent Comment, input string, e.g., ["Comm100 Comment"]
{!chatSegmentResult.segmentId}is/isNotSegment, selected segment id, e.g., ["ec174891-73bd-4267-8e53-530ae510d343"]
autoInvitationIdis/isNotAuto Invitation, selected auto invitation id, e.g., ["71b1b61a-c905-484a-aacf-155a50e65bd8"]
{!transferLog.fromDepartmentId}is/isNotTransferred-out Department, selected department id, e.g., ["71b1b61a-c905-484a-aacf-155a50e65bd8"]
{!transferLog.toDepartmentId}is/isNotTransferred-in Department, selected department id, e.g., ["71b1b61a-c905-484a-aacf-155a50e65bd8"]
transferredis/isNotTransferred, selected value, e.g., ["true"] or ["false"]
{!transferLog.transferType}is/isNotCross-site Transferred-in, the value should be ["10"]
{!transferLog.transferType}is/isNotCross-site Transferred-out, the value should be ["6"]
ssoUserIdisSSO User Id, input string, e.g., ["jasonSso"]
statusis/isNotChat Status, selected status enum int value, e.g., ["0"]
sourceis/isNotChat Source, selected source enum int value, e.g., ["0"]
lastMessageSentByis/isNotLast Message Sent By, selected last message sentBy enum int value, e.g., ["0"]
Other custom filter, allowed values are all fields of chat, pre-chat, post-chat, wrap-up, custom variable.Allowed values are "is", "contains", "notContains", "isMoreThan", "isLessThan", "isNot", "isNotLessThan", "isNotMoreThan", "regularExpression", "isOneOf", "isNotIn", e.g., contains.Input value for this filter, e.g., ["Comm100"].
pageSizeintegerquerynoPage size. The available value is from 10 to 500, and the default value is 50.
  • Response:

An array of Chat

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/chats:search \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"filters":[{"name":"requestedTime","operator":"is","value":["2021-04-01T00:00:00+08:00","2021-05-09T00:00:00+08:00"]},{"name":"keywords","operator":"is","value":["file"]},{"name":"departmentId","operator":"is","value":["397eed79-f3a3-4d7c-ab9b-29c78e5bf152"]},{"name":"skillId","operator":"is","value":["6908B37E-A023-47DC-A24C-08246C2BF22A"]},{"name":"botId","operator":"is","value":["2f5e6532-4aeb-4f5f-89ae-596b97c3e662"]},{"name":"agent","operator":"is","value":["9ce9d087-fe54-4e48-a593-d82ea01b99ae"]},{"name":"categoryOptionId","operator":"is","value":["96d4431e-ed3e-4bb1-b2c0-1b3a18169838"]}]}' 

Response:

HTTP/1.1 200 OK

{
  "total": 4,
  "pageCount": 1,
  "list": [
      {
          "id": 4878,
          "guid": "17d3c22b-ddd4-4b35-8d52-4cea650386a0",
          "sessionId": "57b267a0-f8d8-4e0d-ad8f-3bab8cee9f5e",
          "visitorId": "e11203f5-1d97-4c48-8fc2-fc6257d4e13b",
          "contactIdentityId": "00000000-0000-0000-0000-000000000000",
          "startTime": "2021-04-27T08:52:04.88Z",
          "endTime": "2021-04-27T08:59:30.847Z",
          "status": "normal",
          "requestingPageTitle": "Preview",
          "requestingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=bd8fc603-6d63-49e2-b594-db015c221b40&siteId=10000&q=1619509862473",
          "preChatSocialMediaSource": 0,
          "preChatSocialProfileURL": "",
          "preChatName": "1",
          "preChatEmail": "1@1.com",
          "preChatProductService": "",
          "preChatPhone": "",
          "preChatCompany": "",
          "preChatTicketId": -1,
          "departmentId": "00000000-0000-0000-0000-000000000000",
          "skillId": "00000000-0000-0000-0000-000000000000",
          "requestedTime": "2021-04-27T08:52:04.88Z",
          "offlineMessageId": 0,
          "avgResponseTime": 0.0,
          "visitorMessagesCount": 0,
          "agentMessagesCount": 0,
          "campaignId": "bd8fc603-6d63-49e2-b594-db015c221b40",
          "lastMessageSentBy": "system",
          "duration": "00:07:25",
          "source": "chatButton",
          "waitingTime": "00:00:00",
          "autoInvitationId": "00000000-0000-0000-0000-000000000000",
          "botDuration": "00:00:00",
          "agentDuration": "00:07:25",
          "botId": "00000000-0000-0000-0000-000000000000",
          "chatType": "agentOnly",
          "messages": [
              {
                  "chatAction": "agentAcceptChat",
                  "message": "Agent may1 may has joined the chat.",
                  "senderType": "system",
                  "senderName": "",
                  "time": "2021-04-27T08:52:05Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentEndChat",
                  "message": "Agent may1 may has left the chat.",
                  "senderType": "agent",
                  "senderName": "",
                  "time": "2021-04-27T08:59:31Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "systemEndChat",
                  "message": "The chat is ended.",
                  "senderType": "system",
                  "senderName": "",
                  "time": "2021-04-27T08:59:31Z",
                  "translatedMessage": "",
                  "attachment": ""
              }
          ],
          "session": {
              "id": "57b267a0-f8d8-4e0d-ad8f-3bab8cee9f5e",
              "visitorId": "e11203f5-1d97-4c48-8fc2-fc6257d4e13b",
              "contactIdentityId": "00000000-0000-0000-0000-000000000000",
              "ip": "192.168.2.128",
              "referrerURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=bd8fc603-6d63-49e2-b594-db015c221b40&siteId=10000",
              "searchEngineId": "00000001-0000-0000-0000-000000000001",
              "keywords": "",
              "landingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=bd8fc603-6d63-49e2-b594-db015c221b40&siteId=10000&q=1619509862473",
              "landingPageTitle": "",
              "startTime": "2021-04-27T08:50:31.8333333Z",
              "browser": "Google Chrome 86.0.4240.75",
              "operatorSystem": "Windows 8.1",
              "screenResolution": "1680x1050",
              "language": "zh-CN",
              "timeZone": "-480"
          }
      },
      {
          "id": 4879,
          "guid": "94a5836a-cab6-4b30-99d7-24492fc756a2",
          "sessionId": "57b267a0-f8d8-4e0d-ad8f-3bab8cee9f5e",
          "visitorId": "e11203f5-1d97-4c48-8fc2-fc6257d4e13b",
          "contactIdentityId": "00000000-0000-0000-0000-000000000000",
          "startTime": "2021-04-27T08:50:33.863Z",
          "endTime": "2021-04-27T08:50:52.317Z",
          "status": "normal",
          "requestingPageTitle": "Preview",
          "requestingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=bd8fc603-6d63-49e2-b594-db015c221b40&siteId=10000&q=1619509862473",
          "preChatSocialMediaSource": 0,
          "preChatSocialProfileURL": "",
          "preChatName": "1",
          "preChatEmail": "1@1.com",
          "preChatProductService": "",
          "preChatPhone": "",
          "preChatCompany": "",
          "preChatTicketId": -1,
          "departmentId": "00000000-0000-0000-0000-000000000000",
          "skillId": "00000000-0000-0000-0000-000000000000",
          "requestedTime": "2021-04-27T08:50:33.8633333Z",
          "offlineMessageId": 0,
          "avgResponseTime": 0.0,
          "visitorMessagesCount": 0,
          "agentMessagesCount": 0,
          "campaignId": "bd8fc603-6d63-49e2-b594-db015c221b40",
          "lastMessageSentBy": "system",
          "duration": "00:00:18",
          "source": "chatButton",
          "waitingTime": "00:00:00",
          "autoInvitationId": "00000000-0000-0000-0000-000000000000",
          "botDuration": "00:00:00",
          "agentDuration": "00:00:18",
          "botId": "00000000-0000-0000-0000-000000000000",
          "chatType": "agentOnly",
          "messages": [
              {
                  "chatAction": "agentAcceptChat",
                  "message": "Agent may1 may has joined the chat.",
                  "senderType": "system",
                  "senderName": "",
                  "time": "2021-04-27T08:50:34Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentEndChat",
                  "message": "Agent may1 may has left the chat.",
                  "senderType": "agent",
                  "senderName": "",
                  "time": "2021-04-27T08:50:52Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "systemEndChat",
                  "message": "The chat is ended.",
                  "senderType": "system",
                  "senderName": "",
                  "time": "2021-04-27T08:50:52Z",
                  "translatedMessage": "",
                  "attachment": ""
              }
          ],
          "session": {
              "id": "57b267a0-f8d8-4e0d-ad8f-3bab8cee9f5e",
              "visitorId": "e11203f5-1d97-4c48-8fc2-fc6257d4e13b",
              "contactIdentityId": "00000000-0000-0000-0000-000000000000",
              "ip": "192.168.2.128",
              "referrerURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=bd8fc603-6d63-49e2-b594-db015c221b40&siteId=10000",
              "searchEngineId": "00000001-0000-0000-0000-000000000001",
              "keywords": "",
              "landingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=bd8fc603-6d63-49e2-b594-db015c221b40&siteId=10000&q=1619509862473",
              "landingPageTitle": "",
              "startTime": "2021-04-27T08:50:31.8333333Z",
              "browser": "Google Chrome 86.0.4240.75",
              "operatorSystem": "Windows 8.1",
              "screenResolution": "1680x1050",
              "language": "zh-CN",
              "timeZone": "-480"
          }
      },
      {
          "id": 4877,
          "guid": "67d71d4b-8a6f-45fd-afa8-f158473ec125",
          "sessionId": "2db8f0e0-b040-46fb-821d-4e45149ac03e",
          "visitorId": "e11203f5-1d97-4c48-8fc2-fc6257d4e13b",
          "contactIdentityId": "00000000-0000-0000-0000-000000000000",
          "startTime": "2021-04-27T08:36:27.833Z",
          "endTime": "2021-04-27T08:37:05.737Z",
          "status": "normal",
          "requestingPageTitle": "Preview",
          "requestingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=bd8fc603-6d63-49e2-b594-db015c221b40&siteId=10000&q=1619509862473",
          "preChatSocialMediaSource": 0,
          "preChatSocialProfileURL": "",
          "preChatName": "1",
          "preChatEmail": "1@1.com",
          "preChatProductService": "",
          "preChatPhone": "",
          "preChatCompany": "",
          "preChatTicketId": -1,
          "departmentId": "00000000-0000-0000-0000-000000000000",
          "skillId": "00000000-0000-0000-0000-000000000000",
          "requestedTime": "2021-04-27T08:36:27.8333333Z",
          "offlineMessageId": 0,
          "avgResponseTime": 14.0,
          "visitorMessagesCount": 5,
          "agentMessagesCount": 8,
          "campaignId": "bd8fc603-6d63-49e2-b594-db015c221b40",
          "lastMessageSentBy": "agent",
          "duration": "00:00:37",
          "source": "chatButton",
          "waitingTime": "00:00:00",
          "autoInvitationId": "00000000-0000-0000-0000-000000000000",
          "botDuration": "00:00:00",
          "agentDuration": "00:00:37",
          "botId": "00000000-0000-0000-0000-000000000000",
          "chatType": "agentOnly",
          "messages": [
              {
                  "chatAction": "agentAcceptChat",
                  "message": "Agent may1 may has joined the chat.",
                  "senderType": "system",
                  "senderName": "",
                  "time": "2021-04-27T08:36:28Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "visitorAddTextMessage",
                  "message": "12312",
                  "senderType": "visitor",
                  "senderName": "1",
                  "time": "2021-04-27T08:36:34Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "visitorAddTextMessage",
                  "message": "3123",
                  "senderType": "visitor",
                  "senderName": "1",
                  "time": "2021-04-27T08:36:35Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "visitorAddTextMessage",
                  "message": "1",
                  "senderType": "visitor",
                  "senderName": "1",
                  "time": "2021-04-27T08:36:35Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "visitorAddTextMessage",
                  "message": "2",
                  "senderType": "visitor",
                  "senderName": "1",
                  "time": "2021-04-27T08:36:35Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "visitorAddTextMessage",
                  "message": "3",
                  "senderType": "visitor",
                  "senderName": "1",
                  "time": "2021-04-27T08:36:35Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentSendText",
                  "message": "1123",
                  "senderType": "agent",
                  "senderName": "may1 may",
                  "time": "2021-04-27T08:36:48Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentSendText",
                  "message": "1",
                  "senderType": "agent",
                  "senderName": "may1 may",
                  "time": "2021-04-27T08:36:48Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentSendText",
                  "message": "3",
                  "senderType": "agent",
                  "senderName": "may1 may",
                  "time": "2021-04-27T08:36:49Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentSendText",
                  "message": "12",
                  "senderType": "agent",
                  "senderName": "may1 may",
                  "time": "2021-04-27T08:36:49Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentSendText",
                  "message": "312",
                  "senderType": "agent",
                  "senderName": "may1 may",
                  "time": "2021-04-27T08:36:49Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentSendNoteText",
                  "message": "123",
                  "senderType": "agent",
                  "senderName": "may1 may",
                  "time": "2021-04-27T08:36:52Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentSendNoteText",
                  "message": "123",
                  "senderType": "agent",
                  "senderName": "may1 may",
                  "time": "2021-04-27T08:36:52Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentSendNoteText",
                  "message": "213",
                  "senderType": "agent",
                  "senderName": "may1 may",
                  "time": "2021-04-27T08:36:53Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentSendText",
                  "message": "123",
                  "senderType": "agent",
                  "senderName": "may1 may",
                  "time": "2021-04-27T08:37:00Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentSendNoteFile",
                  "message": "Agent may1 may has sent a file: Chats_20210305 (3).csv",
                  "senderType": "agent",
                  "senderName": "https://api11.comm100.io/FileService/v1/files/O3A-0OGU4YfeDSfxx18KSW47USwMn320HQE7jYN15mq0HfqkyAW3_n-JR1FWRhJjoUqXD2arP7osQvkWOBklHguXo5B867K7Mgi9u-Aqn3fW7GoouxmtGezbRHQu4Y8g4iazi-JVtVnBip_KPLdijL3iNmA_lCvn57ClwTsnQWfQ?Chats_20210305 (3).csv?may1 may",
                  "time": "2021-04-27T08:37:01Z",
                  "translatedMessage": "",
                  "attachment": "O3A-0OGU4YfeDSfxx18KSW47USwMn320HQE7jYN15mq0HfqkyAW3_n-JR1FWRhJjoUqXD2arP7osQvkWOBklHguXo5B867K7Mgi9u-Aqn3fW7GoouxmtGezbRHQu4Y8g4iazi-JVtVnBip_KPLdijL3iNmA_lCvn57ClwTsnQWfQ"
              },
              {
                  "chatAction": "agentSendText",
                  "message": "123",
                  "senderType": "agent",
                  "senderName": "may1 may",
                  "time": "2021-04-27T08:37:01Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentSendText",
                  "message": "123",
                  "senderType": "agent",
                  "senderName": "may1 may",
                  "time": "2021-04-27T08:37:02Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentEndChat",
                  "message": "Agent may1 may has left the chat.",
                  "senderType": "agent",
                  "senderName": "",
                  "time": "2021-04-27T08:37:06Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "systemEndChat",
                  "message": "The chat is ended.",
                  "senderType": "system",
                  "senderName": "",
                  "time": "2021-04-27T08:37:06Z",
                  "translatedMessage": "",
                  "attachment": ""
              }
          ],
          "session": {
              "id": "2db8f0e0-b040-46fb-821d-4e45149ac03e",
              "visitorId": "e11203f5-1d97-4c48-8fc2-fc6257d4e13b",
              "contactIdentityId": "00000000-0000-0000-0000-000000000000",
              "ip": "192.168.2.128",
              "referrerURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=bd8fc603-6d63-49e2-b594-db015c221b40&siteId=10000",
              "searchEngineId": "00000001-0000-0000-0000-000000000001",
              "keywords": "",
              "landingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=bd8fc603-6d63-49e2-b594-db015c221b40&siteId=10000&q=1619509862473",
              "landingPageTitle": "",
              "startTime": "2021-04-27T08:36:25.8Z",
              "browser": "Google Chrome 86.0.4240.75",
              "operatorSystem": "Windows 8.1",
              "screenResolution": "1680x1050",
              "language": "zh-CN",
              "timeZone": "-480"
          }
      },
      {
          "id": 4875,
          "guid": "2efc01b2-b7c1-40a9-b049-b0db9fbc4dbc",
          "sessionId": "f8383a83-48e9-4d0d-a3bd-fb19ce5c12db",
          "visitorId": "e11203f5-1d97-4c48-8fc2-fc6257d4e13b",
          "contactIdentityId": "00000000-0000-0000-0000-000000000000",
          "startTime": "2021-04-27T07:50:28.753Z",
          "endTime": "2021-04-27T08:01:29.003Z",
          "status": "normal",
          "requestingPageTitle": "Preview",
          "requestingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=bd8fc603-6d63-49e2-b594-db015c221b40&siteId=10000&q=1619509862473",
          "preChatSocialMediaSource": 0,
          "preChatSocialProfileURL": "",
          "preChatName": "1",
          "preChatEmail": "1@1.com",
          "preChatProductService": "",
          "preChatPhone": "",
          "preChatCompany": "",
          "preChatTicketId": -1,
          "departmentId": "00000000-0000-0000-0000-000000000000",
          "skillId": "00000000-0000-0000-0000-000000000000",
          "requestedTime": "2021-04-27T07:50:28.7533333Z",
          "offlineMessageId": 0,
          "avgResponseTime": 6.0,
          "visitorMessagesCount": 1,
          "agentMessagesCount": 4,
          "campaignId": "bd8fc603-6d63-49e2-b594-db015c221b40",
          "lastMessageSentBy": "agent",
          "duration": "00:11:00",
          "source": "chatButton",
          "waitingTime": "00:00:00",
          "autoInvitationId": "00000000-0000-0000-0000-000000000000",
          "botDuration": "00:00:00",
          "agentDuration": "00:11:00",
          "botId": "00000000-0000-0000-0000-000000000000",
          "chatType": "agentOnly",
          "messages": [
              {
                  "chatAction": "agentAcceptChat",
                  "message": "Agent may1 may has joined the chat.",
                  "senderType": "system",
                  "senderName": "",
                  "time": "2021-04-27T07:50:29Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "visitorAddTextMessage",
                  "message": "13",
                  "senderType": "visitor",
                  "senderName": "1",
                  "time": "2021-04-27T08:00:15Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentSendText",
                  "message": "123",
                  "senderType": "agent",
                  "senderName": "may1 may",
                  "time": "2021-04-27T08:00:21Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentSendText",
                  "message": "1223",
                  "senderType": "agent",
                  "senderName": "may1 may",
                  "time": "2021-04-27T08:00:23Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentSendNoteText",
                  "message": "hello",
                  "senderType": "agent",
                  "senderName": "may1 may",
                  "time": "2021-04-27T08:01:01Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentSendNoteText",
                  "message": "hello",
                  "senderType": "agent",
                  "senderName": "may1 may",
                  "time": "2021-04-27T08:01:03Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentSendText",
                  "message": "12321",
                  "senderType": "agent",
                  "senderName": "may1 may",
                  "time": "2021-04-27T08:01:12Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentSendNoteFile",
                  "message": "Agent may1 may has sent a file: Chats_20210305 (5).csv",
                  "senderType": "agent",
                  "senderName": "https://api11.comm100.io/FileService/v1/files/H7UXY7FigsxUUInQBoKTqn4QYq9yanARl5jD2iZzSD-ZZQm_A4X_QhFkvatVYg9ljsmPfllZ6LAF0JkxfJoiSAqko0HU35tUkKqTJlmltzUAb2-scyNlY7Z7EvRyJsYpDZIOgscGydXov-X3zJ6vtzB51_fEGdnrEhbrBXwI9pww?Chats_20210305 (5).csv?may1 may",
                  "time": "2021-04-27T08:01:20Z",
                  "translatedMessage": "",
                  "attachment": "H7UXY7FigsxUUInQBoKTqn4QYq9yanARl5jD2iZzSD-ZZQm_A4X_QhFkvatVYg9ljsmPfllZ6LAF0JkxfJoiSAqko0HU35tUkKqTJlmltzUAb2-scyNlY7Z7EvRyJsYpDZIOgscGydXov-X3zJ6vtzB51_fEGdnrEhbrBXwI9pww"
              },
              {
                  "chatAction": "agentSendText",
                  "message": "31232312",
                  "senderType": "agent",
                  "senderName": "may1 may",
                  "time": "2021-04-27T08:01:23Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "agentEndChat",
                  "message": "Agent may1 may has left the chat.",
                  "senderType": "agent",
                  "senderName": "",
                  "time": "2021-04-27T08:01:29Z",
                  "translatedMessage": "",
                  "attachment": ""
              },
              {
                  "chatAction": "systemEndChat",
                  "message": "The chat is ended.",
                  "senderType": "system",
                  "senderName": "",
                  "time": "2021-04-27T08:01:29Z",
                  "translatedMessage": "",
                  "attachment": ""
              }
          ],
          "session": {
              "id": "f8383a83-48e9-4d0d-a3bd-fb19ce5c12db",
              "visitorId": "e11203f5-1d97-4c48-8fc2-fc6257d4e13b",
              "contactIdentityId": "00000000-0000-0000-0000-000000000000",
              "ip": "192.168.2.128",
              "referrerURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=bd8fc603-6d63-49e2-b594-db015c221b40&siteId=10000",
              "searchEngineId": "00000001-0000-0000-0000-000000000001",
              "keywords": "",
              "landingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=bd8fc603-6d63-49e2-b594-db015c221b40&siteId=10000&q=1619509862473",
              "landingPageTitle": "",
              "startTime": "2021-04-27T07:50:25.41Z",
              "browser": "Google Chrome 86.0.4240.75",
              "operatorSystem": "Windows 8.1",
              "screenResolution": "1680x1050",
              "language": "zh-CN",
              "timeZone": "-480"
          }
      }
  ],
  "pageIndex": 0,
  "pageSize": 50
} 

Search Missed & Refused Chats

POST livechat/missedAndRefusedChats:Search

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAvailable values for Include are: "campaign", "chatAgent", "chatWrapupCategory", "contactIdentity", "department", "skill".
pageSizeintegerquerynoPage size.
pageIndexintegerquerynoPage index.
filtersarraybodynoFilter array. Available items are: requestedTime, departmentId, skillId, status, campaignId, segmentId.
  • Response:

An array of Chat

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/missedAndRefusedChats:search?pageIndex=1&pageSize=50 \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"filters":[{"name":"requestedTime","operator":"is","value":["2021-04-21T00:00:00-07:00","2021-05-06T00:00:00-07:00"]}]}' 

Response:

HTTP/1.1 200 OK

{
  "total": 1,
  "pageCount": 1,
  "list": [
      {
          "id": 3868,
          "guid": "1715e7d4-bbab-4abd-8e45-65a36995fd4b",
          "sessionId": "0a98bc2f-4b31-4928-b537-c8c06cc345d0",
          "visitorId": "178abc2f-5e4c-43ef-9ddd-a94f054b9380",
          "contactIdentityId": "00000000-0000-0000-0000-000000000000",
          "startTime": "2021-04-21T09:03:59.13Z",
          "endTime": "2021-04-21T09:50:36.88Z",
          "status": "missed",
          "requestingPageTitle": "Preview",
          "requestingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=8586fecc-312e-46cb-b1a6-9e9c68c0276f&siteId=10000&q=1618995815097",
          "preChatSocialMediaSource": 0,
          "preChatSocialProfileURL": "",
          "preChatName": "192.168.2.128",
          "preChatEmail": "",
          "preChatProductService": "",
          "preChatPhone": "",
          "preChatCompany": "",
          "preChatTicketId": -1,
          "departmentId": "45bc6136-1652-4eba-b27f-5d9b42f997fe",
          "skillId": "00000000-0000-0000-0000-000000000000",
          "requestedTime": "2021-04-21T09:03:59.13Z",
          "offlineMessageId": 0,
          "avgResponseTime": 0.0,
          "visitorMessagesCount": 0,
          "agentMessagesCount": 0,
          "campaignId": "8586fecc-312e-46cb-b1a6-9e9c68c0276f",
          "lastMessageSentBy": "system",
          "duration": "00:00:00",
          "source": "chatButton",
          "waitingTime": "00:46:37",
          "autoInvitationId": "00000000-0000-0000-0000-000000000000",
          "botDuration": "00:00:00",
          "agentDuration": "00:00:00",
          "botId": "00000000-0000-0000-0000-000000000000",
          "chatType": "agentOnly",
          "messages": [
              {
                  "chatAction": "systemPromoteOfflineMesage",
                  "message": "If you do not want to wait, please click here to leave us a message.",
                  "senderType": "system",
                  "senderName": "",
                  "time": "2021-04-21T09:04:01Z",
                  "translatedMessage": "",
                  "attachment": ""
              }
          ],
          "session": {
              "id": "0a98bc2f-4b31-4928-b537-c8c06cc345d0",
              "visitorId": "178abc2f-5e4c-43ef-9ddd-a94f054b9380",
              "contactIdentityId": "00000000-0000-0000-0000-000000000000",
              "ip": "192.168.2.128",
              "referrerURL": "",
              "searchEngineId": "00000001-0000-0000-0000-000000000001",
              "keywords": "",
              "landingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=8586fecc-312e-46cb-b1a6-9e9c68c0276f&siteId=10000&q=1618995815097",
              "landingPageTitle": "",
              "startTime": "2021-04-21T09:03:48.8166667Z",
              "browser": "Google Chrome 59.0.3071.115",
              "operatorSystem": "Windows 8.1",
              "screenResolution": "1920x1080",
              "language": "en-US",
              "timeZone": "-480"
          }
      }
  ],
  "pageIndex": 0,
  "pageSize": 50
} 

Update the Chat Ticket

PUT livechat/chats/{id}

  • Parameters:

NameTypeinRequiredDescription
preChatTicketIdintegerbodyyesId of the ticket to which this chat is attached.
idintegerqueryyesId of the chat.
  • Response:

Chat

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/chats/1 \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"preChatTicketId":2234}' 

Response:

HTTP/1.1 200 OK

{
  "id": 1,
  "sessionId": "F3B25329-7C46-EB11-8100-00155D081D0B",
  "startTime": "2021-04-28T09:15:01.71Z",
  "endTime": "2021-04-28T09:18:01.71Z",
  "isQueued": false,
  "ifAudioChatHappened": false,
  "ifVideoChatHappened": false,
  "status": "normal",
  "messages": "[ { \"chatAction\": \"agentAcceptChat\", \"message\": \"Agent may1 may has joined the chat.\", \"senderType\": \"system\", \"senderName\": \"\", \"time\": \"2021-04-27T08:52:05Z\", \"translatedMessage\": \"\", \"attachment\": \"\" }, { \"chatAction\": \"agentEndChat\", \"message\": \"Agent may1 may has left the chat.\", \"senderType\": \"agent\", \"senderName\": \"\", \"time\": \"2021-04-27T08:59:31Z\", \"translatedMessage\": \"\", \"attachment\": \"\" }, { \"chatAction\": \"systemEndChat\", \"message\": \"The chat is ended.\", \"senderType\": \"system\", \"senderName\": \"\", \"time\": \"2021-04-27T08:59:31Z\", \"translatedMessage\": \"\", \"attachment\": \"\" } ]",
  "requestingPageTitle": "",
  "requestingPageURL": "",
  "source": "chatButton",
  "autoInvitationId": "FEB25329-7C46-EB11-8100-00155D081D0B",
  "preChatSocialMediaSource": "none",
  "preChatSocialProfileURL": "",
  "preChatName": "Jason",
  "preChatEmail": "jason@comm100.com",
  "preChatPhone": "1234567890",
  "preChatCompany": "Comm1000",
  "preChatProductService": "product 1",
  "preChatTicketId": 2234,
  "departmentId": "00000000-0000-0000-0000-000000000000",
  "skillId": "00000000-0000-0000-0000-000000000000",
  "requestedTime": "2021-04-28T09:14:37.3366667Z",
  "avgResponseTime": 50,
  "visitorMessagesCount": 10,
  "agentMessagesCount": 10,
  "campaignId": "0DB35329-7C46-EB11-8100-00155D081D0B",
  "waitingTime": 0,
  "duration": 0,
  "cannedMessageCount": 0,
  "botDuration": 0,
  "agentDuration": 0,
  "lastMessageSentBy": "0",
  "botId": "14B35329-7C46-EB11-8100-00155D081D0B",
  "guid": "C2B35329-7C46-EB11-8100-00155D081D0B",
  "visitorId": "E6B35329-7C46-EB11-8100-00155D081D0B",
  "contactIdentityId": "EEB35329-7C46-EB11-8100-00155D081D0B",
  "chatAgents": [
      {
          "chatId": "82DF661D-5F9F-4E2E-B694-23957239051E",
          "agentId": "5D32C07E-5348-49B8-8D58-0DCEAD683712",
          "startTime": "2021-04-28",
          "endTime": "2021-04-29",
          "duration": 5,
          "id": 1
      }
  ]
} 

Batch Delete Chats

DELETE livechat/chats

  • Parameters:

NameTypeinRequiredDescription
Request bodyjson stringbodyyesInteger Id array of the chats.
  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/chats \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -D '[3867,3862,3861]' 

Response:

HTTP/1.1 200 OK

Delete a single Chat

DELETE livechat/chats/{id}

  • Parameters:

NameTypeinRequiredDescription
idintegerpathyesInteger Id of the chat.
  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/chats/1 \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content

Chat Wrapup Category JSON Format

Chat Wrapup Category is represented as simple flat JSON objects with the following keys:

NameTypeDescription
chatIdintegerId of the chat which the wrap-up category belongs to.
categoryOptionIdguidId of the category option which the wrap-up category belongs to.
idselfIncrementIdId of the chat wrap-up category.

Get the list of Chat Wrapup Categories

GET livechat/chatWrapupCategories

  • Parameters:

No Parameters

  • Response:

An array of Chat Wrapup Category

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/chatWrapupCategories \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

[
  {
      "chatId": "9B5FBC95-DEE1-4D0A-B75F-DB06B602F3A3",
      "categoryOptionId": "9549C2C8-23DC-4DAB-87FF-5A0790A4301B",
      "id": 1
  }
] 

Get a single Chat Wrapup Category

GET livechat/chatWrapupCategories/{id}

  • Parameters:

No Parameters

  • Response:

Chat Wrapup Category

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/chatWrapupCategories/1 \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "chatId": "9B5FBC95-DEE1-4D0A-B75F-DB06B602F3A3",
  "categoryOptionId": "9549C2C8-23DC-4DAB-87FF-5A0790A4301B",
  "id": 1
} 

Update Chat Wrapup Category

POST livechat/chats/{id}/ChatWrapupCategories

  • Parameters:

NameTypeinRequiredDescription
categoryOptionIdguidbodyyesId of the Category Option which the Chat Wrapup Category belongs to
idguidbodyyesChat guid of the Chat which the Chat Wrapup Category belongs to
  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/chats/84d76adc-83f4-42c9-b06d-1b617076a3a7/chatWrapupCategories \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"categoryOptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"}' 

Response:

HTTP/1.1 200 OK

Chat Wrap-up JSON Format

Chat Wrap-up is represented as simple flat JSON objects with the following keys:

NameTypeDescription
chatIdintegerId of the chat.
agentIdguidId of the agent.
commentstringComment of the wrap-up.
lastUpdatedTimetimestampLast updated time of the warp-up.

Update the Chat Wrapup

PUT livechat/chats/{id}/chatWrapup

  • Parameters:

NameTypeinRequiredDescription
commentstringbodynoComment of the wrap-up.
idintqueryyesId of the chat.
  • Response:

Chat Wrap-up

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/chats/12/chatWrapup \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"comment":""}' 

Response:

HTTP/1.1 200 OK

{
  "chatId": 12,
  "agentId": "1AB35329-7C46-EB11-8100-00155D081D0B",
  "comment": "",
  "lastUpdatedTime": "2021-04-28T09:14:37.3366667Z"
} 

Update Chat Wrapup Field Results

POST livechat/chatFieldResults

  • Parameters:

An array of chat field results

NameTypeinRequiredDescription
chatIdintbodyyesId of the chat which the chat field result belongs to.
fieldNamestringbodynoFiled name of the chat field result.
valuestringbodyyesValue of the chat field result.
fieldIdguidbodyyesId of the field which the chat field result belongs to.
formTypestringbodynoForm field type of the chat field result,only allowed "wrapup"
  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/chatFieldResults \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '[{
    "formType": "wrapup",
    "fieldId": "d983d5c6-15cc-4ad1-ba2a-12e77b337566",
    "fieldName": "Temporary field",
    "chatId": 11
  }]' 

Response:

HTTP/1.1 200 OK


Was this article helpful?