Get Catalog Variables action
Summarize
Summary of Get Catalog Variables action
The Get Catalog Variables action allows ServiceNow customers to retrieve values from catalog variables associated with requested items in the Service Catalog. It is available as a core action in Workflow Studio and can be used within flows by users with theflowdesigneroradminroles. This action enables you to select variables from multiple template catalog items and variable sets and obtain their current values at the time the action runs.
Show less
Note that this action only captures catalog variable values at execution time. If you need to handle changes to these values dynamically, you must incorporate additional logic in your flow, such as using a Wait For Condition action with a changes operator and rerunning the Get Catalog Variables action accordingly.
Inputs
- Submitted Request: The requested item record (from the
screqitemtable) for which you want to retrieve catalog variable values. This input accepts a record data type and can be dynamically populated. - Template Catalog Items and Variable Sets: The catalog item record (
sccatitem) used to populate the slush bucket of catalog variables. This input does not support dynamic pill values and is used to specify the source template of variables. - Catalog Variables: A slush bucket list where you select the specific catalog variables to retrieve values from the requested item. The selected variables become available as data pills for use later in the flow. You can also define flow-specific variables to appear here.
Outputs
The action outputs data pills representing the value of each selected catalog variable. These outputs vary by variable type and become available in the flow’s data panel for use in subsequent flow steps. Supported Service Catalog variable types correspond to those documented for this action.
Practical Example: Retrieving Catalog Variables for Hardware Items
In a sample flow triggered by a Service Catalog request, the flow first identifies the catalog item record linked to the requested item. It then checks if the catalog item belongs to the Hardware category using conditional logic based on category Sys ID.
The Get Catalog Variables action is configured with:
- Submitted Request: set to the trigger record (the requested item)
- Template Catalog Items and Variable Sets: set to the "Standard Laptop" catalog item containing the relevant variables
- Catalog Variables: all three variables from the Standard Laptop item are selected
The flow execution shows the action successfully retrieving the variable values: one string variable (empty) and two Boolean variables (both false), linked to the requested standard laptop item.
Select variables from multiple template catalog items and variable sets using the Get Catalog Variables action.
Roles and availability
Inputs
Provide a value for each input that your flow needs. To add dynamic values, you can also drag and drop pills from the Data panel or select them from the pill picker.
- Submitted Request
- Data type: Record
The requested item record from the Requested Item [sc_req_item] table for which you want to get catalog variable values.
- Template Catalog Items and Variable Sets [Catalog Items and Variable Sets]
- Data type: Record
The Catalog Item [sc_cat_item] record you want to use to populate the catalog variables slush bucket. This input does not support any data pill values.
- Catalog Variables
- Data type: Slush Bucket
The list of catalog variables whose values you want to get from the requested item record. Each catalog variable that you select is displayed as a data pill in the data pane. You can define flow-specific variables that are displayed in the Available list. To define flow-specific variables, see Create flow Service Catalog variables.
Outputs
These outputs appear in the Data panel. You can use them as inputs elsewhere in your flow.
- Catalog Variables
- Data type: Varies by catalog variable type
The data pane displays a separate data pill for each catalog variable selected from the Catalog Variables input. For a list of supported Service Catalog types, see Supported Service Catalog variable types.
Get catalog variables for hardware items
In this example, a flow runs when someone requests an item from the Service Catalog. The first flow step looks up the Catalog item record of the requested item. The If flow logic uses the category value (Sys ID) of the catalog item to determine if request is for an item in the Hardware category. The Get Catalog Variables action uses the trigger record as the Submitted Request input. The Template Catalog Items and Variable Sets input uses the variables provided in the Standard Laptop catalog item. All three available catalog variables are selected and displayed as data pills in the data pane.
The flow execution details show that the Submitted Request links to a request for a standard laptop. Of the three catalog variables, the string variable is empty and the two Boolean variables are false.