Zingtree integrates with Salesforce using the most advanced Lightning Web Components technology. With this integration, you can offer these benefits to your agents:

  • Convenient: Launch scripts right from within any Salesforce object.
  • Two Way data Transfer: Salesforce Object data can be displayed in the script, or used by a Logic Node to automatically branch. And data gathered in Zingtree can instantly update Salesforce.
  • Pause and Resume lets you transfer Cases (or any other object) from one person to another, and retain context and tree browsing history.
  • Flexible Configuration: Different decision tree scripts can appear for each object type, or even a specific record in each object. Or a different tree can appear based upon a field in Salesforce.

Salesforce lets you add apps to any part of a page layout. Here’s one way your decision trees can appear in Salesforce.

Installing the App

The first step is to install the Zingtree App into Salesforce from one of these links:

Once you install, you will be taken to the following page on SFDC

Click on one of the “install for” options, “I acknowledge…”, and then click on Install. You will get the following pop-up:

Check the box to grant access to the third-party website and click on Continue.

The installation will finish, and you will receive an email once the installation is complete, which may take a couple of minutes.

After the successful installation, you will see the following:

Click on Done. You will be taken to the following page where you can see the Zingtree app.

Apply Zingtree Package Permission Sets

Important: For using the App as someone who is not an Admin, you’ll need to set up Permission Sets for the App to work properly.

When you install the Zingtree package for Salesforce (SFDC), a number of new components are installed and prepared for you to use. Before you roll this out to your team, you’ll need to give access to the correct pieces of configuration. If you don’t, your users might have trouble actually interacting with the embedded trees.

Be sure to follow the following steps for applying the Permission Sets so that your users can access the various package components.

Permission Sets Included:

  • Zingtree Admin – For all Admins that will be configuring the Zingtree package/components. (E.g., SFDC System Administrators)
  • Zingtree User – For all Users of the Zingtree package (E.g., Support Reps, Salespeople, etc…)

How to Assign the Permission Sets

  1. Validate that you’re logged in as a Salesforce Administrator, or at least someone with Setup / Configure permissions in SFDC.
  2. Navigate to Setup > Home > Permission Sets:
  3. Find and click on the name of the appropriate Permission Set (Zingtree Admin or Zingtree User).

  4. Click on Manage Assignments.

  5. Click on Add Assignments.

  6. Add whichever users you’d like.

Configuring the App

Zingtree needs just two parameters for launching a specific tree:

To start, you can set global parameters for all objects that launch Zingtree. After that, you can override these defaults from the object’s page layout, or even add a Tree ID field to your object to have different trees appear for each record.

Here’s how to set the global configuration:

  1. Choose the Zingtree App from the top left of Salesforce.

  2. Pick Zingtree Configuration from the top of the page.

  3. Enter the API Key.  If you are logged in to Zingtree, you can find your API Key here.
  4. The hostname should always be https://zingtree.com unless you have a custom Zingtree server.
  5. Enter the default tree ID. This is the tree that will appear if you haven’t set a different tree ID at the object or record level.

  6. Make sure to click Submit when finished.

Add the App to a Layout Page

Once installed, you’ll need to add the App to one or more object layouts.

  1. Go to Salesforce Setup.
  2. Click on Object Manager.
  3. Choose the type of Object to which you’d like to attach a decision tree.
  4. Click on Lightning Record Pages.

  5. Pick the Record Page to modify:

  6. Click Edit:

  7. Drag the Zingtree Agent Script component onto the layout wherever you like it to appear.

  8. If you want to override the global default tree ID, click on the component to configure the new Tree ID to show.

  9. Make sure to click Save when finished.


Overriding the Tree ID from an individual Record

You can have different trees appear based upon a custom field in any record – this will override and object level or global level configurations you’ve set. Here’s how to do it:

  1. Add a custom field named Zingtree_Tree_id__c to your object. It should be a 12 character text field.
  2. If there’s a value in this field, it will be used as the tree ID instead of any other configuration. If it’s blank, the configuration ID is used instead.

Mapping Data Fields

The Zingtree Agent Scripting app can read data from Salesforce and show it in the script, or automatically branch using that variable in a Logic Node. Also, it can update your Salesforce object record instantly, either from a data entry field, or a button click. This works by setting up a simple field mapping. For example, if the Salesforce field is called name, the corresponding field in Zingtree would be called sf_name.

In this example, we’ll show how to update a Salesforce case record from a button click. This will update a field called Product in Salesforce.

First of all, you’ll need to get the Salesforce API name of the field.

  1. In Salesforce, go to Setup, Object Manager, and click on the object type – here we’ll choose a Case:

  2. Click on Fields and Relationships:

  3. Copy the field name next to Product. In this example it’s Zingtree__Product__c 

  4. The corresponding field name in Zingtree will be sf_Zingtree__Product__c.
  5. Now, open your tree in Zingtree, then go to the node where you want the field assignment to occur.
  6. Under the Content Tab, make sure Set Variable on Button Clicks is ticked, then enter the mapped field name that begins with sf_ (sf_Zingtree__Product__c in this example), and set the corresponding values next to each button.

  7. Make sure to save the changes.

Now, when the Acme Dynamite button is clicked, the Product field in the Salesforce Case will be filled with Dynamite.

Note that this technique also works for Data Entry Fields.

Predefining Variables to Map

Important: If you are just displaying fields from Salesforce inside of Zingtree, you will need to predefine them using the Zingtree Variables tool. Here’s how:

  1. From your tree in Zingtree, go to Tools, Variables.

  2. Click Add Predefined Variable.

  3. Enter a variable name that begins with sf_  (sf_name in this example).

  4. Click Add Variable when finished.