Fire event from record producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2020 06:49 AM
hello,
I have a record producer, and I need to trigger an event from a dropdown variable value.
So, on the record producer I have a variable called Location. If location = A, I want an event trigged so I can call it from a notification.
I have this in the Record Producer script but it is not working..
I dont think i have it coded properly. Any ideas?
Thanks
var location = producer.associate_site_and;
if (location == 'Internal - Charlotte') {
gs.eventQueue("contact_center_internal", current, eventParm1);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2020 06:52 AM
What is eventParm1?
If you are not passing any parameter then use this
var location = producer.associate_site_and;
if (location == 'Internal - Charlotte') {
gs.eventQueue("contact_center_internal", current, '','');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2020 07:09 AM
Hi, I am not actually passing a parameter so I removed that (I think it was a copy and paste error).
I have tired the code you added and it's still not working.. any other ideas?
here is what my record producer script looks like.. also, on the event registry, I have tried to set it to both tables "incident" and the sc_cat_item_producer table.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2020 07:10 AM
Sorry - I have added your code and then also tested with what Mike Patel added below which is what you see in the screenshot and I can't get either to fire the event. thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2020 07:13 AM
See if the code is coming in the if by adding log right above the event queue
var location = producer.associate_site_and;
gs.log('location='+location, 'MyLog');
if (location == 'Internal - Charlotte') {
gs.log('coming here', 'MyLog');
gs.eventQueue("contact_center_internal", current, '','');
}