55 views

Symptoms


Chat users are unable to create an incident from the chat.
 
Steps:
 
1.Enabled the below-listed plugins:
 
-Connect
-Connect Support
-Connect Support and Service Portal Integration
 
2. End user initiates chat using Service Portal.
 
3. https://<instance>.service-now.com/$chat_support.do?queueID=b8d808c50fb1be00df6e1efae1050eed
 
4. Error displayed:
 
"Unique Key violation detected by database (Duplicate entry 'TASK0020070' for key 'task_U1')".

Release


Any ServiceNow Release using Connect Chat

 

Cause


In customer instance, they had enforced uniqueness on the Task table "Number" field. 
 
From the documentation regarding the unique option: 
 
"Note: While unique indexes ensure data integrity they also prevent any insert involving a duplicate number. This may cause unexpected errors during data entry." 
 
The chat_queue_entry number is inherited from Task. Baseline instances do not have this field flagged, so the default numbering is not an issue. 
In out of the box instance,  'Number' field is not set to 'Unique' in Task Table.
 
Customer did not have Auto numbering defined on chat_queue_entry[ Table: Chat queue entry]. 
In standard out of the box instance, this is a default behavior.

Resolution


  1. Remove the enforced uniqueness on the task Number field to resolve the issue.
  2. Add a reference for chat into Number Maintenance on chat_queue_entry [ Table: Chat queue entry]
For example:
  • Go to System Definition > Number Maintenance
  • https://<instance>.service-now.com/sys_number_list.do?sysparm_query=
  • Click New.
  • Table: Chat Queue Entry
  • Prefix: CHAT
  • Number: 10,000
  • Number of Digits: 7

Additional Information


Auto-numbering records in a table

 

Article Information

Last Updated:2018-05-17 00:48:59
Published:2018-05-17