Skip to content

Instantly share code, notes, and snippets.

@lfmundim
Last active November 21, 2018 17:17
Show Gist options
  • Save lfmundim/3b02770440e033d5ac842ab673ab6fe1 to your computer and use it in GitHub Desktop.
Save lfmundim/3b02770440e033d5ac842ab673ab6fe1 to your computer and use it in GitHub Desktop.
Quick overview on how to migrate bots on BLiP using the Builder feature

Migrating Flows

Suppose you have a chatbot on BLiP and you want to migrate it's flow to another one, either to update your production environment with your beta one, or to create a beta using your production alltogether. With BLiP's versioning feature it is quite simple.

Create your target bot (if you haven't)

If you haven't already, create a bot that is going to receive the updated source flow. It works just as creating any bot. Ideally you would want to name it as '[BETA] BotName' or anything like that just to flag it as an obvious non-production version.

Manually update the new bot's configuration

The versioning tool works for the Builder's flow. The rest of the configuration you must do by hand. Thankfully they remain simple and you can copy-paste some of them, if it is not a problem for you (e.g: a beta and production bot can share the same Watson credentials. Note that any intents, entities and any other configuration is not credential-bound and you need to re-enter those).

A quick overview of what you might need to manually copy/update (if you use any of them):

  1. Whichever channels you have integrated with
    • note that you can't use the same WhatsApp number on two bots, or the same Messenger page, Telegram channel and so on. You will need to create new ones of those if you intend on using the channels on that new chatbot.
  2. AI configuration, including the credentials on either provider (you can copy those), the configured intents and entities and publish/train your bot.
  3. Helpdesk configuration, including agents, custom replies and rules
  4. Team permissions
  5. Resources
  6. Payment configuration (you can copy-paste those)
  7. Growth configuration
  8. Basic configuration (persistent menu, welcome screen, bot name & avatar)
  9. Builder Flow config variables and AI reliability threshold
    • If your bot uses an external API and it has a staging/beta endpoint, you might want to get that base url set into a config variable such as config.baseUrl. In that way you can simply change the value to that variable and anywhere you use it will be updated in an effortless manner

Most of those settings are static once you configure them once, so you'll hardly have to revisit those unless you change them on your source bot.

Export the source flow and import into target

On your source bot's builder, click the left-hand side cogwheel to bring up the configuration card. Click the Versions tab and then on Export flow.

A botIdentifier.json file will be downloaded containing the whole exported flow. While you can alter that json directly, it is highly recommended not to, as it might break your flow entirely.

Then, on your target bot's builder, open the same menu and click on Import flow, selecting your exported json and uploading it. Note that it will OVERRIDE the current flow in the target bot, so you might want to back it up for rollback purposes. It will be LOST after the migration process

Your target bot should now have the exported flow in it's entirety.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment