Agent
  • 27 Oct 2022
  • 9 Minutes to read
  • Dark
    Light

Agent

  • Dark
    Light

Article Summary

Agent

You need the Manage Agent & Agent Roles permission to manage agents.

Agent JSON Format

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

NameTypeDescription
idguidId of the agent.
emailstringAgent login email.
displayNamestringDifferent Agents can have the same Display Name. If not display name given, will be set by both first name and last name.
firstNamestringFirst name of the agent.
lastNamestringLast name of the agent.
isAdminboolWhether the agent is an administrator or not.
isActiveboolWhether the agent is active or not.
phonestringPhone number of the agent.
titlestringTitle of the agent.
biostringBio info of the agent. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content.
timeZonestringTime zone of the agent. Value includes all Time Zone Option identifiers, if not selected, will use the time zone selected in site profile.
datetimeFormatstringDate & Time format selected by agents to display on the site. Allowed values are "YYYY/MM/DD HH:mm:ss", "YYYY-MM-DD HH:mm:ss", "MM/DD/YYYY HH:mm:ss", "MM-DD-YYYY HH:mm:ss", "DD/MM/YYYY HH:mm:ss", "DD-MM-YYYY HH:mm:ss".
createdTimedatetimeTime when the agent was created.
isLockedboolWhether the account is locked or not.
lockedTimedatetimeTime when the agent account got locked.
ifCustomizeAvatarboolWhether the agent avatar is customized or not.
customizeAvatarimageCustomized avatar of agent.
systemAvatarIdguidId of system avatar.
avatarstringAvatar of the agent.
permissionIdsarrayThe list of permission identifiers.
departmentIdsarrayId of the selected agents for this department.
roleIdsarrayThe selected agents for this role.If not offered, will use role identifier of "AllAgents" as default.
skillIdsarrayThe skills for the selected agents.
superAgentIdguidThe super agent id When the agent is a super agent, "00000000-0000-0000-0000-000000000000" means agent is not a super agent.
languagestringThe control panel display language.
isDeletedboolWhether the agent is deleted or not.
externalIdstringExternal id of the thirdparty system.
shiftIdsarrayThe shifts for the selected agents.
chatbotStartTriggerActionIdsarrayThe chatbot smart trigger actions for the selected agents.
triggerIdsarrayThe chatbot smart triggers for the selected agents.
segmentIdsarrayThe segmentations for the selected agents.
isSeatboolWhether agent is counted into purchased agent license number or not.
lastLoginTimedatetimeThe time of the last login to Comm100 account(Control Panel or Agent Console).

Get the list of Agents

GET global/agents

  • Parameters:

NameTypeinRequiredDescription
keywordsstringquerynoFilter by keywords in agent display name and email.
departmentIdstringquerynoId of the department.
roleIdstringquerynoId of the role.
includestringquerynoAllowed values are "department", "role", "systemAvatar", "shift", "permission","siteAgentActivity".
  • Response:

An array of Agent

  • Example

Sample Request:

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

Response:

HTTP/1.1 200 OK

[
  {
      "avatar": "https://api11.comm100.io/Global/agents/2e4e44a0-3910-41e7-a9b5-b7cfe8f2d52d/avatar?SiteId=70000687&version=920b345dfe5d42cf0441305e5a1191dc",
      "id": "2e4e44a0-3910-41e7-a9b5-b7cfe8f2d52d",
      "superAgentId": "00000000-0000-0000-0000-000000000000",
      "email": "test@2.ccc",
      "displayName": "test Comm100",
      "firstName": "test",
      "lastName": "Comm100",
      "isAdmin": true,
      "isActive": true,
      "phone": "",
      "title": "",
      "bio": "",
      "timeZone": "Hawaiian Standard Time",
      "datetimeFormat": "YYYY/MM/DD HH:mm:ss",
      "systemAvatarId": "2d83d4fd-3114-eb11-80fc-00155d081d0b",
      "ifCustomizeAvatar": false,
      "customizeAvatar": null,
      "createdTime": "2022-06-28T07:46:57.3466667Z",
      "isLocked": false,
      "lockedTime": "1900-01-01T00:00:00Z",
      "language": "zh-CN",
      "isSeat": true,
      "isDeleted": false,
      "externalId": "",
      "permissionIds": [
          1
      ],
      "departmentIds": [
          "b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"
      ],
      "roleIds": [
          "e0bf1302-d145-eb11-8100-00155d081d0b"
      ],
     "shiftIds": [
         "3db96458-9446-466a-a0b8-49d469185825",
         "1dfd687b-68e8-4870-95e0-68052fd08bb5",
         "514fdca0-df42-4f25-b919-15633e4cd59d"
      ],
     "chatbotSmartTriggerActionIds": [
        "27147759-44f7-495e-a9ca-e49c5b58ca09"
      ],
     "triggerIds": [
        "d84427d9-6ea6-440f-8d31-3d55d98f7aff",
        "dd6e6fa6-d543-4407-8d58-6694402566bb"
      ],
     "segmentIds": [
        "7f8c4778-2126-4ff3-a4ba-9089cf24159c"
      ],
     "skillIds": [
        "ec79aeb2-d88d-46ac-b391-9d2828992224"
     ]
  }
] 

