Surveys - Trigger condition to send Survey for Interactions if no Tasks have been associated (Incidents and Requests)

StefanoZ
Mega Sage

Hi All,

I would like to know if anyone attempted to create a survey on IMS Records that trigger only if no Incident or Request is associated to IMS Record.

Is this somehow feasible? I tried to reach this result working on Interaction and Interaction_related_record table with no luck.

Our main goal is to avoid kick-off of a doubled survey since that we've a separate survey based on Incident and sc_request table.

1 ACCEPTED SOLUTION

I think then you will need to add a condition to the business rule that is created when you create a trigger condition:

find_real_file.png

- Query your Incidents and requests appropriately. If incident/request found, do not trigger the survey:

 

find_real_file.png

 

function onAfter(){ 
	var grI = new GlideRecord('interaction');
	grI.addQuery("<your query>");
	if (grI.hasNext()) {
		return;
	}
	//survey trigger
}

 

Is this something you can do?

View solution in original post

4 REPLIES 4

Willem
Giga Sage
Giga Sage

Hi Stefano,

Not sure what an IMS record is. However, using Trigger conditions you can specify for any table what conditions

will trigger the Survey:

find_real_file.png

Under Conditions you can specify the condition. Like:

x | is empty AND

y | is empty

 

Like so:

find_real_file.png

 

Let me know if this helps.

 

If you need additional help, please share screenshots of what you have already tried. That helps us understand your question.

StefanoZ
Mega Sage

Hi Willem, We have adopted Interactions (IMS records) as first touchpoint for users with our Tier I IT support.

If issue requires more complex troubleshooting then Tier I will raise an Incident from Interaction( that will be closed in the meanwhile).
We already have a survey X based to Incident and Sc_Request Table.

We want to implement a Survey Y for Interactions but avoid that Users will starting to receive one survey from X and one from Y if an Incident or Request is raised from Interaction record.

If Incident or Request is raised from Interaction only X should kick-off Survey.

I think then you will need to add a condition to the business rule that is created when you create a trigger condition:

find_real_file.png

- Query your Incidents and requests appropriately. If incident/request found, do not trigger the survey:

 

find_real_file.png

 

function onAfter(){ 
	var grI = new GlideRecord('interaction');
	grI.addQuery("<your query>");
	if (grI.hasNext()) {
		return;
	}
	//survey trigger
}

 

Is this something you can do?

This solution works great, but there is a drawback. If there is ever a need to update the Trigger Condition, the associated business rule is basically recreated so you'll lose whatever customizations were added directly to the original business rule.

 

I have a similar need to reach into related tasks not available at the Trigger Condition condition level to evaluate if the assessment should be created. The business rule was a light bulb moment and worked great ... until I updated the Trigger Condition. Light bulb dimmed at that moment 😞 

 

Michael