Digital Assistant and Mobile

Get Involved. Join the Conversation.


    Sharath Chandra Gavini
    Variables not being Resolved
    Topic posted April 7, 2019 by Sharath Chandra GaviniBlue Ribbon: 750+ Points, tagged Bots, Conversational AI 
    46 Views, 1 Comment
    Variables not being Resolved
    Unable to resolve variable values when there are delayed replies from the user

    Hi everyone,
    I have a use case where there are multiple hyperlinks which I display after storing in variables. I stored all the references in a database and invoking a custom component to populate all the variable values at once when the user initiates the conversation. It works pretty fine when the user chats instantly. The problem arises when the user responds to the bot after quite a long time or the backend server reloads anytime after the variables are populated. 
    I presume all the variables are stored in the "conversation" object and as long as the conversation is alive, the variables should persist the values. This doesn't happen in the above case. I see the $variable.value in the bot message instead of the actual value.
    Am I doing anything wrong? Or is there anything that needs to be done to fix this?

    Also attaching the screenshot for reference.
    Thanks in advance.




    • Grant Ronald

      Variables would be reset if

      1) You execute a "return" statement

      2) You explicitly overwrite them

      3) The conversation expires and there is a new conversation id - this you might be able to see from the conversation logs if you look at the session Id.