logo

NJP

When to Use Client-Callable Flows/Subflows/Actions: Let's understand with an Example!

New article articles in ServiceNow Community · Aug 18, 2025 · article

Hello Community,

Have you used Client callable Flows, Subflows, or Actions and do you know how to set them up and when to use them? Can we replace GlideAjax with a client-callable Subflow or Action?

Let's try to understand all of these with a setup 😁

1)What are client callable Flows/Subflows/Actions?

These are traditional Flows, Subflows, or Actions; however, you can call them from client-side configurations (e.g., Client Scripts, UI Action scripts, UI Policies) to perform server-side operations or transactions like Script Includes.

2)When you use them?

These are typically used when you need to fetch data on the fly on the client side from external sources, Can also used internally when you need to track server side transactions from the client (although this can introduce some performance overhead). In these cases, you can replace a GlideAjax setup.

Examples:

  • Get requestor details from an external database, OR from Active Directory OR fetching information from a website.
  • Get requestor email, manager information and populate them on the catalog item form (Only if required and crucial to track the transactions)

3)How to set a Client callable Flow/Subflow/Action?

Let's do it on the action, its the same for Flow and Subflow

A)Go to Flow Designers > Actions> Create a new action or Open a New Action

HemanthM1_0-1755505345123.png

B)Create a Action and go to the "Manage Security"

HemanthM1_1-1755505470739.png

C)Check "Callable by Client API" and you have to select appropriate ACLs to execute this action

HemanthM1_0-1755506699052.png

D)What if no ACLs found?? Create one

ex: Type is "client_callable_flow_objec"t, Give it a Name and select appropriate role

HemanthM1_1-1755506954068.png

E)Come back to the action, Manage Security>ACLS>elect that one created, Update

HemanthM1_2-1755507166074.png

Now the setup is ready. Here, I am using an external API to get the currency exchange value.

For example: What’s the INR value for 1 US dollar. Let’s set this up in the Action.

4)Set up the integration using Rest Step

A)Go to the action use REST step, update API details

HemanthM1_3-1755507489731.png

B)This action takes the currency type (INR, EUR, CAD) as input and gives the current rate in USD.

For example: 1 USD = 87.3 INR.

5) I have a catalog item set up to provide logged in user information and options to select the currency.

HemanthM1_4-1755508183132.png

Output:

HemanthM1_5-1755508258283.png

6)Let's use the actions we created in this catalog item during onLoad and onChange (current value) Client scripts😍

A)Go to the Action> Click on "Create Code Snippet"

HemanthM1_0-1755510521751.png

Go to client block and copy the code. This runs Async

HemanthM1_1-1755510615510.png

B)Now go the catalog item, create a onLoad or OnChange client script as below.

HemanthM1_0-1755511631968.png

You can also do it Onload if required

Lets look at the Output 😎:

Navigate to the Catalog Item:

HemanthM1_1-1755511935196.png

Select any Currency:

Here we go😍

Now we are getting this value on the fly during form submission. This is just an example, but if we need to get information from an external database to validate before users submit forms, client callable flows, Subflows, and actions come in very handy.

HemanthM1_2-1755512026933.png

Flow execution logs: Here you can easily track the transactions!

HemanthM1_0-1755513229724.png

More info on this website here : https://app.currencyapi.com

Same way, you can use the lookup step to get the requestor's details and set them on the client side! - Consider the implications before implementing.

Thank you,

Hemanth

Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

My other articles :

Script Action: A Practical Example!

Script Action: A Practical Example!

A Quick Guide to Adding a Wizard Section to a Catalog Item in Catalog Builder!

Set different “From” and “Reply To” emails for the Native and Flow designer Emails/Notifications.

Read .CSV formatted files in ServiceNow

Automate Assessment/Survey Testing with ATF(Including Multiple Option,Attachments &Reference fields)

Set up interactive filter on UI builder (for data visualization reports and List records)

Set Up "Step Based Request Fulfillment" for Catalog Items

Need to know about Schedules and Define them in SLAs

My ServiceNow Share Projects:

Return Assessment Feature in ServiceNow

Add signature and update fields to a fillable PDF document

Get Record URL action in the flow designer (Use it in the Send Email action)

Domain Separation: Alert Developers/Users when open a configuration record (ex: Business rules) in d...

Custom Generic Flow Action to Create Assessment

View original source

https://www.servicenow.com/community/developer-articles/when-to-use-client-callable-flows-subflows-actions-let-s/ta-p/3353497