Form data is not saved into entry


I tried to follow the demo restaurantbot and adept it to my needs, unfortunately i dont get the bot to save the value as an entry.

Here are some parts of my code:

## intent:barcode
- 737628064502
- 524863975214
- 986325871589
- 985426785698
- 638526985478
- 362194875386
- 123123132
- 132123132132
- 12312312313

## start
* barcode
  - barcode_form
  - form{"name": "barcode_form"}
  - form{"name": null}
  - utter_slots_values


- barcode
- barcode
    type: unfeaturized
  - text: 'I will look for the following barcode: {barcode}'
- utter_slots_values
- barcode_form :

class GetBarcodeForm(Action):
    def name(self) -> Text:
        return "barcode_form"

    def required_slots(tracker):
        return ["barcode"]

    def slot_mappings(self):
        return {
            "barcode": [

    def submit(
        dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any],
    ) -> List[Dict]:

        dispatcher.utter_template("utter_slots_values", tracker, barcode=987987987987)
        return ["barcode"]

As you might have guessed, the bot recieves a barcode as my entry-message and should work with this barcode later (get fat,sugar, etc.).

My bot classifies a message like 123123123132 correctly as barcode-intent, but utter_slots_values prints I will look for the following barcode: None.

I would appreciate any help. Kind regards Andreas

In your, I don’t see you define any barcode entity for the bot to recognize. You have to provide the examples, or training data so the bot can learn to identify the ‘barcode’ entity in a sentence, such as:

## intent:barcode
- [737628064502](barcode)
- This is my code [123123123](barcode)
- My code is [123123123](barcode)

If the barcode only includes numbers or have a specific format, you should use Regex feature to tell the bot to recognize those patterns as a potential barcode entity.

You can read more about training data format and regex feature here: Training Data Format

Thanks for your quick answer! This really helped me. My input data is now stored correctly as the barcode entity.

I tried working with this value inside my file, but the functions tracker.get_slot(slot_name) as well as tracker.latest_message.text do not seem to work as they are described in the documentation. * *Did they change in some way?

Nevermind, I figured out that tracker.get_slot(slot_name) ecpects the entity name as a string. tracker.get_slot('barcode') solved it.