How to Report on Cases Raised by Voicemail-to-Case

Prev Next

These guides are intended for advanced Salesforce admins. For Salesforce education, contact Salesforce directly or use trailheads for specific knowledge.


This is for when a voicemail is being sent to an email that is configured for email-to-case in Salesforce.

Create a Call Reporting Lookup Field on the Case Object

  1. Click the ‘Setup’ cog and then ‘Setup’.

  2. Go to the ‘Object Manager’ and then find ‘Case’ by searching for it in the Quick Find.

  3. Click ‘Fields & Relationship’ and then ‘New’.

    1. Data Type: Lookup Relationship

    2. Next

    3. Related To: Call Reporting

    4. Next

    5. Field label: Call Reporting

    6. Field Name: Call_Reporting [auto-populates]

    7. Description:

    8. Help Text:

    9. Leave the rest of the fields as default

    10. Next

    11. Set field-level security as desired

    12. Next

    13. Add to the page layouts you want

    14. Next

    15. Add the related lists to page layouts as desired.

    16. Save

Create a SF flow to update the records

  1. Click the ‘Setup’ cog and then ‘Setup’.

  2. Search for ‘Flows’ in the ‘Quick Find’ and then click ‘New Flow’.

  3. Select ‘Start From Scratch’ and then ‘Next’.

  4. Select Type: “Record-Triggered Flow’ and then ‘Create’.

  5. Click on the ‘Start’ component

    1. Select Object: Call Reporting

    2. Configure Trigger (Trigger the Flow When): A record is created

    3. Set Entry Conditions

      1. Condition Requirements: All Conditions Are Met (AND)

      2. Field: nbavs__From_Call_Type__c

      3. Operator: Equals

      4. Value: Voicemail Record

    4. Optimize the Flow for: Actions and Related Records.

  6. Click on the plus sign and then add a ‘Get Records’.

    1. Label: Find Voicemail Case

    2. API Name: Find_Voicemail_Case [auto-populates]

    3. Get Records of This Object:

      1. Object: Case

      2. Filter Case Records:

        1. Condition: All Conditions Are Met (AND)

          1. Field: Subject

          2. Operator: Contains

          3. Value: {!$Record.nbavs__From_Number__c}

            AND

          4. Field: Subject

          5. Operator: Contains

          6. Value: Voicemail from
            AND

          7. Field: Call_Reporting__c (this is the new field created above)

          8. Operator: Is Null

          9. Value: {!$GlobalConstant.True} [True]

        2. Sort Case Records:

          1. Sort Order: Descending

          2. Sort By: CreatedDate

        3. How Many Records to Store: Only the first record

        4. How to Store Record Data: Choose fields and let Salesforce do the rest

        5. Select Case Fields to Store in Variable:

          1. Field: Id

          2. Field: Call_Reporting__c

  7. Click on the ‘Get Records’ just created and click ‘Add Fault Path’.

  8. Click on the plus sign and add an ‘Update Records’.

    1. Label: Update CR with Case

    2. API Name: Update_CR_with_Case [auto-populates]

    3. How to Find Records to Update and Set Their Values: Use the call reporting record that triggered the flow

    4. Set Filter Conditions: None - Always Update Record

    5. Set Field Values for the Call Reporting Record:

      1. Field: nbavs__Case__c

      2. Value: {!Find_Voicemail_Case.Id}. [Id of case from previous component]

  9. Click on the plus sign and add another ‘Update Records’.

    1. Label: Update Case with CR

    2. Update_Case_with_CR [auto-populates]

    3. How to Find Records to Update and Set Their Values: Specify conditions to identify records, and set fields individually

    4. Update Records of This Object Type

      1. Object: Case

    5. Filter Case Records:

      1. Condition Requirements to Update Records: All Conditions Are Met (AND)

        1. Field: Id

        2. Operator: Equals

        3. Value: {!Find_Voicemail_Case.Id}

    6. Set Field Values for the Case Records:

      1. Field: Call_Reporting__c

      2. Value: {!$Record.Id}

  10. Save, Name the flow & Activate!