Get a single Agent

GET global/agents/{id}

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed values are "department", "role", "systemAvatar", "shift", "permission".
  • Response:

Agent

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/agents/c2c165b7-d5ce-40e5-a492-f586f514a062 \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "avatar": "https://api11.comm100.io/Global/agents/2e4e44a0-3910-41e7-a9b5-b7cfe8f2d52d/avatar?SiteId=70000687&version=920b345dfe5d42cf0441305e5a1191dc",
  "id": "2e4e44a0-3910-41e7-a9b5-b7cfe8f2d52d",
  "superAgentId": "00000000-0000-0000-0000-000000000000",
  "email": "1@2.ouath",
  "displayName": "aaa s211 -  212",
  "firstName": "aaa",
  "lastName": "s211212",
  "isAdmin": true,
  "isActive": true,
  "phone": "",
  "title": "",
  "bio": "",
  "timeZone": "Hawaiian Standard Time",
  "datetimeFormat": "YYYY/MM/DD HH:mm:ss",
  "systemAvatarId": "2d83d4fd-3114-eb11-80fc-00155d081d0b",
  "ifCustomizeAvatar": false,
  "customizeAvatar": null,
  "createdTime": "2022-06-28T07:46:57.3466667Z",
  "isLocked": false,
  "lockedTime": "1900-01-01T00:00:00Z",
  "language": "zh-CN",
  "isDeleted": false,
  "externalId": "",
  "permissionIds": [
      1
  ],
  "departmentIds": [
      "b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"
  ],
  "roleIds": [
      "e0bf1302-d145-eb11-8100-00155d081d0b"
  ],
  "shiftIds": [
         "3db96458-9446-466a-a0b8-49d469185825",
         "1dfd687b-68e8-4870-95e0-68052fd08bb5",
         "514fdca0-df42-4f25-b919-15633e4cd59d"
  ],
  "chatbotSmartTriggerActionIds": [
        "27147759-44f7-495e-a9ca-e49c5b58ca09"
  ],
  "triggerIds": [
        "d84427d9-6ea6-440f-8d31-3d55d98f7aff",
        "dd6e6fa6-d543-4407-8d58-6694402566bb"
  ],
  "segmentIds": [
        "7f8c4778-2126-4ff3-a4ba-9089cf24159c"
  ],
  "skillIds": [
        "ec79aeb2-d88d-46ac-b391-9d2828992224"
  ],
  "lastLoginTime": "2022-07-04T01:03:32.7413361Z"
} 

Create a new Agent

POST global/agents

  • Parameters:

NameTypeinRequiredDescription
emailstringbodyyesAgent login email.
passwordstringbodyyesLogin password of the agent.
displayNamestringbodyyesDifferent Agents can have the same Display Name. If not display name given, will be set by both first name and last name.
firstNamestringbodyyesFirst name of the agent.
lastNamestringbodyyesLast name of the agent.
isAdminboolbodynoWhether the agent is an administrator or not.
isActiveboolbodynoWhether the agent is active or not.
phonestringbodynoPhone number of the agent.
titlestringbodynoTitle of the agent.
biostringbodynoBio info of the agent. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content.
timeZonestringbodyyesTime zone of the agent. Value includes all Time Zone Option identifiers, if not selected, will use the time zone selected in site profile.
datetimeFormatstringbodyyesDate & Time format selected by agents to display on the site. Allowed values are "YYYY/MM/DD HH:mm:ss", "YYYY-MM-DD HH:mm:ss", "MM/DD/YYYY HH:mm:ss", "MM-DD-YYYY HH:mm:ss", "DD/MM/YYYY HH:mm:ss", "DD-MM-YYYY HH:mm:ss".
createdTimedatetimebodynoTime when the agent was created.
ifCustomizeAvatarboolbodynoWhether the agent avatar is customized or not.
customizeAvatarimagebodynoCustomized avatar of agent.
systemAvatarIdguidbodynoId of system avatar.
isLockedboolbodynoWhether the account is locked or not.
lockedTimedatetimebodynoTime when the agent account got locked.
isDeletedboolbodynoWhether the agent is deleted or not.
languagestringbodynoThe control panel display language.
superAgentIdguidbodynoThe super agent id When the agent is a super agent, "00000000-0000-0000-0000-000000000000" means agent is not a super agent.
externalIdstringbodynoExternal id of the thirdparty system.
avatarstringbodynoAvatar of the agent.
permissionIdsarraybodynoThe list of permission identifiers.
departmentIdsarraybodynoId of the selected agents for this department.
roleIdsarraybodynoThe selected agents for this role.If not offered, will use role identifier of "AllAgents" as default.
shiftIdsarraybodynoThe shifts for the selected agents.
chatbotSmartTriggerActionIdsarraybodynoThe chatbot smart trigger actions for the selected agents.
triggerIdsarraybodynoThe chatbot smart triggers for the selected agents.
segmentIdsarraybodynoThe segmentations for the selected agents.
skillIdsarraybodynoThe skills for the selected agents.
  • Response:

