Articles in this section

Configure Salesforce for Forethought Triage


Mature support organizations often have time-consuming, yet vital ticket triage processes. What is more, it usually requires the most experienced representatives to perform the task.

The core use-cases of triage are:

  • Case routing: sending the right ticket to the competent agent or department, drastically reducing First Response Time and triage Overhead.
  • Triage for Product Feedback loop: when Product teams struggle to understand where issues come from, and where they should focus their efforts.
  • SPAM detection: SPAM ticket clog queues and represent a threat to the teams.
  • Case Escalation: Preemptive escalation of tickets to avoid cost due to missed SLAs.

Forethought excels at automating triage with sometimes beyond human accuracy levels. A custom model is trained on the customer’s historical data. This assumes that the customer has been performing triage manually for long enough and with enough volume for the automation to be feasible and relevant.

Consider this article to learn more about best practices around AI and your business workflow.

Technical Overview

This article will guide you through setting-up your Salesforce Instance for Triage.

Pre-requisites: If you are a new customer, make sure to have completed the Salesforce pre-installation guide. 

This process needs to be set only once per object class, even if you have multiple Triage models running on it.

The general flow is the following:

  1. The case is created in Salesforce
  2. A Salesforce workflow rule will detect this, and trigger a Salesforce Outbound Message
  3. The Salesforce Outbound message will send the information to Forethought.
  4. Forethought will make a prediction and write it back to the object, on a custom field.
  5. The Dashboard will then provide insights on the accuracy, comparing the predicted value to the final user value.

1. Initial setup 

If you have previously completed steps 1 (Create the workflow rule) and 2 (Create the outbound message) in order to set up Solve Email, please skip to step 3 (Create a field for predictions to be written).  Steps 1 and 2 should only be completed once for your organization.

1. Create the workflow rule

  1. Go to Salesforce Setup > Workflow rules
  2. New rule
  3. Object: Case
  4. Rule name: Forethought Outbound Message
  5. Description: "Sends a message to Forethought API every time a case is created in order to make predictions."
  6. Evaluate the rule when a record is: Created
  7. Rule Criteria: 
    1. Run this if the: formula evaluates to true
    2. Formula: 1=1
    3. Note that depending on the use-case, it might be relevant to only send a subset of objects to Forethought. For example, if you would like SPAM prediction on Email Cases only, you would need to define that in your Workflow Rules. Please refer to this video for set up: Otherwise, for other needs, please contact your Forethought team. 
    4. mceclip0.png
  8. Click save & next
  9. Add workflow action: new outbound Message
    1. mceclip1.png

 2. Create the Outbound message

  1. Name: Forethought Outbound Message
  2. Unique Name: Forethought_Outbound_Message
  3. Description: "Sends a message to Forethought API every time a case is created in order to make predictions. This outbound message is called by the workflow rule of the same name."
  4. Endpoint URL:
  5. User to send as: Look for "Forethought user" or "Agatha". You should have a dedicated user for Forethought already set up
  6. Send Session ID: True
  7. Case Fields to send: idblobid0.png
  8. Save > Done
  9. This will bring you back to the Workflow rule
  10. Click the Activate button

Once you have completed this process, please notify your Forethought team.

3. Create a field for predictions to be written

  1. Create a custom field for Forethought to write predictions.
    1. On the case object, (Setup > Object Manager > Case > Fields & relationships > New
    2. Data type: text
    3. FieldName: Refer to setup per use-case.
    4. Length: 100
    5. Field-level security: Forethought needs write access to the field. If you have authorized the app with a specific user profile this profile must have write access.
    6. Add fields to Page layouts: none
  2. Verify that Forethought has access to write to all cases types. To do so, log in to your Salesforce Instance as the authorized user and ensure that you can modify the value of this custom field, for any case type. If not, review accesses.

2. Notify Forethought

Once you are done with the initial set-up, please notify your Forethought team with the following information:

Workflow rule + outbound message created & active: yes/no
Model name: e.g. "SPAM filter", "category-subcategory", "Escalation"
Field to read from: e.g. Is_Spam__c, the field you are currently using.
Field to write to: e.g. Forethought_Spam_Predicted__c
(refer to "Final Implementation")
I have verified that the Forethought user has full write
access to that field, for any case type: Yes/No

 3. Model Training & Observation Phase

Now that you are set, Forethought will train an AI model, learning from your historical dataset. We will then deploy the model and every time a case comes in, we will start writing to the "Field to write to".
Since this field was created specifically for Forethought predictions, this will not have any effect on your workflow yet. We call this the "silent deployment phase", which allows us to monitor the model's accuracy.

When you are satisfied with the results, you can then implement the final business rules as suggested below, which will actually triage, route, or classify cases as SPAM.

Note that you have full control over predictions and that you can always disable the workflow mechanism, or the outbound message if need be, without intervention from Forethought.

4. Final Implementation (per use-case)

SPAM detection

Field to read from: e.g. Is_spam__c
Field to write to: Forethought_Spam_Predicted

We suggest implementing the following logic, after an observation phase of the model's accuracy:

  • When Forethought predicts that a case is a SPAM (Writes Forethought_Spam_Predicted = SPAM),
    • A workflow sets your current "Is_spam__c*" = SPAM
    • This sends the ticket to a SPAM Queue
    • An email is sent to the user, mentioning that her/his request was classified as such and that they can respond to this notification to re-open the case, if a mistake was made.
  • If the user responded to a mistakenly classified SPAM:
    • A workflow triggers "Is_spam__c" = "Not SPAM"
    • This should surface the case back out to the right queue.
    • Forethought Dashboard will measure this as an inaccurate prediction (Is_spam__c <> Forethought_Spam_Predicted)
  • If an agent audits the SPAM queue and finds a misclassification:
    • They will set "Is_spam__c" = "Not SPAM", which will trigger the same mechanism as above.


Was this article helpful?
1 out of 1 found this helpful


  • Need help?

    Click here to submit a support request. We are here to assist you.

  • Business hours

    Monday to Friday 8am - 5pm PST excluding US holidays

  • Contact us