Context & Block naming

1. Context naming

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

Default contextFAQSmall talkProcesses*
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