Tree Search API

Some of our customers with a lot of trees have asked us to incorporate a tree search feature into Zingtree.  This is handy for both internal use (Call Centers/Agent Scripting), as well as external use (support and troubleshooting). The goal is to make it easy for someone to find the proper tree.

Our Tree Search uses two pieces of information to locate trees: the tree Name, and the tree’s Tags.  Both of these are found in Settings.

Agent Interface

For internal use, our Agent Portal now includes the ability to find trees in two ways:

  • You can filter trees by tags from a drop-down list.
  • You can enter text to search.

Zingtree Hosted End-User Interface

For external use, you can have a search form where your end-users enter a search term, and any trees with Names or Tags matching the search term are displayed as links.

The easiest way is to use a Zingtree hosted search form.  Go to your Organizations and Billing page, and locate the Hosted Tree Search link at the bottom of the page. Click this link to open the search form.  You can share this URL with your customers.

An example using the Zingtree Gallery is here.

Tree Search API

If you want to include Tree Search on your own site, you’ll need to make use of our simple API. You can see a demo of the API in action here.

The process is:

  1. Locate your API Key at the bottom of the Organizations and Billing page.
  2. Create your search form.
  3. When the search is submitted, call our API like this:
    http://zingtree.com/api/tree-search.php?apikey={your API key}&search={your urlencoded search query)
  4. The API returns a JSON object of trees that match the search query. The JSON has the tree ID, and the tree name. The data looks like this:
    {"815089605":"Agent Script - Set Appointment",
    "164166011":"Pet Rock Demo",
    "666464897":"Simple Sales Funnel Demo",
    "506992892":"Training Simulation Template",
    "867287049":"Zingtree Tour"}
  5. Parse the JSON data to make links for each tree.

We’ve built a PHP sample to illustrate one way to implement this API. Download the example source code here.

You can try the sample here.

 

1 Trackback

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.