Skill Set & Permissions Needed:
Salesforce Administrator
Purpose
By following this guide, you will be able to create an Object in Salesforce which you can populate with Natterbox AI Prompt Results. This will allow the prompt label and prompt results for a phone call to reside on a single record. This allows for a simpler implementation of record update Flows, improved Salesforce reporting and being able to more easily display prompt results on Task or Activity records. Here is the link to the guide for the AI Scorecard LWC configuration.
Setting up our Object
Create the Custom Object
In this section we are going to create an Object in Salesforce for storing Natterbox AI results. For the purpose of this document we will call this object ‘Natterbox AI Result’.
To create a Salesforce Object, navigate to Setup > Object Manager > Create.
(Note: This guide will walk through how to create the Object in Salesforce from scratch, if you prefer to create the Object via a spreadsheet, please follow this Salesforce guide. Please Check the section below on Field Creation for the minimum fields that should be included.)Fill in the fields as below:
Label: Natterbox AI Result
Plural: Natterbox AI Results
Object Name: Natterbox_AI_Result
Description: An Object for storing Natterbox AI prompt results
Updated additional settings as desired, recommended settings are the below (anything not listed below is recommended to be left as the default)
Data Type: Auto Number
Display Format: AI-{00000}
Starting Number: 00001
Select Allow Reports
Deployed (when ready to deploy)
Click Save
To make sure our Flows to populate the Object will work later on, we now need to create the required relationships and fields for the AI results to be pushed to.
Field Creation
First, we need to make sure the AI Results are able to be associated with the correct phone call. As Natterbox will create a Call Reporting Object record (CRO) for every call, which already anchors Natterbox data to the relevant Salesforce records, we will use this as the anchor for AI Results as well.
On your new Object, click Fields & Relationships > New
Field Type: Lookup Relationship
Related To: Call Reporting
Populate the following information
Field Label: Related CRO
Field Name: Related_CRO
Description: A field to relate the AI Results with the relevant phone call
Help Text: This field will automatically link the AI Results with the relevant Phone Call
Leave all other fields as default and click Next
Ensure the page is visible for any Profile that will need to access and view AI prompt responses (this will likely include Team Leaders, Rev Ops and your Sales/Service team members)
Add field to your relevant Page Layout
Click Save & New
Now we need to create individual fields for the prompts to populate. The following steps will need to be repeated for every active Prompt you wish to have populate the AI Results Object.
We will go through two examples for the two distinct Prompt types: Rating Prompt and Open Text.
Rating Prompt:
In this example, we will be creating the fields needed for adding both the Rating score and Feedback to our Results, the prompt in this example will be named ‘Customer Experience’
Field Type: Number
Populate the following information:
Field Label: Customer Experience Rating
Length: 2
Decimal Places: 0
Field Name: Customer_Experience_Rating
Description & Help Text: This shows the AI generated rating for the overall Customer Experience
Leave all other fields as default and click Next
Ensure the page is visible for any Profile that will need to access and view AI prompt responses (this will likely include Team Leaders, Rev Ops and your Sales/Service team members)
Add field to your relevant Page Layout
Click Save & New
Field Type: Text Area (Long)
Populate the following information
Field Label: Customer Experience Feedback
Length: 6400
Visible Lines: 5 (adjust to fit preference)
Field Name: Customer_Experience_Feedback
Description & Help Text: This shows the AI generated feedback for the overall Customer Experience
Default Value: ("Processing")
Leave all other fields as default and click Next
Ensure the page is visible for any Profile that will need to access and view AI prompt responses (this will likely include Team Leaders, Rev Ops and your Sales/Service team members)
Add field to your relevant Page Layout
Click Save (or Save and New to continue creating additional Prompt fields)
Open Response Prompt:
In this example, we will be creating a field for adding Open Text responses to our Results (this may be long form content such as suggested follow up emails, or shorter responses, such as AI suggested wrap up). In the below example the prompt will be named ‘Suggested Call Outcome’
Field Type: Text Area (Long)
Populate the following information
Field Label: Suggested Call Outcome
Length: 6400
Visible Lines: 3 (adjust to fit preference)
Field Name: Suggested_Call_Outcome
Description & Help Text: This shows the AI generated suggested call outcome
Default Value: ("Processing")
3. Leave all other fields as default and click Next
4. Ensure the page is visible for any Profile that will need to access and view AI prompt responses (this will likely include Team Leaders, Rev Ops and your Sales/Service team members)
5. Add field to your relevant Page Layout
6. Click Save (or Save and New to continue creating additional Prompt fields)
(Note: If you have asked your prompt to provide a shorter response, you may want to adjust the above to ‘Field Type: Text, Length: 255’ instead - the above assumes the field should be configured for the maximum number of characters that the prompt response will provide).
Repeat the above steps until you have created all the fields you wish to populate with Prompt Results.
Next, we need to make sure that we link the AI Results back to the CRO in the same way we added the CRO to the AI Results earlier. To do this follow the below steps:
From Object Manager, navigate to the Call Reporting Object
Click Fields & Relationships>New
Field Type: Lookup Relationship
Related To: Natterbox AI Result
Populate the following information
Field Label: Related AI Result
Field Name: Related_AI_Result
Description: A field to relate the CRO with the relevant AI Results
Help Text: This field will automatically link the AI Results with the relevant Phone Call
Leave all other fields as default and click Next
5. Ensure the page is visible for any Profile that will need to access and view AI prompt responses (this will likely include Team Leaders, Rev Ops and your Sales/Service team members)
6. Add field to your relevant Page Layout
7. Click Save
We now have our new Object, all the fields we need and the link to our CRO. All that’s left is to populate it with Results!
Populating Results using Salesforce Flows
In this section we will use 2 Salesforce Flows to create and populate our AI Results record. In this example we are assuming that we want to generate an AI Results record for every phone call, additional filters could be applied to refine this further as needed.
To create the AI Results record:
Go to Setup>Flows>New Flow>Record Triggered Flow
Set the Call Reporting Object as the triggering record (Note: Natterbox always aims to create this record, referred to as the CRO, first after every call, this is why we are using this as the trigger record instead of the AI prompt responses themselves).
Set the following:
Trigger: A record is created
Optimize for: Actions and Related Records
Add a Get Record component with the following settings:
Label: Find Existing AI Summary Object
API Name: Find_Existing_AI_Summary_Object
Object: Natterbox AI Results
Filter Condition Requirement is Met (OR)
Field: Related_CRO__c Equals {!$Record.Id}
Add a Decision component with the following settings:
Label: AI Result Found
API Name: AI_Result_Found
Outcome
Label: Yes
API Name: Yes
All Conditions Are Met (AND)
{!Find_Existing_AI_Summary_Object.Id} Starts with a1c (Note: You may prefer to update this to be Is Blank Value: True, or Is Null Value: True - any of these should have the same result)
If Yes: Do not add any more components, let the Flow end, this stops any duplicate AI Records being created
If Default Outcome: Add a Create Records component with the following:
Label: Create AI Result Object
API Name: Create_AI_Result_Object
How to set record field values: Manually
Object: Natterbox AI Results
Set the Field Values as follows:
OwnerId: {!$Record.OwnerId}
Related_CRO__C: {!$Record.Id}
Ad an Update Records component with the following:
Label: Update CRO
API Name: Update_CRO
How to Find Records: Use the call reporting record that triggered the flow
Filter Conditions: None
Field: Related_AI_Results__c
Value: {!Create_AI_Result_Object}
Save your Flow (name this something like Create AI Results record) and Activate when ready
Example:
Now we are automatically creating our new record for our calls, its time to populate it with our results!
Navigate back to Flows>New Flow>Record Triggered Flow
Set the trigger record to be AI Prompt (Note: this is not the object we have just created)
Set the following:
Trigger: A record is created
Optimize for: Actions and Related Records
Add a Decision component
Label: AI Prompt
API Name: AI_Prompt
We will need a Decision Outcome for every Prompt we want to push to our Object, so let’s use the example prompts from earlier (Customer Experience Rating/Feedback & Suggested Call Outcome).
Outcome Details
Label: Customer Experience
API Name: Customer_Experience
Resource: {!$Record.nbavs__AI_Prompt_Configuration__r.nbavs__Name__c}
Operator: Equals
Value: Customer Experience (Note: This will be the name of the AI Prompt created not the fields we created earlier in this guide)
Repeat Step 5 for each Prompt that will be added to the AI Results
For each Outcome, create an Update Record component with the following values:
Specify conditions to identify records
Object: Natterbox AI Results
All Conditions Are Met (AND)
Field: Related_CRO__c Equals {!$Record.nbavs__Insight__r.nbavs__Call_Reporting__r.Id}
Set Field Values
For a Rating prompt
Field: Customer_Experience_Feedback__c // Value: {!$Record.nbavs__Reasoning__c}
Field: Customer_Experience_Rating__c // Value: {!$Record.nbavs__Rating__c}
For an Open Text prompt
Field: Suggested_Call_Outcome__c // Value: {!$Record.nbavs__Results__c}
Repeat Step 7 for all other Outcomes
Save and Activate your Flow
Example (This Flow pushes 11 prompt results to the AI Results record):
Optional Additional Steps
Create an Overall Call Rating field to average your specific prompt ratings for an overall call score:
In this example, we are adding our rating to the AI Result record and our overall rating will be a simple average of our other Ratings:
Field Type: Formula
Populate the following information
Field Label: Overall Call Rating
Field Name: Overall_Call_Rating
Description: A field to display the overall Call Rating out of 10
Help Text: This field will provide an overall score for the call out of 10 - this is the average of all scoring criteria
Formula Return Type: Number
Decimal Places: 0
Advanced Formula: (Customer_Experience_Rating__c + Rating2__c)/ 2 (Note: each rating that should be included should be added in to the brackets with a + as demonstrated by ‘Rating2__c’. The divided by number, in this example /2, should be the total number of ratings included in the brackets)
3. Leave all other fields as default and click Next
4. Ensure the page is visible for any Profile that will need to access and view AI prompt responses (this will likely include Team Leaders, Rev Ops and your Sales/Service team members)
6. Add field to your relevant Page Layout
7. Click Save
Add a visual scorecard to your Task or Voice Call records. To create a visual scorecard that can be added to other Objects such as Tasks or Voice Calls, please follow the guide linked here.
Example: