Agent

Prev Next

You need the Manage Site permission to manage agents.

Agent JSON Format

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

Name Type Description
id guid Id of the agent.
externalId string External Id of the agent.
email string Agent login email.
language string Agent language.
displayName string Different Agents can have the same Display Name. If the display name is not set, it uses the combination of first name and last name.
firstName string First name of the agent.
lastName string Last name of the agent.
isAdmin bool Whether the agent is an administrator or not.
isActive bool Whether the agent is active or not.
phone string Phone number of the agent.
title string Title of the agent.
bio string Bio info of the agent. You can pass both plain text and base64-encoded text. If the request containing plain-text is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content.
timeZone string Time zone of the agent. The values include all Time Zone Option identifiers. The time zone of the agent uses the time zone of the site if not configured.
datetimeFormat string Date & 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".
createdTime datetime Time when the agent was created.
isLocked bool Whether the account is locked or not.
lockedTime datetime Time when the agent account got locked.
ifCustomizeAvatar bool Whether the agent avatar is customized or not.
customizeAvatar image Customized avatar of agent.
systemAvatarId guid Id of system avatar.
avatar string Avatar of the agent.
language string The language of agent.
superAgentId guid The super agent id When the agent is a super agent, "00000000-0000-0000-0000-000000000000" means agent is not a super agent.
permissionIds array The list of permission identifiers.
departmentIds array IDs of the departments where the agent belongs to.
roleIds array IDs of the roles that the agent have.
isDeleted bool Whether the agent is deleted or not.
isSeat bool Whether agent is counted into purchased agent license number or not.
shiftIds array The shifts for the selected agents.
chatbotSmartTriggerActionIds array The chatbot smart trigger actions for the selected agents.
triggerIds array The chatbot smart triggers for the selected agents.
segmentIds array The segmentations for the selected agents.
skillIds array The skills for the selected agents.
lastLoginTime datetime The time of the last login to Comm100 account(Control Panel or Agent Console).

Get site Agents

GET global/agents

  • Parameters:

Name Type in Required Description
siteId integer query yes Id of the site.
keywords string query no Filter by keywords in agent display name and email.
externalId string query no External Id of the Agent.
departmentId string query no Id of the department.
roleId string query no Id of the role.
include string query no Allowed values are "department", "role", "systemAvatar", "shift", "permission","siteAgentActivity".
  • Response:

An array of Agent

  • Example

Sample Request:

curl https://partnerapi.comm100.io/v4/global/sites/100/agents?include=siteAgentActivity 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

[
  {
      "id": "c2c165b7-d5ce-40e5-a492-f586f514a062",
      "externalId":"DA2E1FF1-A151-4FFE-9701-C1C8F234C632",
      "email": "andy@comm100.com",
      "displayName": "Andy Liao",
      "firstName": "Andy",
      "lastName": "Liao",
      "isAdmin": true,
      "language": "en",
      "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",
      "siteAgentActivity": {
            "siteAgentId": "e308d6ff-fb4f-4b5c-93ff-f415cd45eebf",
            "siteId": 100000064,
            "lastLoginTime": "2022-07-04T08:15:03.7024205Z",
            "isDeleted": false
      },
      "isDeleted": false,
      "language": "en",
      "superAgentId": "00000000-0000-0000-0000-000000000000",
      "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",
      "avatar": "https://api11.comm100.io/v4/Global/agents/c2c165b7-d5ce-40e5-a492-f586f514a062/avatar",
      "permissionIds": [
          "45A2EF45-7D46-EB11-8100-00155D081D0B"
      ],
      "departmentIds": [
          "b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"
      ],
      "roleIds": [
          "e0bf1302-d145-eb11-8100-00155d081d0b"
      ],
      "shiftIds": [],
      "chatbotSmartTriggerActionIds": [],
      "triggerIds": [],
      "segmentIds": [],
      "skillIds": [],
      "lastLoginTime": "2022-07-04T08:15:03.7024205Z",
      "isSeat": true
  }
] 

Get a single Agent

GET global/agents/{id}

  • Parameters:

