In this tutorial we will import intents into ServisBOT and sync them with Dialogflow.
The following items are required before importing intents and actions into the ServisBOT platform.
Owner
permissionFor this demo, use the Dialogflow V2 Bot
blueprint.
Take note of your bot’s name in the system and then use our common definition format to define the intents, utterances, and actions.
bot,intent,utterance
Sbimport,welcome,hi
Sbimport,welcome,hello
Sbimport,welcome,hey
Sbimport,howAreYou,how are you
Sbimport,howAreYou,sup
Sbimport,howAreYou,how are u
Sbimport,botimport,how does the intent import work
Sbimport,botimport,what does the import function look like
Sbimport,botimport,How do I import intents
Sample Utterance File
Actions are expected to be in the following CSV file format.
bot,intent,lifecycleTrigger,type,value
Sbimport,welcome,fulfilment,message,hi!
Sbimport,howAreYou,fulfilment,markup,"<TimelineMessage>\n\t<Card title='Im doing great!' imgUrl='https://picsum.photos/250/250/?random&g' alt='Lovely image' />\n</TimelineMessage>"
Sbimport,botimport,fulfilment,message,You first set up your csvs for intents and for actions then import them
Columns
Column Label | Required | Default | Notes |
---|---|---|---|
bot | True | the botname for the bot you are assigning it to | |
intent | True | the intent alias you want to set an action for | |
lifecycleTrigger | False | fulfilment | Whether you want your action to be triggered when the intent is detected (but slots are still pending) Detection , or once an intent is ready to be fullfilled. |
value | True | the value of the response |
Sample Action File
lifecycleTrigger and type are optional columns. Everything defaults to “Fulfillment” and “message”
You can use either the Portal or the ServisBOT CLI to import your intents.
In the Intent
tab of each Bot page you can use the Import Intent
button to upload your utterance and action CSV files.
“botName” relates to the name of the ServisBot bot that you created - not the name of your Dialogflow Bot. “utterances.csv” and “actions.csv” can be supplied as the directory path to each associated file.
sb-cli intent import utterances.csv actions.csv
Available in version 2.11.1 and later
After importing intents, you should be able to see your intents by navigating back to your bot detail pages, and exploring the Intents
Tab.
Bot Army
Section of portal.Publish
button.Your bot has been successfully published
, click on the Test
button.