Skip to main content

We have Live Chat and Whatsapp on messaging sessions and need to report on the agents handling, however, I cannot report on the history object of a messaging session to capture all advisors which have handled the session. I am able to report on the Session Owner, however, this will only capture the last advisor to handle the session, but this could be handled by several advisors, especially Whatsapps as these could be replied to at a later stage by the customer and be routed to a different advisor. Has anyone been able to report on Messaging session history, it is not available for me in report types?    

 

@Reports & Dashboards 

1 answer
  1. Jun 28, 12:13 AM

    You've hit a real gap in Salesforce's standard reporting — MessagingSessionHistory is not exposed as a report type, so you can't get at multi-agent handling through the normal Reports UI.

    A few options depending on your technical resources:

    1. SOQL via Reports on a related object (limited)

     

    If you just need owner changes, MessagingSessionHistory tracks field history including OwnerId changes. You can't report on it natively, but you

    can

    query it via SOQL in the Developer Console or Workbench to validate what's being captured before committing to a build: 

    SELECT Field, OldValue, NewValue, CreatedDate FROM MessagingSessionHistory WHERE Field = 'OwnerId' 

    This confirms the data is there — it just isn't surfaced in reports.

    2. Custom LWC or Flow writing to a custom object

     

    The cleanest reportable solution is to create a custom object (e.g. Messaging_Session_Agent__c) as a child of MessagingSession, and write a record to it every time ownership changes — either via a record-triggered Flow on MessagingSession when OwnerId changes, or via an Apex trigger if you need more control. Once the data lives in a custom object, it's fully reportable with standard report types.

    3. Einstein Analytics / CRM Analytics

     

    If your org has CRM Analytics, you can pull MessagingSessionHistory directly into a dataset via a dataflow and report on it there — no custom object needed.

    4. Scheduled report via Apex + custom object

     

    A scheduled Apex job that queries MessagingSessionHistory nightly and syncs agent-handling records to a custom object — lower complexity than a real-time trigger if you don't need same-day accuracy.

    The Flow approach (#2) is probably the fastest path if you want this reportable in standard Reports & Dashboards without a big build. 

    I hope that helps!

0/9000