Category Archives: Integrations

Configuring Okta Single Sign-on

Okta Single Sign-on

If you’re looking for a way to get started with securing access to your trees via Single Sign-on, you’ll first need to have an Identity Provider to manage your logins. Okta is a great service – it’s easy to set up, and very popular.  This article will show you how to get Okta and Zingtree working together.

Set Up Overview

Configuring SSO requires Okta and Zingtree to share information with each other:

  1. Okta needs information about Zingtree.
  2. Zingtree needs information about Okta.

Once you have Zingtree and Okta successfully working together, you can limit access for authors and/or employees or agents.

For the setup, we recommend keeping two browser tabs open – one in Okta, and one in Zingtree.

Configuring Okta

To start, in the Zingtree top menu, go to Account, Single-Sign-on. You’ll see something like this:

 

You can switch between setup for Agents or Authors. Switch to Author setup by clicking this:

Switch back to Agent setup by clicking:

In the above screenshot, you can see the parameters (specific to your organization) to share with Okta. Let’s use this information to set up the Okta side:

  1. If you haven’t already created a free Okta account, do it now.
  2. Go to the Okta Dashboard.
  3. Click Add Applications under Shortcuts.
  4. Click Create New App.
  5. Choose SAML 2.0 as the sign-on method, and click Create.
  6. In the General Settings, give your application a name (like “Zingtree”), and click Next.
  7. Under SAML Settings, configure it as shown below.  For the Single Sign-on URL, use Zingtree’s Login URL. For the Audience URI, use Zingtree’s Entity ID.

  8. Click Next to finish the SAML setup.

Configuring Zingtree

Now, let’s get some information from Okta:

  1. In Okta, click Applications from the top menu, and go to Applications.
  2. Click the new Zingtree application we created.
  3. Click Sign on, then View Setup Instructions. Keep this page open in a browser tab.
  4. Now go back to the Zingtree tab, and click Edit Identity Provider Data.
  5. For the Zingtree Entity ID, use the Okta Identity Provider Issuer.
  6. For the Zingtree Login URL, use the Okta Identity Provider Single Sign-On URL.
  7. Copy the Okta certificate into the Zingtree certificate field.
  8. Click Save Identity Provider Settings.

OKTA Setup for Embedding

If you’re embedding trees in another page, or using an integration via Zendesk, Salesforce, Freshdesk or other apps, you may also need to tell OKTA allow for CORS requests. OKTA describes this here.

Here’s how to setup CORS:

  1. In your OKTA admin, go to Security, API:

  2. Go to Trusted Origins, and click Add Origin:

  3. Set the origin URL to https://zingtree.com, and tick both Type options.

  4. Click Save.

Testing Your SSO Setup

Once you’ve set up your Identity Provider and Zingtree for SSO, you can test from Zingtree as follows:

  1. In Zingtree, go to Account, Single Sign-on.
  2. Click the orange Test Agent Login or Test Author Login button at the lower right of the page.

From here. you can test logging into Okta from Zingtree.  If you’re already logged in, the test will just return your email or another identifier from Okta.  If you’re not yet logged in, the Okta’s login screen will appear, and then you will be returned to the Zingtree SSO test page after logging in.

Enabling SSO for Agents/End-Users

Once everything is working, in Zingtree go to Account, Single Sign-on. Click Enable Agents:

Next,  you need to restrict access to each tree as follows:

  1. Go to My Trees, and select the tree that you want to require SSO login.
  2. Click the Settings tool, and you’ll see something like this:

  3. Check Require Single Sign-on (SSO) Login to Access.
  4. Click Update Settings.

Note: Once SSO is set up, any new trees created will have SSO required by default.

Enabling SSO for Authors

Once SSO for authors is set up and working, you’ll need to enable it as follows:

  1. Go to Account, Single Sign-on.
  2. Click Switch to SSO for Authors.
  3. Make sure Enable Authors is checked.

One More Step: You also need to add authors to your organization via Account, My Authors. They will not be required to use a Zingtree login to gain access, but this also validates them as a person who has access to your organization’s trees.

Configuring Okta for Embedding or Pop-up Overlays

