Context & Block naming

1. Context naming

It is recommended to structure your list of contexts using the alphabetical order below.

Default context

FAQ

Small talk

Processes

*

  • *bot_**greetings
  • *bot_**bye
  • *bot_**functions
  • *faq_**insurance
  • *faq_**loan
  • *faq_**petpolicy
  • *faq_**payment
  • *smalltalk_**age
  • *smalltalk_**creator
  • *smalltalk_**joke
  • *smalltalk_**insult
  • *booking_**new
  • *booking_**change
  • *booking_**cancel
  • *card_**new
  • *card_**activate
  • *card_**block
  • *appointment_**new
  • *appointment_**cancel

**For processes, they are contexts which need confirmations.

👍

Context

We recommend naming your context the same way you name your intent. (See Intent & EntitiesNaming)

Context NameIntent Name
bot_greetingbot_greeting
faq_insurancefaq_insurance
👍

Context & NLU naming syntax

  • no spaces
  • replace spaces with underscores
  • lowercase

Why?
For faster reading and clarity, while connecting a block to an intent using the condition field.

Below I have created a context for my utility bot called saving_tips and have named the corresponding intent the same way.



2. Block naming

We recommend that you name your blocks as part of your workflow.

👍

Be consistent!

Example: Short action description + Number code

  • ask_name 1.0, ask_name 2.0

It has its advantages when:

  • navigating around your project
  • understanding what your blocks do from a high level
  • searching blocks on larger projects
  • debugging