Skip to content

/AWS1/CL_LM2=>CREATEBOTLOCALE()

About CreateBotLocale

Creates a locale in the bot. The locale contains the intents and slot types that the bot uses in conversations with users in the specified language and locale. You must add a locale to a bot before you can add intents and slot types to the bot.

Method Signature

IMPORTING

Required arguments:

IV_BOTID TYPE /AWS1/LM2ID /AWS1/LM2ID

The identifier of the bot to create the locale for.

IV_BOTVERSION TYPE /AWS1/LM2DRAFTBOTVERSION /AWS1/LM2DRAFTBOTVERSION

The version of the bot to create the locale for. This can only be the draft version of the bot.

IV_LOCALEID TYPE /AWS1/LM2LOCALEID /AWS1/LM2LOCALEID

The identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see Supported languages.

IV_NLUINTENTCONFIDENCETHRESH TYPE /AWS1/RT_DOUBLE_AS_STRING /AWS1/RT_DOUBLE_AS_STRING

Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot.

For example, suppose a bot is configured with the confidence threshold of 0.80 and the AMAZON.FallbackIntent. Amazon Lex returns three alternative intents with the following confidence scores: IntentA (0.70), IntentB (0.60), IntentC (0.50). The response from the RecognizeText operation would be:

  • AMAZON.FallbackIntent

  • IntentA

  • IntentB

  • IntentC

Optional arguments:

IV_DESCRIPTION TYPE /AWS1/LM2DESCRIPTION /AWS1/LM2DESCRIPTION

A description of the bot locale. Use this to help identify the bot locale in lists.

IO_VOICESETTINGS TYPE REF TO /AWS1/CL_LM2VOICESETTINGS /AWS1/CL_LM2VOICESETTINGS

The Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user.

IO_GENERATIVEAISETTINGS TYPE REF TO /AWS1/CL_LM2GENERATIVEAISTGS /AWS1/CL_LM2GENERATIVEAISTGS

generativeAISettings

RETURNING

OO_OUTPUT TYPE REF TO /AWS1/CL_LM2CREATEBOTLOCALERSP /AWS1/CL_LM2CREATEBOTLOCALERSP