- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2016 09:00 AM
When an incident is created from chat, it does not auto populate the first name, middle name, and last name (it only populates the caller_id) of an incident as it normally would when an incident is created by other means aside from a chat session. It seems g_chat is limited in what it can do. Is there a way to add the first/middle/last names from the chat action for creating an incident from chat?
Thanks!
Chris
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2016 06:24 AM
This was able to pull out the necessary information just by querying on the sys_user table:
var chatinfo = new GlideRecord ("sys_user");
chatinfo.get(g_chat.getChatQueueUser());
g_chat.fire(LiveEvents.WINDOW_CREATE_DOCUMENT,
'incident',
{
caller_id : g_chat.getChatQueueUser(),
short_description: g_chat.getProperty('short_description'),
u_reported_source: 'Chat',
state: '2',
incident_state: '0',
u_email_address: chatinfo.email,
u_phone_number: chatinfo.phone,
u_incident_location: chatinfo.location
}
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2017 07:29 AM
Hi ctmath2,
This is for Connect Chat.
After patch, auto-populate of location and assignment group has been removed/not working.
Here's the code I found
response.newRecord("incident",{
short_description: conversation.document.short_description ||"",
caller_id: conversation.document.opened_by
});
To give you a better idea, here's a screenshot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2017 07:50 AM
That's an out of the box Connect Action. Are y'all using Connect or Legacy Chat? If you type in chat in lefthand navigation, do you see actions module?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2017 08:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2017 08:07 AM
How about modifying the script you have a screenshot above to:
response.newRecord("incident", {
short_description: conversation.document.short_description || "",
caller_id: conversation.document.opened_by,
location: getLocation(conversation.document.opened_by)
});
function getLocation(user){
var myUserObject = gs.getUser();
myUserObject=myUserObject.getUserByID(user);
return myUserObject.getLocation();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2017 08:34 AM
Hi Chris,
I appreciate your help on this. I was able to solve this with your guidance. See my script below:
response.newRecord("incident", {
short_description: conversation.document.short_description || "",
caller_id: conversation.document.opened_by,
contact_type : 'Chat',
assignment_group : 'a0c65f886f0ed200cc1d6592be3ee422',
location: conversation.document.opened_by.location
});