Completed Passing keyphrase to child flow and using it in a lookup

FYI. I am in Cognigy V4 Beta

 

My use case is this. In the Main flow use Intent to execute a child flow.  In the child flow I want to pass the keyphrase in a slot called "Product"

Here is the Add to Context node in the child flow

The custom key is created but testing for the value of that custom key immediately after renders only  "You want to contact support about {{"

 

I know the Cognigy Script "{{ ci.slots.Product[0].keyphrase }}" is valid because I can render the value as well as use it in 'If' and 'Lookup' nodes but that is messy and I would like to be able to use Add to Context and the key it creates or some other recommended function.

 

I am probably just using Add to Context incorrectly.

Funny as this might sound I would 'prefer' you told me to 'RTFM' but told me which 'FM' I should be 'R'ing and where in that 'FM".  "Teach a man to fish..."

 

Thanks

Mike

Didn't find what you were looking for?

New post
Was this post helpful?
1 out of 1 found this helpful

Comments

6 comments

  • Official comment

    Hi Mike,

    We try to replicate your issue but it works for us. Maybe there is an issue with your lexicontoken script or attached lexicon setting

     

    1.

    Please make sure that your lexicon looks like this:

     

    2. Make sure that the lexicon is attached to your Main and Child Flow.

    Once you had attached your product lexicon, you need to train the NLU again.

     

    3. Please do me a favor and compare your Token Script with this one here:

     

     

    Finally, the conversation looks like this in my case:

     

    Please let me know if this works for you.

     

    Best
    Alex

  • Well my Token certainly did not look like yours but I am still stuck so I created an new agent to test. It has one flow, one token, one attached lexicon and one node "Add to Context" and returns an error when I execute.

     

     

    So I guess I still have a problem with 'Add to Context'

     

    Here is the snapshot of the test agent I created for this.

    https://drive.google.com/file/d/1tUTW10lyucschVZQ_pnpVlh6pRl8Zagy/view?usp=sharing 

    0
  • Hi again Mike,

     

    Your issue is the following:
    You cannot use Cognigy Script or a Token as Context Key.

     

    Please define the context key as plain text like ProductName or something similar.

     

     

    Best
    Alex

    1
  • I have to say that that is not intuitive, that you can't choose the custom key from the dropdown, but it does work as you described.  

     

    Thanks

    Mike

    2
  • Just one more thing to mention. I did not find a way to edit a token so I deleted it and recreated it with the same name.  This does NOT work with existing nodes that use the token. You must reselect the token in any nodes that reference it. I recommend giving this new token a new name so you can tell if you have swapped it out or not.  

    0
  • Hi Mike,

     

    Editing Tokens is on our roadmap and will be developed in the future. Please find this new community thread for token related questions: https://support.cognigy.com/hc/en-us/community/posts/360009721919-Edit-Tokens 

     

    Best

    Alex

    0

Please sign in to leave a comment.