When building an App Action, inputs and variables define what data goes in and what comes out. Inputs are the values the AI collects before the App Action runs. Variables are the values extracted from the final result and made available to the AI for use in a conversation response. Both are referenced and extracted using JSONPath syntax.
Inputs
Inputs are the values your App Action needs in order to run. Not all App Actions require inputs — some rely entirely on built-in Gladly customer context instead.
Adding Inputs
To add an input:
In the Inputs section of the builder, click + Add.
Fill in the following fields:
Field | Description |
|---|---|
Name | The input name, written in camelCase (e.g., |
Type | The data type of the input value (see Input Types below) |
Description | What this input represents |
Input required | Check this box if the input must be provided for the App Action to run |
Input Types
Type | Description | Example |
|---|---|---|
| Text value | "ORDER-123" |
| Numeric value | 42 |
| True/false value | true |
| Nested data structure | {"name": "value"} |
| List of values | [1, 2, 3] |
| Array of strings | ["a", "b", "c"] |
Using Inputs in Steps
Once defined, inputs are referenced in your steps using JSONPath syntax:
Syntax | Description |
|---|---|
| Access a simple input value |
| Access a nested input value |
| Access a specific item in an array input |
Inputs Naming Best Practices
Use camelCase:
orderId,customerEmailMatch external API field names where possible
Be explicit: use
customerEmailrather than justemail
Variables
Variables define the outputs of your App Action — specific values extracted from the final step's results that the AI can use when responding to a customer. For example, after filtering an order, you might define variables for orderStatus, trackingNumber, and estimatedDelivery.
Adding Variables
To add a variable:
In the Variables section of the builder, click + Add.
Fill in the following fields:
Field | Description |
|---|---|
Name | The variable name, written in camelCase (e.g., |
Description | What this variable represents and its purpose |
JSONPath | The path to the value within the final step's output |
Type | The data type of the value being extracted (see Variable Types below) |
Variable Types
Type | Use For |
|---|---|
| Text values, IDs, statuses |
| Counts, amounts |
| Flags, yes/no values |
| Date values |
| Time values |
| Lists of text items |
| Lists of numbers |
JSONPath Queries
Variables use JSONPath to extract specific values from the final step's output. Here are common query patterns:
Query | Description |
|---|---|
| Simple property |
| Nested property |
| First item in an array |
| All items in an array |
| Last item in an array |
| Filter items by condition |
How Variables Are Used
When your App Action runs in an AI guide, the extracted variable values become available for the AI to use in its response. For example:
Customer: "What's the status of my order?"
[App Action runs with orderId parameter]
Variables extracted:
- orderStatus: "Shipped"
- trackingNumber: "1Z999AA10123456784"
- estimatedDelivery: "March 20, 2026"
AI responds:
"Your order has shipped! The tracking number is
1Z999AA10123456784, and it should arrive by March 20, 2026."Variables Naming Best Practices
Use camelCase:
orderStatus,totalAmountName variables to match what they represent:
itemCountrather than justcountBe specific:
estimatedDeliveryDaterather than justdate