Enabling Predictions on Forms
Following these steps to enable Sofi Service Agent Predictions on a ServiceNow Form such as the Incident form.
1. Create Classifier Context
Navigate to Sofi > Configuration > Classifier Context
Classifier contexts define how a Classifier should behave in different contexts. Where a context is the the means by which a Classifier is triggered. There For example, a UI context is when the Classifier is trigger via a client script on ServiceNow form (eg Incident form). An email context when the classifier is trigger via a record generated by an InBound Email action.
Field | Description |
---|---|
Context | The type of the context. Options are: UI - context for records generated by forms Email - context for records generated by Inbound email actions * SVA - context for records generated by the Sofi Virtual Agent |
Description | The description of the classifier context. |
Classifier | The classifier that this context relates to. |
Auto classify | If active, predictions will automatically be applied to the target record if the Auto classify threshold value is met or exceeded. |
Auto classify threshold | The confidence value of a classifier prediction result that must be achieved in order for the prediction result to be automatically applied. |
Minimum confidence | The minimum confidence value that must be achieved for a prediction result to be displayed. Default value is 0. |
Example Classifier Context
Incident Classifier UI Context
2. Configure Client Scripts and Business Rules
A Classifier requires a number client scripts and business rules to trigger and control the behaviour of the classifier.
Default Client Scripts
Name | Description |
---|---|
SoapboxAIClient | OnLoad, global script to allow all task inheriting tables to use the SoapboxAI classifiers. Will not do anything at all if a corresponding configuration for the table is not found. The configuration is provided on the Service-now Scratchpad variable by a related 'Display' business rule. If the display business rule is not fired, or does not find any configuration, this script will not do anything. |
(SBxAI) Inc - Short description update | OnChange client script that triggers Sofi and renders the results on the form. By default, Sofi is triggered as the user enters keystrokes in the Short Description field. For new classifiers it is recommended to duplicate and rename this Client Script. |
For Classifiers relating to tables extended from the Task table, you only need to create (or update if you are modifying an out of the box classifier) the 'Tigger' client script:
(SBxAI) Inc - Short description update
This script triggers the Incident classifier and knowledge classifier when the user enter's characters into the Short Description field.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (window.SoapboxAIClient) {
SoapboxAIClient.onChange(control, isLoading, {
classifier: "incident", // <== Update Classifier Name as required
knowledge: "knowledge",
// template: "incident.template", // <== Comment out template if not configured
leading: true
});
} else {
jslog("Can't find client");
}
}
Default Business Rules
For non-task extended tables
When creating a classifier for a table NOT extended from the Task table, you will need to copy the two client scripts and three business rules and change the Table reference to the new table.
Name | Description |
---|---|
(SBxAI) Task: Configure client | When creating a classifier for a table NOT extended from the TASK table, you will need to copy this business rule and change the Table reference to the new table. Otherwise, no change is required. |
(SBxAI) Task: Trigger indexing | When creating a classifier for a table NOT extended from the TASK table, you will need to copy this business rule and change the Table reference to the new table. Otherwise, no change is required. |
(SBxAI) Task: Metrics updated_on | When creating a classifier for a table NOT extended from the TASK table, you will need to copy this business rule and change the Table reference to the new table. Otherwise, no change is required. |
3. Enable Sofi on a user's profile
The Sofi Service Agent Assistant is enabled on a users' account using the role sbxai_classification.
Note: When adding a role to a user account in ServiceNow you will be required to log out and log back in before the new role will take affect.
Updated over 6 years ago