By default, Okta doesn’t allow logins from iFrames. You can override this as follows:

  1. In Okta, select Settings, Customization.
  2. Make sure Allow iFrame Embedding is selected.

Any questions? Don’t hesitate to reach out

This article was originally published in 2017 and has been updated for accuracy. 

Updating Salesforce Cases from Decision Trees

salesforce and zingtree

If you are launching Zingtree decision trees from within Salesforce, you have the ability to update the case record from any node of your tree. Here’s a summary of how to do it:

  1. Make sure your Agent Script button or link is set up according to this article.
  2. Add a Connected App to your Salesforce.
  3. Add the Salesforce Object Updater app to your organization within Zingtree.
  4. On any node in your tree, have the app trigger to update the case.
  5. Any Zingtree variables that begin with sf_ will update the corresponding field in Salesforce.

Adding a Connected App in Salesforce

To set up your Salesforce Connected App:

  1. Login into Salesforce and navigate to Setup, Create, Apps.
  2. Under Connected Apps, click New.
  3. Fill in the mandatory fields.
  4. Check the Enable OAuth Settings box.
  5. In the Callback URL field, enter this URL:
    https://zingtree.com/apps/salesforce/auth.php
  6. Under Available OAuth Scopes select:
    Perform requests on your behalf at any time (refresh_token, offline_access)
    Access your Basic Information (id, profile, email, address, phone)
  7. Your OAuth configuration should look like this when finished:

  8. Click Save and make a note of the generated Consumer Key and Consumer Secret. These need to be entered in the next step.

Adding the Salesforce Updater App

To add the App, do the following:

  1. Make sure you are logged into your Zingtree account.
  2. In Zingtree, go to Account, My Apps.
  3. Select the Salesforce Object Updater app.
  4. Enter your Consumer Key and Consumer Secret from the previous task.

    Click Continue.

  5. Allow access to your Salesforce account. (You may need to log into the account first.)

The Salesforce: Object Updater App will now appear in the list of Apps in My Apps.

Triggering a Salesforce Object Update

Once the App is installed in your organization, you can trigger a Salesforce update from any node in your tree.

  1. Edit the node in Zingtree where you want the update to occur. When this node is reached by an end user, the updater app will trigger.
  2. Under Apps/Webhooks, select your new app Salesforce: Object Updater.

     

  3. Click Save Changes.

 

Setting up Variable Names

As a part of your Zingtree session, you can collect data variables. Any variable that starts with sf_ will be used to update the corresponding field in Salesforce. For example, if you have a Salesforce field named description, a Zingtree variable named sf_description will be used to update that field.

Adding a Session Transcript

To include the Q&A history of the Zingtree session in a case field, you need to add a special field named Zingtree_Transcript to your Salesforce Cases.

In Salesforce:

  1. Go To Setup, Build, Customize, Cases, Fields.
  2. Scroll down to Case Custom Fields, and add a new field.
  3. The Data Type should be Text Area (Long). Click Next.
  4. The Field Name must be Zingtree_Transcript. Other parameters are your choice. See this example:


    Enter the other parameters, then click Next.

  5. Make the field read-only for all users, then click Next.
  6. Pick the Case Layouts where this information will be displayed, then click Save.

Troubleshooting

In case things aren’t working as you expect, here’s what to look out for:

  1. Changes to your case may not be reflected right away. Sometimes reloading the case (refreshing the page) will show the updates.
  2. If a Zingtree variable starting with sf_ has no field name counterpart in Salesforce, then the update will fail.
  3. You can check the Zingtree Event Log (Account, Event Log) to see all operations with Salesforce. This will show successes and failed updates, with error messages in case of failure.

How to Send Email from Decision Trees

send email from trees

One of the most frequent requests we get from customers is about sending email. We’ve spent a lot of time to make this process as simple as possible.

With Zingtree, you can use Email Nodes to send email in two ways:

  • Automatically, with no end-user interaction.
  • Showing a pre-defined form for the end-user to enter a message.

Emails can include everything you need:

  • The Session transcript.
  • Variables entered during the session.
  • Images and formatted text.
  • Attachments.

Sending  Emails Automatically

Emails can be sent automatically, with no end-user interaction. Start by creating an Email Node as follows:

  1. Click Tools, then Add Node.
  2. Select Email Node as the node type. The Send Method should be set to Send Automatically.
  3. The Email Node editor appears.
  4. Add a Page Title (mostly for your reference when using the Zingtree editing tools)
  5. In Send Email to, enter the delivery email address. You can enter multiple recipient email addresses separated by commas.
  6. Enter a subject and a message. The message can include images, formatted text, or placeholders for variables. For example, if you collect a variable called name, just add #name# into the email body for it to appear.
  7. Check Include Session Data in Email to include the Q&A transcript, and any data collected in the email. You can also check “Securely deliver session data via Link”, which will provide a link to the session information, instead of including it in the email body.
  8. In After Sending, choose a node to go to next. Or, choose Go to URL, and enter a URL to launch instead, like this:
  9. Click Save Changes when finished.

How to Create an Email Form Node

Your end-users can be presented with a stock email form, which looks like this:

You can make a node that displays this form by creating an Email Node as follows:

  1. Click Tools, then Add Node.
  2. Select Email Node as the node type. The Email Node editor appears.
  3. IMPORTANT: For the Send Method, select Show Form Before Sending.
  4. Add a Page Title (mostly for your reference when using the Zingtree editing tools)
  5. Add text for the Send Message button.
  6. In Send Email to, enter the delivery email address. You can enter multiple recipient email addresses separated by commas.
  7. You can enter a default subject or message. These are pre-filled in the email form.
  8. Check Include Session Data in Email to include the Q&A transcript, and any data collected in the email. You can also check “Securely deliver session data via Link”, which will provide a link to the session information, instead of including it in the email body.
  9. In After Sending, choose a node to go to next. Or, choose Go to URL, and enter a URL to launch instead, like this:
  10. Click Save Changes when finished.

Summary

These two methods are the recommended ways to send an email and should be used in place of any other methods.

As always, if you have any ideas to share with us on this or any other features, please let us know!

This article was originally published on June 15, 2018, and has been updated for accuracy. 

Sending and Receiving Data from Decision Trees with Webhooks

Our larger corporate clients have asked us for a way to be able to exchange Zingtree data with other applications. Some customers want to send data from a Zingtree session to another application or include data from another application in Zingtree.

Zingtree’s data exchange feature makes use of Webhooks with JSON formatted data. In fact, a lot of the tools we utilize work the same way.

Here’s an Example

To demonstrate how to send and receive data from your decision trees, we will walk through how to build a simple tree that asks for a USA zip code, and then shows the city and state for that zip code inside the tree.

Try this demo tree in the Zingtree Gallery here.

We will send data to a custom webhook we built, which takes a parameter of a zip code. It returns a JSON structure with the city and state info.  Here’s an example of the webhook in use:

http://zingtree.com/apps/webhook/filters/zippopotamus.php?zip=94960

If you click the link above, you’ll see these results:

{"zip":"94960","state":"California","state_abbreviation":"CA","city":"San Anselmo"}

The PHP source code for the webhook URL is here.

The variables #city#, #state# and #state_abbreviation# will now be usable by Zingtree. So to show the city, just enter #city# into the content area of any node.

Webhooks Process

Here’s a summary of how this works:

  1. Add the webhook to your organization’s apps.
  2. Include a call to the webhook in a node. When the node is visited, the call is executed.
  3. Any JSON variables returned by the call become Zingtree variables.

Adding the Webhook:

  1. Go to Account > My Apps.
  2. Click the Webhook button under My Apps.
  3. Enter a name for the webhook, and the URL as shown:The URL is:
     http://zingtree.com/apps/webhook/filters/zippopotamus.php?zip=#zip#

    #zip# will receive the zip code variable entered by the end-user.

  4. Click Add Webhook. This makes the hook available to your trees.

Calling the Webhook when a node is visited:

  1. Go to Overview, and edit the node you want to trigger the webhook call.
  2. Under Send Message To, select Webhook: Zip Lookup.

Universal Parameters

