Create an intelligent action
Create an intelligent action that runs a server script from a ticket, and let Sofi suggest it in the Sofi Smart Actions tab.
Create an intelligent action when agents repeat the same diagnostic or fix on tickets, such as checking a service, and you want it one select away. This page sets up an action that runs a server script. An action that calls an integration such as Node-RED uses an Asynchronous queue provider instance instead.
Before you begin
- You need the
administratorrole. - Write a script library with a function that does the work and returns an object with
statusandoutput. The action result is available to it asaction.
Steps
-
In the Administration workspace, go to Integrations → Intelligent actions → Action provider instances and select New.

The Action provider instances and Action catalog items items in the Integrations menu. 
The empty Create Action provider instance form, with Name, Active, Provider, Connection type and Connection string. -
Enter a Name, set Connection type to Server script and set Connection string to the name of your script library. Select Active and save.
-
Go to Integrations → Intelligent actions → Action catalog items and select New.

The empty Create Action catalog item form, with the Item configuration tabs and the Action provider instance under Action configuration. -
Enter a Name that tells agents what the action does. Set Action provider type to Server script and Action provider instance to the instance you created.
-
Set Action provider method to the name of the function in the script library.
-
Add any questions the action needs answered before it runs, as you would on a catalog item.
-
To let Sofi suggest the action, select Show in Smart Actions and add the ticket tables to Smart action tables, for example Incident.
-
Optionally, set Action pre-processing script and Action post-processing script, for example to set the text shown while the action runs.
-
Select Active and save.
-
Open a ticket of one of the tables and open the Sofi Smart Actions tab of the Sofi panel. Search for the action by name and run it, to check the result.
Result
Agents can run the action from tickets of the selected tables. Each run creates an action result, shown in the ticket’s Intelligent actions log and in System & deployment → Logs → Action results. As runs build up on similar tickets, Sofi’s action classifiers start to rank the action in the Sofi Smart Actions tab.