Channel Account
  • 16 Jun 2022
  • 4 Minutes to read
  • Dark
    Light

Channel Account

  • Dark
    Light

Article summary

Channel Account

Accounts integrated to the channel apps i.e., multiple email accounts can be integrated to the Email channel.

Channel Account JSON Format

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

NameTypeDescription
appIdstringId of the channel app which the channel account belongs to. Allowed values are "Email","Facebook","Facebook","Twitter","WeChat","WeChat","WhatsApp" exc.
originalAccountIdstringId of the channel account in original channel.
namestringName of the channel account.
idguidId of channel account.
isEnabledboolWhether this channel account is enabled or not.
avatarUrlstringAvatar URL of the channel account.
screenNamestringDisplay name.
isBotEnabledboolWhether this channel account supports bot or not.
chatbotIdguidId of chat bot.
percentageToBotWhenOnlineintegerPercentage of routing to bot when there are agents online.
percentageToBotWhenOfflineintegerPercentage of routing to bot when all agents are offline.
isDefaultboolWhether the account is set as default email account or not.
createdTimedatetimeTime when the channel account is created.

Get the list of Channel Accounts

GET ticketing/channelAccounts

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed value is "chatbot".
  • Response:

An array of Channel Account

  • Example

Sample Request:

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

Response:

HTTP/1.1 200 OK

[
  {
      "appId": "WeChat",
      "originalAccountId": "gh_be13d263test",
      "name": "Comm100",
      "id": "59c749f4-af8e-eb11-aacf-06c7a219a2ac",
      "isEnabled": true,
      "avatarUrl": "http://wx.qlogo.cn/mmopen/vsACyXq1DBiadwp2qnDRDuGbq5304PQsicgV39VfG3LRiaUZhy8AcF90icxIQGicbFHhpjLChoKhPxDNMnWXiaibdibPGFNSc6qImCM9/test",
      "screenName": "Comm100",
      "isBotEnabled": false,
      "chatbotId": "980cce41-58ae-43b2-8de8-37eea94da4a4",
      "percentageToBotWhenOnline": 0,
      "percentageToBotWhenOffline": 0,
      "isDefault": false,
      "createdTime": "2021-01-27T03:13:04.866Z"
  }
] 

Get a single Channel Account

GET ticketing/channelAccounts/{id}

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed value is "chatbot".
  • Response:

Channel Account

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/channelAccounts/59c749f4-af8e-eb11-aacf-06c7a219a2ac \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "appId": "WeChat",
  "originalAccountId": "gh_be13d263test",
  "name": "Comm100",
  "id": "59c749f4-af8e-eb11-aacf-06c7a219a2ac",
  "isEnabled": true,
  "avatarUrl": "http://wx.qlogo.cn/mmopen/vsACyXq1DBiadwp2qnDRDuGbq5304PQsicgV39VfG3LRiaUZhy8AcF90icxIQGicbFHhpjLChoKhPxDNMnWXiaibdibPGFNSc6qImCM9/test",
  "screenName": "Comm100",
  "isBotEnabled": false,
  "chatbotId": "980cce41-58ae-43b2-8de8-37eea94da4a4",
  "percentageToBotWhenOnline": 0,
  "percentageToBotWhenOffline": 0,
  "isDefault": false,
  "createdTime": "2021-01-27T03:13:04.866Z"
} 

Create a new Channel Account

POST ticketing/channelAccounts

  • Parameters:

NameTypeinRequiredDescription
appIdstringbodyyesId of the channel app which the channel account belongs to. Allowed values are "Email","Facebook","Facebook","Twitter","WeChat","WeChat","WhatsApp" exc.
originalAccountIdstringbodyyesId of the channel account in original channel.
namestringbodyyesName of the channel account.
isEnabledboolbodyyesWhether this channel account is enabled or not.
avatarUrlstringbodynoAvatar URL of the channel account.
screenNamestringbodyyesDisplay name.
isBotEnabledboolbodyyesWhether this channel account supports bot or not.
chatbotIdguidbodynoId of chat bot.
percentageToBotWhenOnlineintegerbodyyesPercentage of routing to bot when there are agents online.
percentageToBotWhenOfflineintegerbodyyesPercentage of routing to bot when all agents are offline.
isDefaultboolbodyyesWhether the account is set as default email account or not.
channelIdentitystringbodynoIdentity metadata of channel account.
accountExtInfostringbodyno
filterstringbodyno
createdTimedatetimebodynoTime when the channel account is created.
emailAccountInfostringbodynoEmail info.
  • Response:

Channel Account

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/channelAccounts \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"appId":"WeChat","originalAccountId":"gh_be13d263test","name":"Comm100","isEnabled":true,"avatarUrl":"http://wx.qlogo.cn/mmopen/vsACyXq1DBiadwp2qnDRDuGbq5304PQsicgV39VfG3LRiaUZhy8AcF90icxIQGicbFHhpjLChoKhPxDNMnWXiaibdibPGFNSc6qImCM9/test","screenName":"Comm100","isBotEnabled":false,"chatbotId":"980cce41-58ae-43b2-8de8-37eea94da4a4","percentageToBotWhenOnline":0,"percentageToBotWhenOffline":0,"isDefault":false,"channelIdentity":"{\"UserName\":null,\"Pwd\":null,\"AccountToken\":null,\"AccountSecret\":null,\"AccountTokenExp\":null,\"WebhookId\":null,\"AccountSid\":null,\"AuthToken\":null,\"PhoneNumberSid\":null,\"WeChatAppId\":\"test appid\",\"AccessToken\":\"test token\",\"RefreshToken\":\"test token2\",\"AccessTokenExp\":\"2021-04-22T05:11:58.6757145Z\",\"PageId\":null,\"PageAccessToken\":null}","accountExtInfo":"","filter":"[{\"ChannelId\":\"WeChat\",\"FilterName\":\"WeChat\",\"Enable\":true}]","createdTime":"2021-01-27T03:13:04.866Z","emailAccountInfo":"{\"Type\":0,\"UserName\":null,\"Password\":null,\"SenderName\":null,\"ServerAddress\":null,\"Port\":0,\"IfSSL\":false,\"ServerURL\":null,\"IfSmtpRequiredAuthentication\":false,\"SmtpServerAddress\":null,\"SmtpPort\":0,\"SmtpUserName\":null,\"SmtpPassword\":null,\"SmtpEncrytedConnectionType\":0,\"IfPollSuccess\":false,\"LastPollTime\":\"0001-01-01T00:00:00\",\"FailReason\":null,\"FirstPollStatus\":0}"}' 

Response:

HTTP/1.1 201 Created

{
  "appId": "WeChat",
  "originalAccountId": "gh_be13d263test",
  "name": "Comm100",
  "id": "59c749f4-af8e-eb11-aacf-06c7a219a2ac",
  "isEnabled": true,
  "avatarUrl": "http://wx.qlogo.cn/mmopen/vsACyXq1DBiadwp2qnDRDuGbq5304PQsicgV39VfG3LRiaUZhy8AcF90icxIQGicbFHhpjLChoKhPxDNMnWXiaibdibPGFNSc6qImCM9/test",
  "screenName": "Comm100",
  "isBotEnabled": false,
  "chatbotId": "980cce41-58ae-43b2-8de8-37eea94da4a4",
  "percentageToBotWhenOnline": 0,
  "percentageToBotWhenOffline": 0,
  "isDefault": false,
  "createdTime": "2021-01-27T03:13:04.866Z"
} 

DisableBot the Channel Account

POST ticketing/channelAccounts/{id}:disableBot

  • Parameters:

No Parameters

  • Response:

Channel Account

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/channelAccounts/59c749f4-af8e-eb11-aacf-06c7a219a2ac:disableBot \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "appId": "WeChat",
  "originalAccountId": "gh_be13d263test",
  "name": "Comm100",
  "id": "59c749f4-af8e-eb11-aacf-06c7a219a2ac",
  "isEnabled": true,
  "avatarUrl": "http://wx.qlogo.cn/mmopen/vsACyXq1DBiadwp2qnDRDuGbq5304PQsicgV39VfG3LRiaUZhy8AcF90icxIQGicbFHhpjLChoKhPxDNMnWXiaibdibPGFNSc6qImCM9/test",
  "screenName": "Comm100",
  "isBotEnabled": false,
  "chatbotId": "980cce41-58ae-43b2-8de8-37eea94da4a4",
  "percentageToBotWhenOnline": 0,
  "percentageToBotWhenOffline": 0,
  "isDefault": false,
  "createdTime": "2021-01-27T03:13:04.866Z"
} 

EnableBot the Channel Account

POST ticketing/channelAccounts/{id}:enableBot

  • Parameters:

No Parameters

  • Response:

Channel Account

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/channelAccounts/59c749f4-af8e-eb11-aacf-06c7a219a2ac:enableBot \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "appId": "WeChat",
  "originalAccountId": "gh_be13d263test",
  "name": "Comm100",
  "id": "59c749f4-af8e-eb11-aacf-06c7a219a2ac",
  "isEnabled": true,
  "avatarUrl": "http://wx.qlogo.cn/mmopen/vsACyXq1DBiadwp2qnDRDuGbq5304PQsicgV39VfG3LRiaUZhy8AcF90icxIQGicbFHhpjLChoKhPxDNMnWXiaibdibPGFNSc6qImCM9/test",
  "screenName": "Comm100",
  "isBotEnabled": true,
  "chatbotId": "980cce41-58ae-43b2-8de8-37eea94da4a4",
  "percentageToBotWhenOnline": 0,
  "percentageToBotWhenOffline": 0,
  "isDefault": false,
  "createdTime": "2021-01-27T03:13:04.866Z"
} 