Every call to the webhook URL you provide always includes the following parameters:

  • node_id
  • session_id

Adding Security/Authorization

You can add an extra layer of security to your webhooks by passing an authorization token into the URL that launches your tree. The token is passed back to the webhook URL in the HTTP header.

To send the authorization token MYTOKEN, add this to the URL that launches the tree:

&auth_token=MYTOKEN

To check the token in your webhook, look at the X-Auth-Token value in the HTTP header.

Please note: The auth_token remains the same for the entire tree session.

Credits

The demo uses the free zippopotam.us postal code lookup service.


Any questions? We’re here to help – please reach out at any time via the feedback page or the orange chat window at the bottom right of our homepage.

This article was originally published on April 28, 2016, and has been updated for accuracy. 

Decision Trees with Logic Nodes

In order to make decision trees that can help solve real-world problems, sometimes you need the ability to do more than just choose a path based upon a finite set of choices. For these reasons, we’ve introduced Logic Nodes into Zingtree.

In addition, we’ve found that many of our customer’s integrations are passing data variables into Zingtree, and there are situations where they would like to act on the value of those variables. Logic Nodes make this easy.

If you’re an existing Zingtree author, Logic Nodes replace Scoring Nodes from previous versions. Any tree that is using Scoring Nodes is automatically migrated to this new system, without losing any functionality or you having to do any updating of your trees.

Here’s How Logic Nodes Work

When you edit or create a Logic Node, you’ll see something like this:

Logic Nodes test the value of your Zingtree variables with a series of rules and jump to a node when a condition is met. The rules are applied in order, so once a rule condition is met, the node assigned to the rule opens next. You can also assign a default node to jump to in case no rules apply.

In the example above, if the variable fruit equals banana, then Zingtree will open node #8, the “Banana” node. If fruit is watermelon, then the default “Something Else” node opens.

About Variables

Variables can be numeric or text, and the comparisons work for either data type. You can bring variables into your trees in several ways:

Note: Your choice of variables is shown in a drop-down list. If Zingtree hasn’t encountered a variable yet in one of the above scenarios, then it won’t appear as an option.

Editing Rules

When editing your Logic Nodes, you can edit your rules as follows:

  • Reorder rules by dragging them up and down with this tool: Reorder Logic test
  • Delete a rule by clicking on this: Delete logic test
  • Select any existing variable from the Variables drop-down.
  • Select an operator (=, ≠, <, >, ≤, ≥ ).
  • Enter a value to perform the test upon.

You must also enter a default node to jump to if no conditions are met.

Zingtree Logic Nodes give your decision trees a bonus option for adding extra intelligence to your processes and troubleshooters. Do you have a cool application for Logic Nodes you’d like to share with us? Reach out and tell us your story!

This article was originally published on May 8, 2017, but all the information is just as important and relevant.

Zapier Decision Tree Integrations with Zingtree

zingtree zapier integration

Our Zapier app makes it easy to send data collected during each Zingtree session to 1000+ applications supported by Zapier. In case you haven’t heard of it, Zapier is a tool that simplifies data exchange between various web applications. We’re big fans.

Here are some cool things you can do with Zingtree and Zapier:

  • Send data collected in a Zingtree session to Salesforce, Zoho, Highrise, or any other CRM.
  • Add an email address entered into a tree into Mailchimp.
  • Send yourself an email or SMS message when a customer reaches a critical node in a tree.
  • Save new customer information in a Google Sheets row.
  • Create Trello cards from trees, and include customer notes and session data.
  • And tons more!

When using Zapier, you create “Zaps.” A Zap has a “trigger,” which is the source of the data, and an “action,” which is where the data gets sent. Most of our customers want to send data from Zingtree to another app, so we’ll demonstrate how this is done here.

Before starting, you may want to examine a demo tree from our Gallery that gathers data and sends it to Zapier, or copy it to your account.

How to Set up Zapier for Zingtree

