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
- Validate that you’re logged in as a Salesforce Administrator, or at least someone with Setup / Configure permissions in SFDC.
- Navigate to Setup > Home > Permission Sets:
- Find and click on the name of the appropriate Permission Set (Zingtree Admin or Zingtree User).
- Click on Manage Assignments.
- Click on Add Assignments.
- Add whichever users you’d like.
Configuring the App
Zingtree needs just two parameters for launching a specific tree:
- The Zingtree Tree ID.
- Your Zingtree API Key
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:
- Choose the Zingtree App from the top left of Salesforce.
- Pick Zingtree Configuration from the top of the page.
- Enter the API Key. If you are logged in to Zingtree, you can find your API Key here.
- The hostname should always be https://zingtree.com unless you have a custom Zingtree server.
- 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.
- 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.
- Go to Salesforce Setup.
- Click on Object Manager.
- Choose the type of Object to which you’d like to attach a decision tree.
- Click on Lightning Record Pages.
- Pick the Record Page to modify:
- Click Edit:
- Drag the Zingtree Agent Script component onto the layout wherever you like it to appear.
- If you want to override the global default tree ID, click on the component to configure the new Tree ID to show.
- 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:
- Add a custom field named Zingtree_Tree_id__c to your object. It should be a 12 character text field.
- 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.
- In Salesforce, go to Setup, Object Manager, and click on the object type – here we’ll choose a Case:
- Click on Fields and Relationships:
- Copy the field name next to Product. In this example it’s Zingtree__Product__c
- The corresponding field name in Zingtree will be sf_Zingtree__Product__c.
- Now, open your tree in Zingtree, then go to the node where you want the field assignment to occur.
- 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.
- 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:
- From your tree in Zingtree, go to Tools, Variables.
- Click Add Predefined Variable.
- Enter a variable name that begins with sf_ (sf_name in this example).
- Click Add Variable when finished.