This guide provides essential information on optimizing email processing efficiency in Salesforce using Forethought's Solve Email 2.0. It covers configuring named credentials, creating a "Callout Permission Set", customizing email trigger conditions, mapping Salesforce properties to Forethought's context variables, creating automated response records, and capturing user feedback.
Prerequisite
Before installing the package, you must enable Email-to-Case. Otherwise, the package won't install. To enable it, go to Setup → Quick Find box → Search for "Email-to-Case".
Package Links
Sandbox environment: https://test.salesforce.com/packaging/installPackage.apexp?p0=04tHp000000mRsd&p1=full
Production environment: https://login.salesforce.com/packaging/installPackage.apexp?p0=04tHp000000mRsd&p1=full
Note: Select Install for All Users, not just for the integration user.
After Installing the Package
1. Work with your implementation team to create the corresponding API tokens.
2. To add the token to Salesforce, go to Setup → Named Credentials → Forethought Named Credential → Custom Headers -> Edit Bearer <TOKEN> and replace <TOKEN> with the created token. Make sure the value follows the format of "Bearer {your API token}".
3. Create a Permission set and name it Callout Permission Set.
4. Click on the Permission Set → Manage Assignments → Add Assignment → Add the user that installed the package. Ensure that you follow this step to avoid any errors.
5. Scroll down on the Callout Permission Set page to find the External Credential Principal Access.
6. Click Edit and add forethoughtExternalCredential - test param to the enabled list.
7. On the Quick Find box, search for Deliverability. Change the email delivery setting to All Emails. Otherwise, emails won’t be sent.
8. If you have a bot user executing the flow rule, you need to permit that user to access to the credential. You may see it on the Process Automation Settings page, make sure that the user has sufficient permissions by doing step #4 above.
Callout Flow
The Forethought - Solve Email 2.0 - Callout flow comes with the Forethought package and is designed to notify the Forethought system whenever an incoming EmailMessage record is created. If you want to notify Forethought of other events, such as Case creation, you'll need to create a custom Callout flow. For details, see Create a custom Callout flow in Salesforce for Solve Email.
Processing
-
To populate the Context Variables (CV) displayed in the Journey Map, we read the following properties from Salesforce without requiring any additional action from the user:
-
- Ticket ID: Case.Id
- Email: Case.ContactEmail, or fall back to Case.SuppliedEmail
- Full Name: Case.Contact.Name, or fall back to Case.SuppliedName
- First Name: Case.Contact.FirstName, or fall back to the first word in Case.SuppliedName
-
- Optional: If you want to map custom case fields to CVs, navigate to the Context Variable page in the Forethought Dashboard. These mapped fields can then be used in the Journey Map and email responses.
Send back the automated response
At the end of the email processing, if an automated response needs to be sent, the following steps are executed:
1. Create a record for the custom object ForethoughtSolveEmailConversation__c
-
-
- Case__c: Referenced case id
- EmailContentHTML__c: CSS inline email content as HTML
- OrgWideEmailName__c: Name of the org-wide email address to use in Salesforce
- UserEmail__c: Email of recipient
- ResponseSent__c: Whether or not a response was sent or not. We still write a record if no email needs to be sent for tracking purposes
-
2. Flow Forethought - Solve Email 2.0 - Send Automated Email is called.
3. Then, the Apex class ForethoughtSendEmail is triggered, and the email is sent.
Conditions for Forethought - Solve Email 2.0 - Send Automated Email
Handle Feedback
- When the user replies to the email or clicks on “Yes, this was helpful” or “No, this is not helpful”, we write the feedback to Salesforce via a field (UserFeedback__c) on the corresponding ForethoughtSendEmail__c record. Possible values are “negative” or “positive”.
Demo video on how Solve Email 2.0 works in Salesforce
Comments
Article is closed for comments.