Update the Channel Account

PUT ticketing/channelAccounts/{id}

  • Parameters:

NameTypeinRequiredDescription
appIdstringbodyyesId of the channel app which the channel account belongs to. Allowed values are "Email","Facebook","Facebook","Twitter","WeChat","WeChat","WhatsApp" exc.
originalAccountIdstringbodyyesId of the channel account in original channel.
namestringbodyyesName of the channel account.
isEnabledboolbodyyesWhether this channel account is enabled or not.
avatarUrlstringbodynoAvatar URL of the channel account.
screenNamestringbodyyesDisplay name.
isBotEnabledboolbodyyesWhether this channel account supports bot or not.
chatbotIdguidbodynoId of chat bot.
percentageToBotWhenOnlineintegerbodyyesPercentage of routing to bot when there are agents online.
percentageToBotWhenOfflineintegerbodyyesPercentage of routing to bot when all agents are offline.
isDefaultboolbodyyesWhether the account is set as default email account or not.
channelIdentitystringbodynoIdentity metadata of channel account.
accountExtInfostringbodyno
filterstringbodyno
createdTimedatetimebodynoTime when the channel account is created.
emailAccountInfostringbodynoEmail info.
  • Response:

Channel Account

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/channelAccounts/59c749f4-af8e-eb11-aacf-06c7a219a2ac \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"appId":"WeChat","originalAccountId":"gh_be13d263test","name":"Comm100","isEnabled":true,"avatarUrl":"http://wx.qlogo.cn/mmopen/vsACyXq1DBiadwp2qnDRDuGbq5304PQsicgV39VfG3LRiaUZhy8AcF90icxIQGicbFHhpjLChoKhPxDNMnWXiaibdibPGFNSc6qImCM9/test","screenName":"Comm100","isBotEnabled":false,"chatbotId":"980cce41-58ae-43b2-8de8-37eea94da4a4","percentageToBotWhenOnline":0,"percentageToBotWhenOffline":0,"isDefault":false,"channelIdentity":"{\"UserName\":null,\"Pwd\":null,\"AccountToken\":null,\"AccountSecret\":null,\"AccountTokenExp\":null,\"WebhookId\":null,\"AccountSid\":null,\"AuthToken\":null,\"PhoneNumberSid\":null,\"WeChatAppId\":\"test appid\",\"AccessToken\":\"test token\",\"RefreshToken\":\"test token2\",\"AccessTokenExp\":\"2021-04-22T05:11:58.6757145Z\",\"PageId\":null,\"PageAccessToken\":null}","accountExtInfo":"","filter":"[{\"ChannelId\":\"WeChat\",\"FilterName\":\"WeChat\",\"Enable\":true}]","createdTime":"2021-01-27T03:13:04.866Z","emailAccountInfo":"{\"Type\":0,\"UserName\":null,\"Password\":null,\"SenderName\":null,\"ServerAddress\":null,\"Port\":0,\"IfSSL\":false,\"ServerURL\":null,\"IfSmtpRequiredAuthentication\":false,\"SmtpServerAddress\":null,\"SmtpPort\":0,\"SmtpUserName\":null,\"SmtpPassword\":null,\"SmtpEncrytedConnectionType\":0,\"IfPollSuccess\":false,\"LastPollTime\":\"0001-01-01T00:00:00\",\"FailReason\":null,\"FirstPollStatus\":0}"}' 

Response:

HTTP/1.1 200 OK

{
  "appId": "WeChat",
  "originalAccountId": "gh_be13d263test",
  "name": "Comm100",
  "id": "59c749f4-af8e-eb11-aacf-06c7a219a2ac",
  "isEnabled": true,
  "avatarUrl": "http://wx.qlogo.cn/mmopen/vsACyXq1DBiadwp2qnDRDuGbq5304PQsicgV39VfG3LRiaUZhy8AcF90icxIQGicbFHhpjLChoKhPxDNMnWXiaibdibPGFNSc6qImCM9/test",
  "screenName": "Comm100",
  "isBotEnabled": false,
  "chatbotId": "980cce41-58ae-43b2-8de8-37eea94da4a4",
  "percentageToBotWhenOnline": 0,
  "percentageToBotWhenOffline": 0,
  "isDefault": false,
  "createdTime": "2021-01-27T03:13:04.866Z"
} 

Remove the Channel Account

DELETE ticketing/channelAccounts/{id}

  • Parameters:

No Parameters

  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/channelAccounts/59c749f4-af8e-eb11-aacf-06c7a219a2ac \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content


Was this article helpful?

What's Next