SFDX plugins for automation around Einstein Bots. These are tasks that are currently not exposed via the metadata api.
sfdx bot:change-status
: To activate and deactivate a specific version of an Einstein Botsfdx bot:build-model
: To build the NLP model for a specific version of an Einstein Bot.sfdx bot:list-versions
: List all versions in the org for a given bot
-n
or--name
: DeveloperName of the Einstein Bot-b
or--botversion
: Version to activate or deactivate-a
or--activate
: Activate the bot.-d
or--deactivate
: Deactivate the bot-l
or--debug
: Verbose logging including screenshots of the bot activation/deactivation process
Note: : either -a
or -d
can be used at the same time and not both
$ sfdx bot:change-status -d -n MyFirstBot -b v2 --debug -u mydevorg
Found Bot 0Xx5e000000kMlkYAE, Version#2: 0Xx5e000000kMlkYAE , Status: Active
[0Xx5e000000kMlkYAE:0Xx5e000000kMlkYAE] - Logged into Setup
[0Xx5e000000kMlkYAE:0X95e000000l4qrCAA] - Clicked Deactivate Button
[0Xx5e000000kMlkYAE:0X95e000000l4qrCAA] - Confirmed deactivation Button
$ sfdx bot:change-status -d -n MyFirstBot -b v9 --debug -u mydevorg
Found Bot 0Xx5e000000kMlkYAE, Version#9: 0Xx5e000000kMlkYAE , Status: Inactive
ERROR running bot:change-status: The bot version you are trying to activate is already inactive.
$ sfdx bot:change-status -a -n MyFirstBot -b v9 --debug -u mydevorg
Found Bot 0Xx5e000000kMlkYAE, Version#9: 0X95e000000l4qrCAA , Status: Inactive
[0Xx5e000000kMlkYAE:0X95e000000l4qrCAA] - Logged into Setup
[0Xx5e000000kMlkYAE:0X95e000000l4qrCAA] - Clicked Activate Button
-n
or--name
: DeveloperName of the Einstein Bot-b
or--botversion
: Version to activate or deactivate-l
or--debug
: Verbose logging including screenshots of the bot activation/deactivation process
Note: : If your bot is activate when trying to build the model, the command will deactivate the bot , kick of the model building proces and then reactivate the bot. During this time the bot might not be available to your website.
$ sfdx bot:build-model -n "MyFirstBot" -b "v9" --debug -u mydevorg
Found Bot 0Xx5e000000kMlkYAE, Version#9: 0X95e000000l4qrCAA , Status: Active
WARNING: [0Xx5e000000kMlkYAE:0X95e000000l4qrCAA] - Bot version is Active. Deactivating the bot. The embedded bot on your website will not work until this script completes
[0Xx5e000000kMlkYAE:0X95e000000l4qrCAA] - Logged into Setup
[0Xx5e000000kMlkYAE:0X95e000000l4qrCAA] - Clicked Deactivate Button
[0Xx5e000000kMlkYAE:0X95e000000l4qrCAA] - Confirmed deactivation Button
WARNING: [0Xx5e000000kMlkYAE:0X95e000000l4qrCAA] - Deactivated Bot Version. Building model now.
[0Xx5e000000kMlkYAE:0X95e000000l4qrCAA] - Logged into Setup
[0Xx5e000000kMlkYAE:0X95e000000l4qrCAA] - Clicked Build Model
WARNING: [0Xx5e000000kMlkYAE:0X95e000000l4qrCAA] - Model building kicked off. Activating bot now.
[0Xx5e000000kMlkYAE:0X95e000000l4qrCAA] - Logged into Setup
[0Xx5e000000kMlkYAE:0X95e000000l4qrCAA] - Clicked Activate Button
Parameters
-n
or--name
: DeveloperName of the Einstein Bot
$ sfdx bot:list-versions -n MyFirstBot --debug -u mydevorg
Developer Name VersionNumber Status
────────────── ───────────── ────────
v4 4 Inactive
v5 5 Inactive
v7 7 Active