Name Type in Required Description
siteId integer query yes Id of the site.
include string query no Allowed values are "department", "role", "systemAvatar", "shift", "permission".
  • Response:

Agent

  • Example

Sample Request:

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

Response:

HTTP/1.1 200 OK

{
  "id": "c2c165b7-d5ce-40e5-a492-f586f514a062",
  "externalId":"DA2E1FF1-A151-4FFE-9701-C1C8F234C632",
  "email": "andy@comm100.com",
  "displayName": "Andy Liao",
  "firstName": "Andy",
  "lastName": "Liao",
  "isAdmin": true,
  "isActive": true,
  "phone": "13712345678",
  "language": "en",
  "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",
  "avatar": "https://api11.comm100.io/v4/Global/agents/c2c165b7-d5ce-40e5-a492-f586f514a062/avatar",
  "isDeleted": false,
  "language": "en",
  "superAgentId": "00000000-0000-0000-0000-000000000000",
  "permissionIds": [
      "45A2EF45-7D46-EB11-8100-00155D081D0B"
  ],
  "departmentIds": [
      "b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"
  ],
  "roleIds": [
      "e0bf1302-d145-eb11-8100-00155d081d0b"
  ],
  "shiftIds": [],
  "chatbotSmartTriggerActionIds": [],
  "triggerIds": [],
  "segmentIds": [],
  "skillIds": [],
  "lastLoginTime": "2022-07-04T08:15:03.7024205Z"
} 

Create a new Agent

POST global/agents

  • Parameters:

Name Type in Required Description
siteId integer query yes Id of the site.
externalId string body no External Id of the Agent.
language string body yes Agent language.
email string body yes Agent login email.
password string body yes Login password of the agent.
displayName string body yes Different Agents can have the same Display Name. If the display name is not set, it uses the combination of first name and last name.
firstName string body yes First name of the agent.
lastName string body yes Last name of the agent.
isAdmin bool body no Whether the agent is an administrator or not.
isActive bool body no Whether the agent is active or not.
phone string body no Phone number of the agent.
title string body no Title of the agent.
bio string body no Bio 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.
timeZone string body yes Time zone of the agent. The values include all Time Zone Option identifiers. The time zone of the agent uses the time zone of the site if not configured.
datetimeFormat string body yes Date & 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".
createdTime datetime body no Time when the agent was created.
isLocked bool body no Whether the account is locked or not.
lockedTime datetime body no Time when the agent account got locked.
ifCustomizeAvatar bool body no Whether the agent avatar is customized or not.
customizeAvatar image body no Customized avatar of the agent.
systemAvatarId guid body no ID of system avatar.
avatar string body no Avatar of the agent.
permissionIds array body no The list of permission identifiers.
departmentIds array body no IDs of the departments where the agent belongs to.
roleIds array body no IDs of the roles that the agent have.
skillIds array body no The skills for the selected agents.
isDeleted bool body no Whether the agent is deleted or not.
  • Response:

Agent

  • Example

Sample Request:

curl https://partnerapi.comm100.io/v4/global/agents?siteId=100 \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"email":"test1@comm100.com", "language":"en", "password":"111111.", "displayName":"Andyiao","firstName":"test","lastName":"comm","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":"2022-12-25T06:01:00.913Z","ifCustomizeAvatar":false,"customizeAvatar":"","systemAvatarId":""}' 

Response:

HTTP/1.1 201 Created

{
  "id": "1d43482b-2362-4ac5-9fe4-c8bc0fee49b3",
  "avatar": "https://api11.comm100.io/Global/agents/1d43482b-2362-4ac5-9fe4-c8bc0fee49b3/avatar?SiteId=100&version=920b345dfe5d42cf0441305e5a1191dc",
  "ifCustomizeAvatar": false,
  "systemAvatarId": "2d83d4fd-3114-eb11-80fc-00155d081d0b",
  "displayName": "Andyiao",
  "firstName": "test",
  "lastName": "comm",
  "phone": "13712345678",
  "title": "Manager",
  "bio": "Hello, I am Andy",
  "timeZone": "Pacific Standard Time",
  "datetimeFormat": "YYYY/MM/DD HH:mm:ss",
  "isAdmin": true,
  "isActive": true,
  "email": "test1@comm100.com",
  "createdTime": "2022-07-05T02:40:15.54Z",
  "isLocked": false,
  "isDeleted": false,
  "lockedTime": "1900-01-01T00:00:00Z",
  "departmentIds": [],
  "roleIds": [
      "0ccf849a-6bfb-ec11-a83c-00155de0e608",
      "0dcf849a-6bfb-ec11-a83c-00155de0e608"
  ],
  "skillIds": [],
  "permissionIds": [],
  "language": "en",
  "externalId": ""
}

