How to Send Variable Values from Actions to Forms and Back to Actions

Overview

This article describes how to pipe variables created in the Actions to the Form and Back from the Form to the Action using the onContinuePostLogin method.

Solution

Values can be passed from Actions to Forms using:

api.prompt.render(':form_id', {
    fields: {
      first_name: 'Foo',
    }
});

Soon, passing collected data in Forms to Actions will be possible. Currently, the only method is to update the user’s app metadata and read it using the onContinuePostLogin method.

Related References