Agent

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/agents \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"email":"andy@comm100.com","password":"abc1234.","displayName":"Andy Liao","firstName":"Andy","lastName":"Liao","isAdmin":true,"isActive":true,"phone":"13712345678","title":"Manager","bio":"Hello, I am Andy","timeZone":"Pacific Standard Time","datetimeFormat":"YYYY/MM/DD HH:mm:ss","createdTime":"2020-12-25T06:01:00.913Z","isLocked":true,"lockedTime":"2020-12-25T06:01:00.93Z","ifCustomizeAvatar":true,"customizeAvatar":"https://dash11.comm100.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111","systemAvatarId":"1383d4fd-3114-eb11-80fc-00155d081d0b"}' 

Response:

HTTP/1.1 201 Created

{
  "avatar": "https://api11.comm100.io/v4/Global/agents/c2c165b7-d5ce-40e5-a492-f586f514a062/avatar",
  "id": "c2c165b7-d5ce-40e5-a492-f586f514a062",
  "email": "andy@comm100.com",
  "displayName": "Andy Liao",
  "firstName": "Andy",
  "lastName": "Liao",
  "isAdmin": true,
  "isActive": true,
  "phone": "13712345678",
  "title": "Manager",
  "bio": "Hello, I am Andy",
  "timeZone": "Pacific Standard Time",
  "datetimeFormat": "YYYY/MM/DD HH:mm:ss",
  "systemAvatarId": "1383d4fd-3114-eb11-80fc-00155d081d0b",
  "ifCustomizeAvatar": true,
  "customizeAvatar": "https://dash11.comm100.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111",
  "createdTime": "2020-12-25T06:01:00.913Z",
  "isLocked": false,
  "lockedTime": "2020-12-25T06:01:00.93Z",
  "isDeleted": false,
  "language": "en",
  "superAgentId": "00000000-0000-0000-0000-000000000000",
  "externalId": "",
  "permissionIds": [
      "45A2EF45-7D46-EB11-8100-00155D081D0B"
  ],
  "departmentIds": [
      "b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"
  ],
  "roleIds": [
      "e0bf1302-d145-eb11-8100-00155d081d0b"
  ],
  "shiftIds": [],
  "chatbotSmartTriggerActionIds": [],
  "triggerIds": [],
  "segmentIds": [],
  "skillIds": []
} 

Change the agent's password

POST Global/agents/{id}:changePassword

  • Parameters:

NameTypeinRequiredDescription
passwordstringbodyyesNew password of the agent.
  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/agents/edd568c2-9e9f-416c-b98b-17fb03c1ee52:changePassword \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"password":"Aa5857dksc"}' 

Response:

HTTP/1.1 200 OK

Unlock the agent

POST Global/agents/{id}:unlock

  • Parameters:

No Parameters

  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/agents/edd568c2-9e9f-416c-b98b-17fb03c1ee52:unlock \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 

Response:

HTTP/1.1 200 OK

Update the Agent

PUT global/agents/{id}

  • Parameters:

