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
-
Go to Intelligent automation → Intelligent actions → Action provider instances and select New.
-
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 Intelligent automation → Intelligent actions → Action catalog items and select New.
-
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 run the action with Run intelligent action in the activity, 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 Administration → Logging & statistics → Action results. As runs build up on similar tickets, Sofi’s action classifiers start to rank the action in the Sofi Smart Actions tab.