The Zingtree Zapier app is currently invite-only. But if you’re reading this article, you’re invited!

  1. Create a free Zapier account at Zapier.com.
  2. Go here to accept an invitation to use the Zingtree app. The invitation appears:

    Accept the invite.
  3. You’ll be prompted to make a new Zap:
    Click Make a new Zap.
  4. You’ll be asked to choose a Trigger App, which is the source of the data exchange.
    Search for Zingtree, and select Zingtree (Beta).
  5. You’ll be asked to choose a single trigger.
    Click Save + Continue.
  6. Next, you’ll need to connect your Zingtree account and a tree to Zapier.
    Click Connect a New Account.
  7. You’ll be asked for your Zingtree API Key, which you can find here. Also, enter the Tree ID that will be sending data to Zapier.
    Click Continue when finished.
  8. Change the name of the account, then click Test.

    You should see “success.” Click Save + Continue.
  9. Next, Zapier will attempt to retrieve any variables or sample data from your tree. If this is a new tree, you may want to run through it once and gather some data.
    Click Fetch & Continue.
  10. You’ll see some of the stock data that Zingtree always provides, as well as any custom data for your tree. Again, if you don’t see all the data you expect, do a test run through your tree, and enter some data at least once. This will make the rest of the process easier.
    Click Continue.

Set up the Action App – Email Example

So now you’re done with the Zingtree part. Congratulations! Next, you need to set up an Action App, which will receive data from Zingtree. Let’s set up email delivery as an action, as follows:

  1. Search for email, and choose Email by Zapier as an action app.
    Select Email by Zapier.
  2. This app has just one action.
    Click Save + Continue.
  3. Fill in details for the outbound email. You can insert fields from Zingtree in the body of the email as well.Click Continue when the email is set up correctly.
  4. You’ll see  a preview of what to expect.
    Click Create & Continue to save the action and send a test email.
  5. You should see another “success” screen.
    Click Finish when the email appears as you like.
  6. Name your Zap Zingtree to Email, and turn it on!

Your Zapier Zap is all set.

Making Zingtree Send Data

The final step is to tell Zingtree when to send all the data collected in a session to Zapier. This can be triggered from one or more nodes when they are seen by the end-user of your tree.

  1. From Overview, Edit Node, edit the node that you want to trigger sending data to Zapier.
  2. Click the Apps/Webhooks tab.
  3. Click Add App/Webhook. You’ll see something like this:

  4. Under Call App or Webhook, select Zapier: Zingtree to Email. This is the new Zap you created.
  5. Click Save Changes.
  6. Now try a test from Zingtree. Using Preview or the Publish tool, navigate your tree, and when you reach the node that triggers the send, you should see something in your inbox. IMPORTANT: Make sure to use https in your published Zingtree URL when using Zapier.

Once you get your first Zap done, it becomes easy and addictive to hook Zingtree to the other applications that your business depends upon. So keep going!

Have any questions? Contact us anytime!

How to Use Process Flows to Build Mailchimp Lists

As end-users are using your Zingtree decision trees, you can add any information collected during the session into a MailChimp mailing list. Zingtree has a handy MailChimp App for just this purpose.

Here’s how to add data from Zingtree to a MailChimp list.

  1. In Zingtree, go to Account, My Apps, and click add Add MailChimp. The MailChimp configuration screen appears:

  2. Enter a name for this App. For example: “Add to Mailing List”.
  3. Enter the MailChimp API Key. To find your API Key, log into MailChimp, and select Account, Extra, API Keys. Generate an API key if you haven’t done so already.
  4. Enter your MailChimp List ID into the configuration. In MailChimp, click Lists, then select Settings from the drop-down next to your list. The List ID will be at the bottom of the page.
  5. Click Add MailChimp App when finished.
  6. Edit the node where you want to add to a MailChimp list. Look under Show Advanced Options, Send Message To App. Pick the name of the app you just created: “MailChimp: Add to Mailing List”.

  7. Important: The field names you are using in Zingtree must match the merge tag names in MailChimp. So if you have merge tags NAME and ADDRESS in MailChimp, you would use variables named NAME and ADDRESS in Zingtree. You can find the merge tags for each field in MailChimp from List, Settings under List fields and *|MERGE|* tags. They will appear like this:

  8. In Zingtree, the email address of the end user should be a variable named either EMAIL or email.

