How does interaction associate with the incident reocrd created using a form in service portal in agent workspace?

Bin Li
Tera Expert

Hi all,

I am trying to work out how ServiceNow OOTB works to associate a newly created incident record from a form in agent workspace service portal with interaction, using the OOTB "Create Request" button.

Steps:

1. Login as an ITIL user and create a new interaction in Agent Workspace, then click on "Create Request" button

find_real_file.png

2. It opens up a new sub-tab of catalog page, and use the sample "Create Incident" form to create an incident.

find_real_file.png

3. After the form is submitted, it creates an incident record. What I have noticed is the system automatically associates this newly created incident record with the interaction record.

find_real_file.png

find_real_file.png

 

Something I have observed:

- The associate between these two records are actually through a new record inserted in interaction_related_record table. But it seems that it doesn't occur instantly at the time when incident was created. It takes some time for this record to be created in this table.

find_real_file.png

- I have looked at the business rules for interaction_related_record table, but doesn't look like any BR would have performed this action. 

- I have also looked at the code in the "Create Request" UI action, but doesn't look like there is any logic written specifically to create a new record in interaction_related_record table following the opening up of the form or creation of the incident record.

 

Does anyone know how ServiceNow does this association? How does it get triggered? 

 

Cheers

Johnny 

9 REPLIES 9

Hi @Johnny Lee 

Did my reply answer your question?

If so, please mark the appropriate response as "correct" so that the question will appear as resolved for other users who may have a similar question in the future.

If not, please tell me what you are still missing.

Many thanks & kind regards
Maik

@Maik Skoddow, your answer seems correct for the sc_request scenario. I have the exact same situation but the difference is I'm interested in how this happens for Incidents. There is no business rule like that for incident. Also, there is no column on the incident table called parent_interaction like there is on the sc_request table. In spite of that, the interaction_related_record still gets created between incident and interaction. How does this get created and by what code (BR, script include, event, or ???).

I search in Studio for all references that create records in interaction_related_record for incidents. The closest I could find is script includes LookupVerifyGenUtil.associateRecordToInteraction(). But, that is only called from two other UI scripts for Interaction called Verify Consumer and Verify Contact.

The reason I want to find this is that I want to expose the "Create Incident" in the platform view as well and leverage the same process. But, if I expose this UI action button in the platform, the interact and incident do not get associated. So, there's something hidden going in the portal that is doing this. Thanks in advance.

Ren5
Kilo Explorer

I am experiencing the issue and HI Support says its an expected behavior. I actually dont get it because it defeats the purpose of the Associate Record UI action.

Hi Todd,

I'm also trying to achieve the same from platform view UI action, but facing same issue.

If you achieve it could you please explain here.

 

Thanks in advance.

Rajesh Mudam

Rodrigo Erthal
Tera Contributor

This information comes from the record producer catalog item. In the record producer script field of the create incident you can see the line below:

 

var incRPUtil = new LinkRecordProducerToIncident();
incRPUtil.linkRecordProducerToParentIncident(RP.getParameterValue('sysparm_parent_sys_id'), current);

 

It uses the script include LinkRecordProducerToIncident

 

You can use this condition in the script field of any new record producer catalog item that you want to create the association with the interaction automatically.