Is there a way to relate a survey to the ticket that created it??
On the survey table there are two fields: object_type and object_id.
For a Request, Incident, or Problem; the object type will be 'cr' and the ticket id (not ref_num) will be the object_id.
If all you want is the survey id and name for a specific call_req ticket then the SQL is:
SELECT SVY.id "Survey ID", SVY.sym "Survey Name", CR.ref_num "Ticket RefNum"
FROM survey SVY
LEFT JOIN call_req CR ON SVY.object_id = CR.id
Survey ID Survey Name Ticket RefNum400001 CustSat 238
Survey ID Survey Name Ticket RefNum
400001 CustSat 238
Check out the relationship diagram here:
Computer Associates International, Inc. Table List
I would like to expand on this question. We would like the customer satisfaction survey email to include the incident description from the surveyed ticket. Is there anyway to do that?
If you've attached the Survey to the Close Activity then you can update the text there.
Navigate to Administration->Notifications->Activity Notifications and open the Closed activity.
Switch to the Survey tab and open Edit mode. In the Survey Message body you can include details about your incident. To include the Incident description add the following.
Retrieving data ...