18.5.2. AI Scorecard - Object Setup

Prev Next

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’.

  1. 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.)

  2. Fill in the fields as below:

    1. Label: Natterbox AI Result

    2. Plural: Natterbox AI Results

    3. Object Name: Natterbox_AI_Result

    4. Description: An Object for storing Natterbox AI prompt results

  3. Updated additional settings as desired, recommended settings are the below (anything not listed below is recommended to be left as the default)

    1. Data Type: Auto Number

    2. Display Format: AI-{00000}

    3. Starting Number: 00001

    4. Select Allow Reports

    5. Deployed (when ready to deploy)

  4. 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.

  1. On your new Object, click Fields & Relationships > New

  2. Field Type: Lookup Relationship

  3. Related To: Call Reporting

  4. Populate the following information

    1. Field Label: Related CRO

    2. Field Name: Related_CRO

    3. Description: A field to relate the AI Results with the relevant phone call

    4. Help Text: This field will automatically link the AI Results with the relevant Phone Call

    5. 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 & 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’

  1. Field Type: Number

  2. Populate the following information:

    1. Field Label: Customer Experience Rating

    2. Length: 2

    3. Decimal Places: 0

    4. Field Name: Customer_Experience_Rating

    5. Description & Help Text: This shows the AI generated rating for the overall Customer Experience

  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 & New

  7. Field Type: Text Area (Long)

  8. Populate the following information

    1. Field Label: Customer Experience Feedback

    2. Length: 6400

    3. Visible Lines: 5 (adjust to fit preference)

    4. Field Name: Customer_Experience_Feedback

    5. Description & Help Text: This shows the AI generated feedback for the overall Customer Experience

    6. Default Value: ("Processing")

  9. Leave all other fields as default and click Next

  10. 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)

  11. Add field to your relevant Page Layout

  12. 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’

  1. Field Type: Text Area (Long)

  2. Populate the following information

    1. Field Label: Suggested Call Outcome

    2. Length: 6400

    3. Visible Lines: 3 (adjust to fit preference)

    4. Field Name: Suggested_Call_Outcome

    5. Description & Help Text: This shows the AI generated suggested call outcome

    6. 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:

  1. From Object Manager, navigate to the Call Reporting Object

  2. Click Fields & Relationships>New

  3. Field Type: Lookup Relationship

  4. Related To: Natterbox AI Result

  5. Populate the following information

    1. Field Label: Related AI Result

    2. Field Name: Related_AI_Result

    3. Description: A field to relate the CRO with the relevant AI Results

    4. Help Text: This field will automatically link the AI Results with the relevant Phone Call

    5. 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:

  1. Go to Setup>Flows>New Flow>Record Triggered Flow

  2. 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).

  3. Set the following:

    1. Trigger: A record is created

    2. Optimize for: Actions and Related Records

  4. Add a Get Record component with the following settings:

    1. Label: Find Existing AI Summary Object

    2. API Name: Find_Existing_AI_Summary_Object

    3. Object: Natterbox AI Results

    4. Filter Condition Requirement is Met (OR)

      1. Field: Related_CRO__c Equals {!$Record.Id}

  5. Add a Decision component with the following settings:

    1. Label: AI Result Found

    2. API Name: AI_Result_Found

    3. Outcome

      1. Label: Yes

      2. API Name: Yes

      3. All Conditions Are Met (AND)

        1. {!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)

  6. If Yes: Do not add any more components, let the Flow end, this stops any duplicate AI Records being created

  7. If Default Outcome: Add a Create Records component with the following:

    1. Label: Create AI Result Object

    2. API Name: Create_AI_Result_Object

    3. How to set record field values: Manually

    4. Object: Natterbox AI Results

    5. Set the Field Values as follows:

      1. OwnerId: {!$Record.OwnerId}

      2. Related_CRO__C: {!$Record.Id}

  8. Ad an Update Records component with the following:

    1. Label: Update CRO

    2. API Name: Update_CRO

    3. How to Find Records: Use the call reporting record that triggered the flow

    4. Filter Conditions: None

    5. Field: Related_AI_Results__c

    6. Value: {!Create_AI_Result_Object}

  9. 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!

  1. Navigate back to Flows>New Flow>Record Triggered Flow

  2. Set the trigger record to be AI Prompt (Note: this is not the object we have just created)

  3. Set the following:

    1. Trigger: A record is created

    2. Optimize for: Actions and Related Records

  4. Add a Decision component

    1. Label: AI Prompt

    2. 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).

  1. Outcome Details

    1. Label: Customer Experience

    2. API Name: Customer_Experience

    3. Resource: {!$Record.nbavs__AI_Prompt_Configuration__r.nbavs__Name__c}

    4. Operator: Equals

    5. Value: Customer Experience (Note: This will be the name of the AI Prompt created not the fields we created earlier in this guide)

  2. Repeat Step 5 for each Prompt that will be added to the AI Results

  3. For each Outcome, create an Update Record component with the following values:

    1. Specify conditions to identify records

    2. Object: Natterbox AI Results

    3. All Conditions Are Met (AND)

      1. Field: Related_CRO__c Equals {!$Record.nbavs__Insight__r.nbavs__Call_Reporting__r.Id}

    4. Set Field Values

      1. For a Rating prompt

        1. Field: Customer_Experience_Feedback__c // Value: {!$Record.nbavs__Reasoning__c}

        2. Field: Customer_Experience_Rating__c // Value: {!$Record.nbavs__Rating__c}

      2. For an Open Text prompt

        1. Field: Suggested_Call_Outcome__c // Value: {!$Record.nbavs__Results__c}

  4. Repeat Step 7 for all other Outcomes

  5. 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:

  1. Field Type: Formula

  2. Populate the following information

    1. Field Label: Overall Call Rating

    2. Field Name: Overall_Call_Rating

    3. Description: A field to display the overall Call Rating out of 10

    4. Help Text: This field will provide an overall score for the call out of 10 - this is the average of all scoring criteria

    5. Formula Return Type: Number

    6. Decimal Places: 0

    7. 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: