CTI processing business rule - create interaction record

MJL_
Tera Contributor

Hi,

Im trying to build a functional requirement for our ServiceDesk. The requirement is that if they receive a call in our call center application a interaction gets created with the 'opened_for' and type field pre-filled. Im achieving this through the cti processing business rule and can get a new interaction to pop up pre filled in the agent workspace just fine its just not save yet. See line 32/33 in the screenshot.

Seems like a minor issue but lets say it isn't. Now the documentation on this says":

"sysparm_cti_rule=name where 'name' is the name of a function to be invoked for CTI processing rather than using the default script. The function must be defined in a sys_script entry marked client callable. If the function needs to insert, update, or delete any GlideRecord(s), it must call a separate non-client callable function to perform the update(s).

https://docs.servicenow.com/bundle/rome-platform-administration/page/integrate/incident/reference/r_ComputerTelephonyIntegration.html

But I cant get it to work, if tried using a single function script include (line 17/18), regular script include (line 23-25) and a function inside the global business rule itself (line 20/21) the global rule just doesn't seem to call the function. Even when it contains a simple gs.log there is nothing showing up in the log. As if the function just isn't being called.

Has anyone done this? What am i missing?

userID is not null and when i test the function in a fix script its working just fine and creates an interaction so nothing wrong there.

 find_real_file.png

13 REPLIES 13

Mark Guldhammer
Giga Guru

Hi

 

Have you tried with just?

if(userID) {

What about logging the userID variable before the If statement? If none of that works, the rest of the script is needed.

 

-Mark 

shloke04
Kilo Patron

Hi @Matthijs 

Can you please explain in brief on what are you trying to do as I got confused after reading your query on what you are trying to do here?

I can assist you here.

Regards,

Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

MJL_
Tera Contributor

Hi @shloke04 

About what im trying to achieve.

1. The Servicedesk receives a phone call on their softphone software (pure connect)

2. In the agent workspace an interaction form pops up with the 'opened for' set to the user who called an the type to 'phone' (this i can get to work using line 33)

3. This record has already been saved so that there is always an interaction from every phone call they receive.

 

@Mark Guldhammer the script is going into the if for the lines that containt working options (line 30 and 33) so don't think that is the issue. getting the same results with

 if (userID) {

Logging before the if statement also does nothing. I think this is because its a client callable global business rule because like I said when I put all this in a fix script it runs just fine.

Regards,

Matthijs.

Okay, so I guess the first issue is figuring out if it is even running. According to the documentation you need a Business Rule, as you already tried. When working with Business Rules I always resort to gs.addInfoMessage()/gs.addErrorMessage(), since those popups are nice fast way of debugging.

I would start there. If the popup is not showing, it must be something with the setup of the Business Rule or the way it is called.