- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2022 07:44 AM
Hello Community,
I am attempting to configure Virtual Agent/Agent Chat with Service Operations Workspace.
The End Chat UI action is indeed working in standard Agent Workspace but NOT in Service Operations Workspace.
The End Chat UI action record has the following workspace client script:
function onClick(g_form) {
if (g_user.userID != g_form.getValue('assigned_to')) {
g_modal.alert('Only the assignee of this interaction can end the chat.');
return;
}
var completedState = 'closed_complete';
// Transition to wrap_up state if Interaction Wrap Up configuration is enabled
var ga = new GlideAjax('WrapUpInteractionAjaxUtil');
ga.addParam('sysparm_name', 'isWrapUpEnabled');
ga.addParam('sysparm_recSysId', g_form.getSysId());
ga.getXML(getAnswer);
function getAnswer(response) {
var isWrapUpEnabled = response.responseXML.documentElement.getAttribute("answer");
if (isWrapUpEnabled == "true")
completedState = "wrap_up";
var msg = getMessage("Are you sure you want to end this chat?");
g_modal.confirm(getMessage("Confirmation"), msg, function(confirmed) {
if (confirmed) {
g_form.setValue('state', completedState);
if (g_form.getValue('state_reason') === "")
g_form.setValue('state_reason', 'agent_ended');
g_form.save();
}
});
}
return false;
}
Straight forward, out of box.
On Agent Workspace:
-> Receive incoming chat, fill out required fields on Interaction record, press the End Chat UI action
--> A popup modal appears
--> Press Ok, the Interaction Record DOES go to state "Closed complete" if Wrap Up configuration is disabled. And state DOES go to state "Wrap Up" if Wrap Up configuration is enabled with a new UI action appearing called "End Wrap Up" in place of End Chat UI action.
However in Service Operations Workspace
Once you press OK on the popup, the screen does refresh, however the state DOES NOT change, "End Chat" UI action DOES NOT disappear and the chat DOES NOT close.
Does anyone have any suggestions on how to resolve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2022 10:07 AM
Hello community,
Turns out the interaction record appearing in Service Operations Workspace needed to have "State" field added to the form. The "State" field did appear in the header as a secondary value previously, but strangely it also had to be on the view called "Service Operation Workspace" which is only editable if the application scope is in "Interaction for Service Operation Workspace".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2022 10:07 AM
Hello community,
Turns out the interaction record appearing in Service Operations Workspace needed to have "State" field added to the form. The "State" field did appear in the header as a secondary value previously, but strangely it also had to be on the view called "Service Operation Workspace" which is only editable if the application scope is in "Interaction for Service Operation Workspace".