Search code examples
chatbotibm-watsonwatson-conversation

Watson assistant entity created with pattern is not setting the matched value in context variable


I have created a entity which has pattern to match 5 digits only, below is the pattern for that.

^([0-9]{5})*?$

enter image description here

But in the node when I am checking for slots and adding the value into a context variable, it is always taking the value name from entity not the value which user is providing.

Below is the image for the node. enter image description here


Solution

  • For patterns you need to add the literal suffix.

    So change your 5th slot "Check for" to:

    @Customer_Id.literal
    

    Without this your context variable only stores the value of the entity found. Which in your case is the same as the entity name.