Bulk Load Utterances for Einstein Bots

0
70


Workbench is a tool that most Salesforce Admins have come to rely on for a wide variety of purposes.

***You have a lot of power in Workbench, so use EXTREME CAUTION.***

These instructions apply only to the My Trailhead Playground environment created as a part of the Build an Einstein Bot trail.

We will focus on the data insertion capabilities of Workbench here as a utility for bulk loading a comma separated list of utterances.

Before we begin, it’s worth taking a quick look at the example utterance dataset and understand the columns.

Pro Tip: MlDomainName can be the API name for either your Einstein Intent Set or Einstein Bot. If you’d rather load the utterances directly into your Einstein Bot, just change the values in that column.

Create an Einstein Intent Set

1. Let’s create an Einstein Intent Set to house the new utterances. In Lightning Setup, go ahead and create a new Intent Set called My First Intent Set and select Edit (not View) from the little down-arrow on the right.

2. Create a couple of new Intents here for Transfer To Agent as well as Appointment Related.

You can drill into these newly created Intents and add utterances manually, but this post is about bulk loading, so explore that on your own if you’d like. Drill in after we finish the bulk load operation to see all of the newly imported data.

Use Workbench to load your dataset

1. Now, open a new browser tab and navigate to https://workbench.developerforce.com. You will be prompted to authenticate into your My Trailhead Playground and agree to the terms of service.

2. Select Data > Insert from the menu at the top of your screen.

3. Select the MlIntentUtterance object from the list and choose the comma separated file containing your utterances.

You can download my example dataset of utterances for Transfer To Agent and Appointment Related here.

4. The next screen asks you to confirm the field mapping between the object you’ve selected and the columns in your .csv file. Workbench should select the correct mappings as follows. If so, click Map Fields.

5. One final confirmation message before you pull the trigger. Click Confirm Insert if everything is correct.

6. Workbench will list results for the record insertions. If all goes well, you should see 300 records created successfully.

7. Now pop back over to Salesforce Lightning Setup and refresh your screen. You should see 150 utterances loaded into each of your intents.

Add the Intent Set to your dialogs

1. Navigate back to Bot Builder and click on the Transfer To Agent dialog. Click on the Dialog Intent tab and then click the Add Intent button. Select the Transfer To Agent Intent and click Save.

2. Repeat step 1 for the Appointment Related dialog.

3. Your new utterances will not be incorporated into the AI model until you re-build the model. Select the Model Management tab from to top-left of your Bot Builder screen. Deactivate your bot and click on the Build Model button.

That’s it! You can use this same approach to run many types of bulk operations on your AI datasets in Salesforce.



Read More

LEAVE A REPLY

Please enter your comment!
Please enter your name here