Once the end-user reaches the node you built in step 6, MailChimp will receive the information collected by Zingtree and add all matching fields to the list for email.

Do you have a cool application for this feature? Let us know on our Feedback page.

Using Decision Trees for Smart Scheduling with Calendly

One of the process issues we’ve faced as a company is the amount of time it takes to coordinate scheduling online demos for prospective new customers. If only there was a way to intelligently gather background information from each prospective customer, and then route the requests to the proper team… oh, wait! Zingtree can do that.

If you request a demo from our Contact Us page, you’ll launch a decision tree that determines what sort of customer you are, gathers relevant background information, and then opens a scheduler built with Calendly for the relevant team.

Calendly is really well designed, and about as easy to use as possible. You can set up individuals or teams, and Calendly accesses their Outlook or Google calendars so that the available times are shown for each person or group. Rather than having a ton of back-and-forth with every party involved, our customers can quickly see when we are available, and pick a time that works with their schedule.

Calendly also lets you pre-fill custom forms used in the scheduling process. So besides name and email, we create a backgrounder using Zingtree data entry fields and button click variables for each meeting request.  Our calendar entries include something like this:

name: Joe Customer
company: Acme Widgets
email: joe@acme.com
website: acme.com
Use_Case: Internal & External
Agents: up to 10
integrations: Zendesk
data_transfer: Send from Zingtree to another App
features: how to create trees
business: We manufacture widgets
how_help: save time in support

Not only do we make it convenient for the customer to provide this information to us, but also this helps us prepare properly for each meeting.

You can see how this scheduling decision tree is built here. Or…

 

 

Can you use this sort of system in your business? Let us know what you think! (And maybe even schedule a demo.)

Zendesk Agent Scripting App – Version 10.1

Update: Version 12 is now available. Learn more and install it from here.

If you’re a Zendesk user in a Contact Center environment,  you’ll want to be using our Zendesk Agent Scripting app.  This makes it easy to guide, train and onboard agents and is a huge productivity booster for everyone.

The Agent Scripting app appears as a button in the right-hand panel:

Click Open Script, and you’ll see your decision tree in a pop-over like this:

If another agent picks up the ticket, they return to the last viewed node, and can see each step taken previously by opening the History:

 

Benefits of the Zendesk Agent Scripting App

  • Standardization: Show a guided path for each ticket, so that Agents follow the proper operating policies or troubleshooting procedures.
  • Pause and Resume: If a ticket is transferred, the supervisor or new agent is taken to the last place in the script, and can see the history of the previous steps taken.
  • Automatic Script Selection: The Agent Scripting App can choose a script based on the Zendesk brand, Zendesk ticket tags, or the value of a custom field.
  • Agent Feedback: Agents can send feedback directly to the authors of the decision trees with a single button click. Feedback is delivered to each author’s email, and includes the tree ID and node number where the feedback was sent from.
  • Zendesk Ticket Data in your Scripts: Values in any custom field, as well as Zendesk ticket tags and user tags, are transferred into your script so you can echo them, or use these variables to branch via Logic Nodes.
  • Automatic Ticket Updating: Tags and custom fields in the ticket can be updated from actions in the script – either via buttons clicked in the script, or from data entry collected.

New Features in Version 10

If  you’re using a previous version of the Zendesk Agent Scripting app, you may want to upgrade to take advantages of these new benefits:

  • Pop-overs: Scripts now appear as pop-overs, rather than being constrained to the right-hand panel.
  • Ticket Updating: Your tickets can automatically update by navigating the script, or by entering data into Zingtree Data Entry Fields. For example, the start of your script could offer the agent a choice of a product, and the “product” field in your ticket will be automatically selected when the agent makes a choice.

Note: Don’t remove the current version of Agent Scripting until you are ready to make the switch. Versions 9 and earlier may not be updated going forward.

Demo Video

This two minute video shows you how Agents interact with the Agent Scripting App:

 

Getting Started