NameTypeinRequiredDescription
emailstringbodyyesAgent login email.
displayNamestringbodyyesDifferent Agents can have the same Display Name. If not display name given, will be set by both first name and last name.
firstNamestringbodyyesFirst name of the agent.
lastNamestringbodyyesLast name of the agent.
isAdminboolbodynoWhether the agent is an administrator or not.
isActiveboolbodynoWhether the agent is active or not.
phonestringbodynoPhone number of the agent.
titlestringbodynoTitle of the agent.
biostringbodynoBio info of the agent. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content.
timeZonestringbodyyesTime zone of the agent. Value includes all Time Zone Option identifiers, if not selected, will use the time zone selected in site profile.
datetimeFormatstringbodyyesDate & Time format selected by agents to display on the site. Allowed values are "YYYY/MM/DD HH:mm:ss", "YYYY-MM-DD HH:mm:ss", "MM/DD/YYYY HH:mm:ss", "MM-DD-YYYY HH:mm:ss", "DD/MM/YYYY HH:mm:ss", "DD-MM-YYYY HH:mm:ss".
systemAvatarIdguidbodynoId of system avatar.
ifCustomizeAvatarboolbodynoWhether the agent avatar is customized or not.
customizeAvatarimagebodynoCustomized avatar of agent.
createdTimedatetimebodynoTime when the agent was created.
isLockedboolbodynoWhether the account is locked or not.
lockedTimedatetimebodynoTime when the agent account got locked.
isDeletedboolbodynoWhether the agent is deleted or not.
languagestringbodynoThe control panel display language.
superAgentIdguidbodynoThe super agent id When the agent is a super agent, "00000000-0000-0000-0000-000000000000" means agent is not a super agent.
externalIdstringbodynoExternal id of the thirdparty system.
avatarstringbodynoAvatar of the agent.
permissionIdsarraybodynoThe list of permission identifiers.
departmentIdsarraybodynoId of the selected agents for this department.
roleIdsarraybodynoThe selected agents for this role.If not offered, will use role identifier of "AllAgents" as default.
shiftIdsarraybodynoThe shifts for the selected agents.
chatbotSmartTriggerActionIdsarraybodynoThe chatbot smart trigger actions for the selected agents.
triggerIdsarraybodynoThe chatbot smart triggers for the selected agents.
segmentIdsarraybodynoThe segmentations for the selected agents.
skillIdsarraybodynoThe skills for the selected agents.
  • Response:

Agent

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/agents/c2c165b7-d5ce-40e5-a492-f586f514a062 \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"email":"andy@comm100.com","displayName":"Andy Liao","firstName":"Andy","lastName":"Liao","isAdmin":true,"isActive":true,"phone":"13712345678","title":"Manager","bio":"Hello, I am Andy","timeZone":"Pacific Standard Time","datetimeFormat":"YYYY/MM/DD HH:mm:ss","createdTime":"2020-12-25T06:01:00.913Z","isLocked":true,"lockedTime":"2020-12-25T06:01:00.93Z","ifCustomizeAvatar":true,"customizeAvatar":"https://dash11.comm100.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111","systemAvatarId":"1383d4fd-3114-eb11-80fc-00155d081d0b"}' 

Response:

HTTP/1.1 200 OK

{
  "avatar": "https://api11.comm100.io/v4/Global/agents/c2c165b7-d5ce-40e5-a492-f586f514a062/avatar",
  "id": "c2c165b7-d5ce-40e5-a492-f586f514a062",
  "email": "andy@comm100.com",
  "displayName": "Andy Liao",
  "firstName": "Andy",
  "lastName": "Liao",
  "isAdmin": true,
  "isActive": true,
  "phone": "13712345678",
  "title": "Manager",
  "bio": "Hello, I am Andy",
  "timeZone": "Pacific Standard Time",
  "datetimeFormat": "YYYY/MM/DD HH:mm:ss",
  "systemAvatarId": "1383d4fd-3114-eb11-80fc-00155d081d0b",
  "ifCustomizeAvatar": true,
  "customizeAvatar": "https://dash11.comm100.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111",
  "createdTime": "2020-12-25T06:01:00.913Z",
  "isLocked": false,
  "lockedTime": "2020-12-25T06:01:00.93Z",
  "isDeleted": false,
  "language": "en",
  "superAgentId": "00000000-0000-0000-0000-000000000000",
  "externalId": "",
  "permissionIds": [
      "45A2EF45-7D46-EB11-8100-00155D081D0B"
  ],
  "departmentIds": [
      "b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"
  ],
  "roleIds": [
      "e0bf1302-d145-eb11-8100-00155d081d0b"
  ],
  "shiftIds": [],
  "chatbotSmartTriggerActionIds": [],
  "triggerIds": [],
  "segmentIds": [],
  "skillIds": []
} 

Remove the Agent

DELETE global/agents/{id}

  • Parameters:

No Parameters

  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/agents/c2c165b7-d5ce-40e5-a492-f586f514a062 \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content


Was this article helpful?