-1

I try to display a message that contains the number inserted in the question, for example when user inserts a number of 12 digits I want to display that 12 digits and a text. Until now:

  • I created an Entity with pattern (/d{12}) named @ticket_number Entity definition

  • An Intent named #myTicket that has as example @ticket_number intent def

  • Dialog that triggers when #myTicket | @ticket_number and has on context TicketNumer "<?@ticket_number.literal?>" and display a message as follows "Do you want to get info for ticket $ticketnumber ?". Dialog

The problem is that when I try it the Intent result is irrelevant, the message looks ok but I need to match the Intent. What could I do?

Error

Mahagney Saleh
  • 117
  • 2
  • 11
  • Is there any related intent? What does the dialog node look for? And note that you need to capture the entity literal, e.g. @ticket_numer.literal – data_henrik Apr 24 '20 at 10:19
  • What do you mean by "related" intent ? Yes I captured it with "@ticket_number.literal?>" it gets the number and displays it in my message but the problem is that it is triggered by entity, I think, and the intent is not recognized. If I delete the or ( |@ticket_number) part from Dialog it doesn't work anymore. – Mahagney Saleh Apr 24 '20 at 10:37
  • In the dialog node to what event does it react? You can configure it to just react to the entity OR an intent – data_henrik Apr 24 '20 at 11:21
  • I wrote in question it reacts at #myTicket | @ticket_number but I would like it to react only to the intent. – Mahagney Saleh Apr 24 '20 at 11:47
  • But the intent needs to be recognized. If only the number is entered, likely it is not because it is an entity – data_henrik Apr 24 '20 at 12:14
  • So it is not ok to have an example for an intent that is made only from an Entity? – Mahagney Saleh Apr 24 '20 at 14:51

2 Answers2

1

Can you share a picture of your node? There is no need that you match the intent; as indicating the ticket number alone, should not be an intent itself, but the entity. I'd remove the #myTicket | part of the node. And the condition should not include an OR; otherwise, if #myTicket triggers the node, and there is no ticket number, the response would fail.

polaquita7
  • 21
  • 2
  • I use the intent too because Watson should trigger the same dialog for other inputs written in that intent. I thought it should be useful to create an example in the intent that only contains the entity. – Mahagney Saleh Apr 24 '20 at 13:53
0

As mentioned in the IBM documentation it is not yet possible to use pattern entity in Intents.

Currently, you can only directly reference synonym entities that you define (pattern values are ignored). You cannot use system entities.

Mahagney Saleh
  • 117
  • 2
  • 11