Here are the basic steps to get up and running:

  1. Build an interactive decision tree script with Zingtree (or use one of our demos to start).
  2. Install the Agent Scripting App (version 10) into Zendesk.
  3. Configure the Agent Scripting app within Zendesk.
  4. If you want to have your decision tree scripts update your  Zendesk tickets, you’ll need to add variables and/or tags to your Zingtree tree to match your Zendesk setup.
  5. If you want to enable automatic script selection, you’ll need to add tags to your trees in Zingtree and configure the Zendesk Agent Scripting app properly.

Installing the Agent Scripting App into Zendesk

Download and configure the Zendesk Agent Scripting App version 10 like so:

  1. Download the Agent Scripting app here.
  2. In Zendesk, click the Admin icon and go to Apps > Manage.

  3. Click Upload Private App.

  4. The Upload App page appears.

  5. Enter “Zingtree Agent Scripting” for the App Name.
  6. For App File, locate the file zingtree-agent-scripting-v10.zip you downloaded in step 1.
  7. Click Upload, then confirm if necessary.

Configuring the App

Once you’ve uploaded the app, click App Configuration to see the configuration screen:

Here’s what each item does:

Tree ID: This is the default tree that appears when agents click “Open Script”.  (You should always have a default tree.)

Hide Integration Setup Info: When you are setting up Agent Scripting for the first time, you may need some information about your Zendesk setup to take advantage of automatically updating ticket fields. An “Integration Setup Info” link appears by default when you first install the app, and ticking this option hides it.

Match Tree Tags to Zendesk Brand: If this option is checked, the subdomain of the selected brand will be matched to a Zingtree tree tag.  Any matching tree or trees will appear.  For example, if the brand subdomain is xyz.zendesk.com, any trees tagged as xyz (using the Zingtree Settings tool) will appear.

Match Tree Tags to Zendesk Ticket Tags: If checked, the values in the Zendesk ticket tags will be matched with your Zingtree tree tags (set via the Zingtree Settings tool) to show one or more matching scripts.

Match Tree Tags to values in a Custom field: If you want to use a custom field value to show matching scripts, enter the Zendesk custom field identifier here. The field name can be found using the Integration Setup Info link that first appears in the sidebar when you install the app.

Zingtree API key: Each organization in Zingtree has an API key, which is used to match scripts. If you’re using one of the tag matching options, this is required. Your API key can be found at zingtree.com under Help, API.

Enabling Automatic Script Selection

Automatic Script Selection works by matching tree tags you set in Zingtree to values in the Brand, Tags, or a custom field in a Zendesk ticket. For example, if a tree is tagged with “astrology”, and the ticket tags include “astrology”, then that tree appears. If several trees match, then they will all appear, and the agent can choose one.

To open a script based upon Brand:

  • Add tags to your trees for each brand you want to match. So if one of your brands is xyz.zendesk.com, use xyz as a tree tag in Zingtree for all the trees you want to show.
  • Make sure Match Tree Tags to Zendesk Brand is checked in the App Configuration.

To open a script based upon Zendesk ticket tags:

  • Add tags to your trees for each tag you want to match. So if one of your ticket tag possibilities is “billing”, use billing as a tree tag in Zingtree for all the trees you want to show.
  • Make sure Match Tree Tags to Zendesk Ticket Tags is checked in the App Configuration.

To open a script based upon a custom field:

  • Add tags to your trees for each possible custom field value you want to match. So if one of your custom field values is “billing”, use billing as a tree tag in Zingtree for all the trees you want to show.
  • Make sure the proper Zendesk field variable name is entered for  Match Tree Tags to values in a Custom Field is checked in the App Configuration.


Adding tags to a tree in Zingtree is done like this:

  1. Select a tree from My Trees.
  2. Go to the Settings tool.
  3. Click the Organize tab.
  4. Enter or select a tag from the Tree Tags field.

     

  5. Click Update Settings.

How to Configure to Update Ticket Fields

As agents navigate through your trees, their use of the decision tree scripts you create can automatically update any custom fields in that ticket. This can be done in two ways:

  • By clicking a button in a script
  • By entering data into Zingtree data entry fields.

The key is to use variable names in your Zingtree that match the ones used in Zendesk.

