Forums/Community/Community questions & answers

Answered

Show custom feedback widget when ticket status = solved only

Kai Hilton-Jones
asked this on December 12, 2009 12:43

I have created a feedback widget using a Custom Widget and a free surveygizmo.com account. The requester name, agent name and ticket # are all passed into the survey using querystrings. See screenshot attached.

The widget code reads:

<iframe src ="http:// www .surveygizmo.com/s/xxxxxx/request-system-agent-feedback?ticketid={{ticket.id}}&requesterf={{ticket.requester.first_name}}&requesterl={{ticket.requester.last_name}}&agentf={{ticket.assignee.first_name}}&agentl={{ticket.assignee.last_name}}" width="100%" height="300">
  <p>Your browser does not support iframes.</p>
</iframe>

(I have changed the iFrame URL slightly for privacy reasons)

 

I modified the settings in Survey Gizmo to fit the survey into the widget width (~180px)


I would like to show the widget in solved tickets only, and hide it in open and pending tickets. Is that possible?

 

Comments

User photo
Sfahmy

this is very interesting ... anyway we can integrate this with a widget that on survey close we can send it as an email

December 16, 2009 01:01
User photo
NickC

I'm trying to implement the same thing and I'd like to give them the option of responding at any time. Basically, any data is good at this point. How did you get it to pass the requester, agent and ticket ID to the survey with the widget above?


I'm creating a survey for just basic feedback at this point but want that other info included.

December 16, 2009 06:36
User photo
NickC

Also, are you just using the survey site to analyze the feedback or are you manipulating it manually?

December 16, 2009 06:38
User photo
Kai Hilton-Jones
hhanks

Hi - thanks for the feedback.

>> "How did you get it to pass the requester, agent and ticket ID to the survey with the widget above? "

In Survey Gizmo, when editing the survey, click on Add Actions instead of Add Question, then select Hidden Value. On the next screen select URL Variable in the "Select a vriable" dropdown and enter your querystring variable name in the following format: [%%GET_XXX] in the Value box. E.g. my ticket ID querystring variable in the widget is ticketid so enter [%%GET_ticketid].

Survey Gizmo will then automatically get the quesrystring value and enter it into the hidden field.


Survey Gizmo has some reporting capabilities but you can also export all responses - including the hidden fields - to Excel.

 

Hope that help

 

December 16, 2009 06:50
User photo
Kai Hilton-Jones
hhanks

See attached hidden_field.png for a Survey Gizmo screenshot

December 16, 2009 06:52
User photo
Skip Moore
Zendesk
Check Answer
Event.observe( document, 'dom:loaded', function() {
$('ticket_status_id').observe('change',
   function(value){
     if ($('ticket_status_id').value == 3){ $('comment_value').value += $('comment_value').value + "test"; }
      });
    });

You can use this to monitor the change in the ticket status and run whatever code. This puts a comment at the end of whatever is in the comment text box

December 18, 2009 09:05
User photo
Kai Hilton-Jones
hhanks
Check Answer

Thanks Skip. Using your example I have created the following global javascript widget which seems to do the trick:

<pre>

Event.observe( document, 'dom:loaded', function() {
     if ($('ticket_status_id').value == 3){
         document.getElementById('widget_106426').style.visibility = 'visible';
     } else {
         document.getElementById('widget_106426').style.visibility = 'hidden';
     }
});

</pre>

Replace "106426" with the specific widget id

 

 

December 21, 2009 01:18
User photo
Kai Hilton-Jones
hhanks

OK ignore the <pre> tags

December 21, 2009 01:20
User photo
Kai Hilton-Jones
hhanks

Slight improvement to the above:

Event.observe( document, 'dom:loaded', function() {
     if ($('ticket_status_id').value == 3){
         document.getElementById('widget_106426').style.visibility = 'visible';
     } else {
         document.getElementById('widget_106426').style.visibility = 'hidden';
         document.getElementById('widget_106426').style.height = '0px';
     }
});

Sets the div height to 0 if hidden

December 21, 2009 01:32
User photo
Kai Hilton-Jones
hhanks
Check Answer

Update: hiding / showing based on ticket_status_id only works for agents as the status is not visible for end users.

Maybe the best way after all is to add a link to Survey Gizmo in the automated "solved" email, and pass in the ticket id etc as a querystring, e.g.

http:// www .surveygizmo.com/s/xxxxxx/request-system-agent-feedback?ticketid={{ticket.id}}&requesterf={{ticket.requester.first_name}}&requesterl={{ticket.requester.last_name}}&agentf={{ticket.assignee.first_name}}&agentl={{ticket.assignee.last_name}}

December 21, 2009 02:40