Users are unable to initiate chat conversation - throwing error "User does not have permission to add messages to this group"




Even after configuring the chat queue, end users are not able to initiate a chat conversation with the agent


Kingston release (Intermittent issue - may not be applicable for all Kingston instance)


Affected instance must have Connect and Connect Support plugins enabled


1) Login to Kingston instance

2) Impersonate an end user 

3) Try to initiate a chat conversation (using CMS or Service Portal) - End user will get an error stating "User does not have permission to add messages to this group"

4) Enabled developer tools and look into the network tab - Session will not be established. It will throw an error, code 403 (forbidden) with the error message {"result":"User does not have permission to add messages to this group","session":{"notifications":[{"text":"Unique Key violation detected by database (Duplicate entry 'TASK00000XX' for key 'task_U1')","type":"error"}]}}


Once "Social IT Infrastructure" plugin is activeted, it automatically creates an entry in number maintenance table for "chat queue entry" table.

In case this record is not created(might be skipped due to some reason), system uses Task table number by default to create the chat queue entry which leads to the following error.


 INSERT INTO task (short_description, made_slaupon_rejectsys_updated_onsys_class_nameu_ci_not_foundnumbersys_idcontact_typesys_updated_byopened_byurgencysys_created_onsys_domaina_str_5statereassignment_countsys_created_bya_ref_3knowledgeapprovalimpactsys_mod_countactivepriorityopened_atescalationupon_approvalapproval_seta_ref_2) ('hi', 1, 'cancel', '2018-08-01 12:24:34', 'chat_queue_entry', 0, 'TASK00000XX', 'ecb4ee570f67d3406adf3e7ce1050e99', 'phone', '<username>', '<Username>', 3, '2018-08-01 12:24:34', 'global', 'waiting', 1, 0, '<username>', 'acb4ee570f67d3406adf3e7ce1050e98', 0, 'not requested', 3, 0, 1, 3, '2018-08-01 12:24:34', 0, 'proceed', NULL, '91e4bcbc0f2f53402caef55be1050e46') /* <node name>, gs:5DA996DB0F27D3406ADF3E7CE1050E15, tx:e0b46e970f67d3406adf3e7ce1050e24 Unique Key violation detected by database (Duplicate entry 'TASK00000XX' for key 'task_U1'


Create a record in number maintenance table for Chat Queue Entry table.
Please refer Record Numbering for further details 


when everything works as expected, in developer tools, under network tab, session will be established with status code 201(created) with the message

{"result":{"sys_id":"aff5e3eadb84a700e0a95414dc96198c","number":"CHAT001000X","short_description":"hi","transfer_change":false,"opened_by":"<username>","state":1,"sys_updated_on":"2018-08-23 22:45:48","position":1,"queue":"e705af2adb84a700e0a95414dc9619ab","average_wait_time":"30 Seconds","group":"e7f5e3eadb84a700e0a95414dc96198a"},"session":{"notifications":[]}}


The SQL query will be as follows:

INSERT INTO task (`short_description`,`made_sla`,`upon_reject`,`sys_updated_on`,`sys_class_name`,`number`,`sys_id`,`sys_updated_by`,`opened_by`,`urgency`,`sys_created_on`,`sys_domain`,`a_str_5`,`state`,`reassignment_count`,`sys_created_by`,`a_ref_3`,`knowledge`,`approval`,`impact`,`sys_mod_count`,`active`,`priority`,`sys_domain_path`,`opened_at`,`escalation`,`upon_approval`,`approval_set`,`a_ref_1`) VALUES('hi',1,'cancel','2018-08-24 05:47:17','chat_queue_entry','CHAT001000X','4d56e72edb84a700e0a95414dc9619b9','<username>','<username>',3,'2018-08-24 05:47:17','global','waiting',1,0,'<username>','4156a72edb84a700e0a95414dc961950',0,'not requested',3,0,1,4,'/','2018-08-24 05:47:17',0,'proceed',NULL,'e705af2adb84a700e0a95414dc9619ab')  

Additional Information

There can be multiple reason for a chat queue to not work as expected. It is one of those but may not be applicable for every case. 

For those issues, Please check for other knowledge article on Chat issues or contact customer support.