Skip to content

Advanced Reports

The Advanced Reports page in PinionAI Studio provides powerful, aggregated business intelligence and operational analytics across customer sessions, human engagements, and form transactions. Built as a comprehensive dashboard, it helps administrators, operations managers, and business owners monitor agent effectiveness, track user interaction depth, audit human-handoff funnels, and assess overall system performance.

Permissions & Prerequisites

To access and view the Advanced Reports dashboard, the following criteria must be met:

  1. Authentication: You must be logged into PinionAI Studio.
  2. Account Selection: An Account must be selected from the sidebar.
  3. User Permissions: Your user role must have at least one of the following permissions:
  4. owner
  5. admin
  6. observability

Filter Options

The page features filtering controls at the top to refine the dataset displayed across all report tabs:

  • Start Date & End Date: Date input selectors defining the timeframe for analysis. The default range covers the last 30 days.
  • Select Agent: A dropdown selector to isolate reporting data for a specific agent, or view consolidated accounts-wide metrics via "All Agents".

Reporting Tabs

The dashboard is organized into four interactive tabs designed to explore different operational facets of PinionAI:

1. Session Depth

This tab focuses on the quality and duration of chat conversations between users and AI agents. It measures engagement length by counting the messages exchanged within each session.

  • Summary Metrics:
  • Total Messages Exchanged: The cumulative count of all user and agent messages.
  • Average Messages/Session: The mean conversation depth per session.
  • Max Messages in a Session: The longest conversation recorded in the timeframe.
  • Charts:
  • Distribution of Session Message Counts: A bar chart grouping sessions into depth buckets (e.g., 1-2 messages, 3-5 messages, 6-10 messages, 11-20 messages, 21+ messages).
  • Daily Average Conversation Depth: A line chart tracking how the average conversation length changes day-by-day.

2. Engagement & Handoffs

This tab measures the performance and volume of human agents handling handoff requests.

  • Summary Metrics:
  • Total Sessions: The number of unique sessions.
  • Handoff Requests: The count of sessions where a human handoff was requested.
  • Handoff Rate: The percentage of total sessions that requested human handoff.
  • Acceptance Rate: The percentage of handoff requests that were successfully accepted by human agents.
  • Charts & Statistics:
  • Live Engagement Status Breakdown: A donut chart tracking the status of engagements (e.g., Completed, In Progress, Waiting, Accepted).
  • Engagement Performance: Resolution time cards calculating the Average Resolution Time and Maximum Resolution Time for completed human engagements (in minutes).

3. Transaction Funnels

This tab tracks form-submission conversions and transaction states, helping you verify checkout or inquiry success.

  • Summary Metrics:
  • Total Form Submissions: The total number of transaction records created.
  • Completed Transactions: The count of successful transactions (where status equals success).
  • Funnel Completion Rate: The percentage of submissions that resulted in a success status.
  • Visual Breakdowns:
  • Performance by Form Name: A tabular overview grouping total submissions, completed submissions, and completion rate (%) by form name, exposing conversion funnels.
  • Transaction Status Breakdown: A donut chart tracking the distribution of transaction statuses.

4. Agent Performance & ROI

A holistic, comparative rollup that combines metrics across sessions, token costs, handoffs, and successful transactions per agent.

  • Agent Rollup Comparison: An interactive comparison table highlighting:
  • Agent Name
  • Total Sessions
  • Avg Msg/Session
  • Total Tokens Consumed
  • Handoff Requests & Rate (%)
  • Completed Transactions
  • Charts:
  • Agent Activity: Sessions Handled vs. Token Usage: A multi-dimensional bar chart mapping sessions handled against total tokens consumed (represented as a color gradient), providing direct insight into agent-by-agent ROI.

Technical Details

The Advanced Reports dashboard aggregates data across the following PostgreSQL tables:

  1. sessions: Supplies total sessions, dates, and handoff requests (transfer_requested and transfer_accepted timestamps).
  2. Session Depth Calculation: Parses the session_data JSONB column in Python to extract the session -> messages array length:
    num_messages = len(session_data["session"]["messages"])
    
  3. Token Cost Calculation: Dynamically sums up input and output tokens stored in session_data -> session -> var -> model_usage.
  4. engagements: Supplies live handoff statuses (engagement_status) and resolution durations (engagement_completion - engagement_arrival).
  5. transactions: Supplies form names, conversion rates, and completion statuses. Transactions are marked completed if the transaction_status column contains "success" (case-insensitive).