For the complete documentation index, see llms.txt. This page is also available as Markdown.

Advanced Data: User Input Variables

Learn how to define custom user inputs using advanced data variables and implement them within a Salesforce Screen Flow. This setup creates a modernized runtime prompt workflow, allowing users to manually provide on-the-fly data to populate a template before a document is generated.

Accessing the Advanced Data Panel

The advanced data configuration tools are located within the template editor interface. To access them:

  1. Click the plus icon to open the Variables panel. This panel serves as the primary entry point for all variable data.

  2. Click the Advanced Data icon inside the Variables panel.

The Advanced Data configuration panel will launch on the right side of the interface.

Creating a User Input Data Source

  1. With the Advanced Data menu launched, select either the Variables tab.

  2. Click on the Click to add + button to create a new user input variable.

  3. Configure the user input:

  • Display Name: Customize the name of your custom field.

  • Data Type: Select a format from the picklist, text, number, date, datetime, and boolean (which can render as a checkbox).

  • Preview Value: Set a default value that will be used in preview mode.

  1. Click Save

Need to make an update to a User Input variable? Simply navigate to the Advanced Data panel and click on the user input when the icon is visible.

Result

The new user input will immediately be available to use in the Variables panel under a new subcategory named User Inputs. This subcategory automatically aggregates all the custom user inputs you define for the current template.


Implementing User Inputs in Salesforce Flow Builder

Once your template variables are defined, you can leverage the S-Docs Invocable Actions library within a Salesforce Screen Flow to capture this information from users at runtime.

Step-by-step instructions

A basic example of a Screen Flow that collects and assigns user inputs in an S-Docs Template
  1. Retrieve the template variables: Add the Get Template User Inputs action from the S-Docs library to your canvas. Configure the action by referencing your target S-Docs template and providing a distinct element label.

  2. Set up a loop: Add a Loop element immediately after the initial action. Configure the loop to iterate through the collection of user inputs found in the first step. The flow will search for and process all your template's custom user inputs one by one.

  3. Create the user interface: Inside the loop, add a Screen element. You must build a screen component within this block to ensure a UI element is presented to the end user. This allows the running user to manually enter the text, numerical data, or selections that the specific user input field expects.

  1. Map responses with assignments: Add an Assignment element inside your loop. Use this element to connect each specific user response to its respective template user input field.

  2. Execute document generation: After the loop finishes processing all inputs, add the Generate S-Doc with Input action as the final step of your flow. This action collects the current record ID, the target template, and all the manual input fields just submitted by the user.

Result

The document generation engine triggers, and those user input fields are resolved — or replaced — with the actual data provided during the flow to output a fully completed S-Doc.

Last updated

Was this helpful?