How to Display a Session Summary in your Trees

We get many requests to make it easy to show a session summary inside of a node. This can be helpful for an end-user to see how they reached a certain decision while traveling through the tree.

This is accomplished using the Zingtree Session Summary webhook. It loads the transcript of the session into a variable named session_history. You can also display any data entered or collected in the session using the variable data_entered.

Try this quick demo from the Zingtree Gallery to see how this works:

Configuring a Node to Show the Session Summary

This requires two pieces:

  • Sending a message to the Zingtree Session Summary webhook at the end of the session.
  • Inserting #session_history# into the node where you want to show the session history.

Optional: To show any data collected via Data Entry fields, you can include #data_entered# in the content area as well.

Step by step:

  1. Edit the node where you want to show the session summary.
  2. Click Show Advanced Options.
  3. Under Send Message to App, choose Webhook: Zingtree Session Summary.

  4. Insert the text #session_history# (or also #data_entered#) into the content area of the node.
  5. Click Save Changes when finished.

The Session Summary Demo gallery tree demonstrates this. Look at node #5 for specifics.

Advanced: Adding a “Copy to Clipboard” Button

To make it easy to copy data to the clipboard, do the following in HTML code view:

  1. Surround the area you want to copy with <div id=”zt-summary> and </div>.
  2. Add this code for the “Copy to Clipboard” button:
    <a class=”btn btn-orange” onclick=”copyToClipboard($(‘#zt-summary’)); return (false);”>Copy  to Clipboard</a>

Node #5 in the demo has this in place for you to examine.

Pro Tip: Returning a Plaintext Summary.

If you want your variables to be formatted as text (instead of HTML), add &formatted=2 to the Message field – like so:

Any questions? We’re here for you

1 Trackback

Leave a Reply

Your email address will not be published. Required fields are marked *