How to send different HappySignal Feedback URL' (with diff response ID) to each user in ticket CC

Ridhima
Kilo Contributor

We have a requirement to send different emails with HappySignals feedback link with different response ID to each user in ticket CC on resolution. We have created an event and in BR when state is resolved we are triggering event for each user in CC.
Need help with notification script to create url with different response id and responder.
Related user rule is set to caller_id
Current if the feedback already exists, same response id url gets triggered to caller as survey responder only

 

1 REPLY 1

kmohammed
Tera Guru

The problem is the recipient, not the event loop. You are already triggering an event for each user in CC, but the notification still resolves every instance to the caller, because the related user rule is set to caller_id. A notification also builds its mail script once per notification, so one mail to many recipients will always carry the same link.

 

Change the pattern to one email per recipient:

 

1. In the business rule on resolve, loop through the CC users and queue one event per user, passing that user as an event parameter, for example gs.eventQueue('your.event', current, ccUserSysId). Do not put the CC users on the notification itself.

 

2. On the notification, remove the caller_id related user rule and set the recipient to Event Param 1, so each event instance is addressed to only the user passed in that parameter.

 

3. In the mail script, build the URL from the event parameter user, not from current.caller_id. Use that user as the survey responder when you create or look up the feedback response. When you check whether feedback already exists, key the lookup by both the incident and the responder. If you look it up by incident alone, you will keep finding the caller's existing response and reusing its response ID, which is exactly the symptom you described.

 

That gives each CC user a separate email, a separate responder, and a separate response ID, instead of everyone receiving the caller's link.