Update the Agent

PUT global/agents/{id}

  • Parameters:

Name Type in Required Description
siteId integer query yes Id of the site.
email string body yes Agent login email.
language string body yes Agent language.
displayName string body yes Different Agents can have the same Display Name. If the display name is not set, it uses the combination of first name and last name.
firstName string body yes First name of the agent.
lastName string body yes Last name of the agent.
isAdmin bool body no Whether the agent is an administrator or not.
isActive bool body no Whether the agent is active or not.
phone string body no Phone number of the agent.
title string body no Title of the agent.
bio string body no Bio info of the agent. You can pass both plain text and base64-encoded text. If the request containing plain text is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content.
timeZone string body yes Time zone of the agent. The values include all Time Zone Option identifiers. The time zone of the agent uses the time zone of the site if not configured.
datetimeFormat string body yes Date & 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".
createdTime datetime body no Time when the agent was created.
isLocked bool body no Whether the account is locked or not.
lockedTime datetime body no Time when the agent account got locked.
ifCustomizeAvatar bool body no Whether the agent avatar is customized or not.
customizeAvatar image body no Customized avatar of agent.
systemAvatarId guid body no Id of system avatar.
avatar string body no Avatar of the agent.
permissionIds array body no The list of permission identifiers.
departmentIds array body no IDs of the departments where the agent belongs to.
roleIds array body no IDs of the roles that the agent have.
skillIds array body no The skills for the selected agents.
isDeleted bool body no Whether the agent is deleted or not.
externalId string body no External Id of the Agent.
  • Response:

Agent

  • Example

Sample Request:

curl https://partnerapi.comm100.io/v4/global/agents/1d43482b-2362-4ac5-9fe4-c8bc0fee49b3?siteId=100 \ 
    -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":false,"customizeAvatar":""}' 

Response:

HTTP/1.1 200 OK

{
  "id": "1d43482b-2362-4ac5-9fe4-c8bc0fee49b3",
  "avatar": "https://api11.comm100.io/Global/agents/97bee629-a4c9-4b27-a820-9d0a266a02e0/avatar?SiteId=100&version=920b345dfe5d42cf0441305e5a1191dc",
  "ifCustomizeAvatar": false,
  "systemAvatarId": "2d83d4fd-3114-eb11-80fc-00155d081d0b",
  "displayName": "Andy Liao",
  "firstName": "Andy",
  "lastName": "Liao",
  "phone": "13712345678",
  "title": "Manager",
  "bio": "Hello, I am Andy",
  "timeZone": "Pacific Standard Time",
  "datetimeFormat": "YYYY/MM/DD HH:mm:ss",
  "isAdmin": true,
  "isActive": true,
  "email": "andy@comm100.com",
  "createdTime": "2020-12-25T06:01:00.9133333Z",
  "isLocked": true,
  "isDeleted": false,
  "lockedTime": "2020-12-25T06:01:00.93Z",
  "departmentIds": [],
  "roleIds": [
      "bba26135-b7f6-ec11-ab81-0633ca200461",
      "bca26135-b7f6-ec11-ab81-0633ca200461"
  ],
  "skillIds": [],
  "permissionIds": [],
  "language": "en",
  "externalId": ""
}

Remove the Agent

DELETE global/agents/{id}

  • Parameters:

Name Type in Required Description
siteId integer query yes Id of the site.
  • Response:

No Content

  • Example

Sample Request:

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

Response:

HTTP/1.1 204 No Content

Copyright © 2022 Comm100 Network Corporation. All Rights Reserved.