Trigger ID is missing on Survey assessment instances

Aanchal Mehndi1
Giga Contributor

For Few assessment records, Trigger ID is missing.

Can someone help me with possible reasons?

We haven't done any customization on OOB scripts.

Regards,

Aanchal

17 REPLIES 17

Hi Piyush,



Did you find any solution.


Hi Jaspal,



This issue is caused with our custom email notification for the Customer Satisfaction Survey. for this notification it has the link to the survey hard-coded:
However for the other notification it was generated by a mail script:

This mail script is making a call to AssessmentUtils().getAssessmentInstanceURL() which returns the link to the exact survey instance, which is associated with the trigger ID. For example:

xyz.service-now.com/?uri=assessment_take2.do%3Fsysparm_assessable_type=[survey_type]%26sysparm_assessable_sysid=[instance_id]

However, in our notification that has the hard coded link, you can see that it doesn't define an instance to complete, which will therefore create a new survey instance which will not be associated with an existing instance which was triggered.



xyz.service-now.com/nav_to.do?uri=assessment_take2.do%3Fsysparm_assessable_type=87186844d7211100158ba6859e610378

To correct it, we had to change the hard-coded link in your "Customer Satisfaction Survey User Invite" notification to the same as the one in the "Survey User Invite" notification.



Explanation -



The notification is sent when a record is inserted into the asmt_assessment_instance table. This record has a value in the Trigger ID field as the creation of this record was triggered by a trigger condition.

The issue here is that instead of the link pointing at that particular record in the asmt_assessment_instance table (a survey instance), it points simply at the survey and thus by following the link it will create a brand new survey instance with the Trigger ID field not completed.

So basically, if users click the link in the email you will have two survey instances. One which is incomplete (with a value in Trigger ID) and another which is completed (with Trigger ID empty).

Clicking the link in the email notification is only one way to complete a survey. Another way is to use the Self-Service > My Assessments & Surveys module. Using this would complete the instance with the Trigger ID field set, rather than create a new one like the email notification does. If there are any completed survey with a Trigger ID field set, this is likely how those surveys are being completed.


Regards,
Piyush

Hi Piyush,



If i understand you correctly this means any survey accessed via a link sent in a notification won't be linked to any task record as it will create a new survey instance when the user clicks the link?


Yes David, You are correct.


Hi,


I am facing similar issue. But here instead of "empty" it is showing "Incident:<blank>", whereas it is fine for RITMs.


And when I click on that Incident: link, it is taking me to the correct record!



find_real_file.png



Any idea?



Thanks,


Manas