First of all, determine the names of the variables in Zendesk by clicking the Integration Setup Info link in the Agent Scripting app. You’ll see something like this:

You’ll see the label for the field as it appears in Zendesk’s ticket form, and the Zendesk variable next to it. In the above example, the Product custom field variable is custom_field_22899289. This is a drop-down selector, and the Zendesk values for the field options are astrology and insurance.

For the rest of this example, we’ll use custom_field_22899289 as the custom field variable.

To make a button selection update a custom field, you’ll set it up in your Zingtree as follows:

  1. Go to the Overview tool, and edit the node whose button selections will update the ticket.
  2. Click Edit Buttons (or Add Buttons if you don’t have any buttons defined). The button editor appears:

  3. Make sure Assign Button Click Variable is checked. This makes the other options appear.
  4. For the Button Click Variable, enter your custom field variable from Zendesk (custom_field_22899289 in the example).
  5. For each button option, enter the value of the variable under Score/Value. If this is a drop-down list in your Zendesk ticket, you’ll need to make sure the Score/Value entered matches one of the drop-down option values as shown in the Integration Setup Info.
  6. Click Save Changes when you’re done configuring buttons.

Bonus: Adding Tags via button clicks:

Button clicks can also add tags to a ticket. In the above example, clicking Something Else adds the tag other_tag to the ticket. Just include the tag name with two colons after the button text. So entering a button like Something Else::other_tag will add the tag other_tag to the ticket if this is clicked, but agents will only see Something Else as an option.

Using Zingtree Data Entry Fields to Update Tickets

Just like the above example, you can also use Zingtree for data entry, and have that data automatically transferred to your ticket. The key is to use the same variable name in Zingtree as you used in Zendesk. The Integration Setup Info link in the sidebar will give you those Zendesk variable names.

Example: If you have a text entry field in Zingtree you want to update into the Zendesk field custom_field_1234, you would set up the variable name as follows:

 

Try It with Example Data

You can use trees from the Zingtree Gallery to see how the Agent Scripting app works.

For a single tree, enter ’14’ as the Tree ID. This will show an Astrology website troubleshooter example.

For multiple trees, see how a tree can be selected by tag by doing the following:

  1. Enter 6a103737e44e4aa6e1e4b6b0bcb46f83 as the API key.
  2. Make sure Match Tree Tags to Zendesk Ticket Tags is checked.
  3. Try entering one or more of these tags into a ticket: “zingtree”, “astrology”, “pet_rock”.

Any questions? We’re always here to help

Sending Slack Notifications from Decision Trees

slack+zingtree

Slack has become the go-to collaboration platform of choice for so many companies, and people are also using it to track events. We have also recently adopted Slack and wanted a way to send messages to Slack channels whenever something occurred in one of our own Zingtrees.

So, as part of our mission to make Zingtree interoperable with as many popular platforms as possible, we’ve added this capability to our most recent release.

How it Works

When an end-user visits a node in one of your decision trees, you can have that node trigger a custom Slack notification. Once you set up Slack for your organization, any node in any tree can send a message to Slack.

Notifications in Slack look like this:

Slack notification from Zingtree

Setup

First, you need to give your organization access to the Slack app:

  1. Go to Account > My Apps.
  2. Click Slack under Add Apps.Add Slack to Zingtree
  3. Slack will ask you to authorize Zingtree access. Select the Slack channel you want to receive notifications (“post to”), then click Authorize.Authorizing Slack
  4. You will be returned to Zingtree, and Slack will appear in your list of apps.Slack installed in Zingtree

Now you can configure any node in any tree to send a custom Slack notification:

  1. Pick a tree, and go to the Overview tool.
  2. Pick a node, and click the Edit button.
  3. Locate the Send Message To option, and select Slack.Slack messaging added to a Zingtree Node.
  4. Enter a message that will be sent to your Slack channel.  You can also include any form variables (i.e. #name#).

Now, Preview your tree, and visit the node where you just added a Slack message. The custom message will appear in Slack, along with a link to the session transcript:

Slack notification

 


 

Any questions about this, or any of our other integrations? Please contact us anytime.

This article was originally published on April 20, 2016.