Let's Reconnect, thank you for making 2022 our best year yet.

Look Back
How to get a variable from a DialogFlow — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to get a variable from a DialogFlow

Received Response
12
Views
2
Comments
edited May 20, 2019 12:51PM in Digital Assistant and Mobile 2 comments

Summary

Trying to set the value of a variable from the bot flow and use this value later in the custom component

Content

Hi,

I am asking how can I use a variable in custom component which I defined it in the DialogFlow

any idea please? 

thank you 

Code Snippet

///////////////////////////// Flow ////////////////////////

context:
  variables:
....
    Code : "int" 
states:
start:
    component: "fn.sample.BotComponent"
    properties:
      Code: "Code"
    transitions:
      next: "Intent"
....
SetCode:
     component: "System.SetVariable"
     properties:
       variable: "Code"
       value: 0
     transitions: {}
  commonPart:
    component: "System.Output"
    properties:
      text: "please upload an image for the common part of your accident

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!