in source/services/lex-bot/leave_feedback/intent.py [0:0]
def create_feedback_intent(bot_id, locale_id, bot_alias_id):
intent_id = create_intent(bot_id, locale_id)
# create slots
firstname_slot_id = create_slot(
"firstName", "AMAZON.FirstName", bot_id, locale_id, intent_id
)
lastname_slot_id = create_slot(
"lastName", "AMAZON.LastName", bot_id, locale_id, intent_id
)
feedback_slot_id = create_slot(
"feedback", "AMAZON.AlphaNumeric", bot_id, locale_id, intent_id
)
# update the intent for prioritizing slots in the intent
update_feedback_intent(
intent_id,
bot_id,
locale_id,
firstname_slot_id,
lastname_slot_id,
feedback_slot_id,
)
# update bot alias to connect the intent to the lex lambda
update_bot_alias(bot_id, bot_alias_id)