Issue
Chat users are unable to create an incident from the chat.
Steps:
- Enabled the below-listed plugins
- Connect
- Connect Support
- Connect Support and Service Portal Integration
- End-user initiates chat using Service Portal.
- https://<instance>.service-now.com/$chat_support.do?queueID=b8d808c50fb1be00df6e1efae1050eed
- Error displayed:
"Unique Key violation detected by the database (Duplicate entry 'TASK0020070' for key 'task_U1')".
Release
Any ServiceNow Release using Connect Chat
Cause
In the 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.
The customer did not have Auto numbering defined on chat_queue_entry[ Table: Chat queue entry].
In a standard out-of-the-box instance, this is the default behavior.
Resolution
- Remove the enforced uniqueness on the task Number field to resolve the issue.
- 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