How to use from_entity in forms

I would like to use a form to make a flow for Lead Generation with questions like name, and zipcode. So I set the domain file as following.

entities:
- firstname
- zipcode
slots:
  firstname:
    type: text
    influence_conversation: false
  zipcode:
    type: text
    auto_fill: false
    influence_conversation: false

forms:
  lead_gen_form:
    firstname:
    - type: from_text
    zipcode:
    - type: from_entity
      entity: zipcode

However, running rasa shell with debug, I saw that while the firstname is asked and captured properly into the slow, the zipcode is not. the question and answers are:

bot ask: great, we're almost there. what is your zipcode?

Your input -> my zip code is 98075

And the rasa debug shows:

2021-04-09 18:26:11 DEBUG    rasa.core.actions.forms  - Trying to extract requested slot 'zipcode' ...
2021-04-09 18:26:11 DEBUG    rasa.core.actions.forms  - Got mapping '{'type': 'from_entity', 'entity': 'zipcode'}'
2021-04-09 18:26:11 DEBUG    rasa.core.actions.forms  - Failed to extract requested slot 'zipcode'
2021-04-09 18:26:11 DEBUG    rasa.core.actions.forms  - Validating extracted slots: {}

What did I do wrong here? Any helps are appreciated!

Hi @William8Work can you confirm that your entity extraction works outside the form? If you evaluated the message “my zip code is 98075” is your model able to accurately extract the zip code?

Very good question. Thank you @m.vielkind. The zipcode intent was missing from nlu so after I added it in, it seems able to extract that now. However, because I added another questions to ask for phone number, the NLU extracted both phone number and the zipcode from the same answer of phone number.

How are you extracting the zipcode and phone entities?

I use the following, @m.vielkind. However, the issue is that when the customer answers the phone question with a phone number, the bot fills both phone and zip code slot at the same time, and skipping the zipcode question.

nlu:
- intent: infom_zipcode
  examples: |
    - it is [12345](zipcode)
    - my zipcode is [98101](zipcode)
    - the zipcode is [91075](zipcode)
    - zip code is [88045](zipcode)
    - it's [98744](zipcode)
- intent: inform_phonenumber
  examples: |
    - my number is [2063303311](phonenumber)
    - phone number is [411 3941112](phonenumber)
    - cell is [415 303 2268](phonenumber)
- regex: zipcode
  examples: |
    - [0-9]{5}
- regex: phonenumber
  examples: |
    - ^(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$

And I saw this in debug:

2021-04-13 21:07:18 DEBUG    rasa.core.actions.forms  - Validating user input 'UserUttered(text: 206 3303311, intent: goodbye, entities: 206 (Type: CARDINAL, Role: None, Group: None), 33033 (Type: zipcode, Role: None, Group: None), use_text_for_featurization: False)'.
2021-04-13 21:07:18 DEBUG    rasa.core.actions.forms  - Extracted '33033' for extra slot 'zipcode'.
2021-04-13 21:07:18 DEBUG    rasa.core.actions.forms  - Trying to extract requested slot 'phonenumber' ...
2021-04-13 21:07:18 DEBUG    rasa.core.actions.forms  - Got mapping '{'type': 'from_text'}'
2021-04-13 21:07:18 DEBUG    rasa.core.actions.forms  - Successfully extracted '206 3303311' for requested slot 'phonenumber'
2021-04-13 21:07:18 DEBUG    rasa.core.actions.forms  - Validating extracted slots: {'zipcode': '33033', 'phonenumber': '206 3303311'}

Hi, i have the same problem

any solution for this problem ?