cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Code-based Actions: Store Parameters

Code-based Actions: Store Parameters

Store or Save parameters and use them later on in your design

 

parameters1.png

 

Flow allows you to extract data from conversations. To extract data you can use entities or the Trigger "any text". Within the "Try it out" window on top you will see the extracted data and corresponding parameter.

 

paramemail2.png

 

When your parameter is recognized you can store or save it so that you can use that parameter later on in your design. That can be useful when you want to:

  • Ask the user for confirmation of the data
  • Use the parameters for API calls

The code below shows an example of how to store the parameter "email". If you're using other variable names, make sure to adjust the name in the action code below.

async payload => {
    // Check if the param "email" exists
    if(Array.isArray(payload.params.email)) {
        
    // Param exists, let's store it so we can use it later
    await store.save('email',payload.params.email[0].value)
    }
}
Labels (1)

Code-based Actions: Store Parameters

Store or Save parameters and use them later on in your design

 

parameters1.png

 

Flow allows you to extract data from conversations. To extract data you can use entities or the Trigger "any text". Within the "Try it out" window on top you will see the extracted data and corresponding parameter.

 

paramemail2.png

 

When your parameter is recognized you can store or save it so that you can use that parameter later on in your design. That can be useful when you want to:

  • Ask the user for confirmation of the data
  • Use the parameters for API calls

The code below shows an example of how to store the parameter "email". If you're using other variable names, make sure to adjust the name in the action code below.

async payload => {
    // Check if the param "email" exists
    if(Array.isArray(payload.params.email)) {
        
    // Param exists, let's store it so we can use it later
    await store.save('email',payload.params.email[0].value)
    }
}
Labels (1)

Code-based Actions: Store Parameters

Store or Save parameters and use them later on in your design

 

parameters1.png

 

Flow allows you to extract data from conversations. To extract data you can use entities or the Trigger "any text". Within the "Try it out" window on top you will see the extracted data and corresponding parameter.

 

paramemail2.png

 

When your parameter is recognized you can store or save it so that you can use that parameter later on in your design. That can be useful when you want to:

  • Ask the user for confirmation of the data
  • Use the parameters for API calls

The code below shows an example of how to store the parameter "email". If you're using other variable names, make sure to adjust the name in the action code below.

async payload => {
    // Check if the param "email" exists
    if(Array.isArray(payload.params.email)) {
        
    // Param exists, let's store it so we can use it later
    await store.save('email',payload.params.email[0].value)
    }
}
Labels (1)
Version history
Last update:
‎06-19-2021 11:21 AM
Updated by:
Contributors