diff --git a/app/builders/v2/report_builder.rb b/app/builders/v2/report_builder.rb index 1442c5799..2725c55a3 100644 --- a/app/builders/v2/report_builder.rb +++ b/app/builders/v2/report_builder.rb @@ -46,6 +46,14 @@ class V2::ReportBuilder } end + def short_summary + { + conversations_count: conversations.count, + avg_first_response_time: avg_first_response_time_summary, + avg_resolution_time: avg_resolution_time_summary + } + end + def conversation_metrics if params[:type].equal?(:account) live_conversations diff --git a/app/helpers/api/v2/accounts/reports_helper.rb b/app/helpers/api/v2/accounts/reports_helper.rb index 0604eba2f..3d87154fd 100644 --- a/app/helpers/api/v2/accounts/reports_helper.rb +++ b/app/helpers/api/v2/accounts/reports_helper.rb @@ -37,7 +37,7 @@ module Api::V2::Accounts::ReportsHelper business_hours: ActiveModel::Type::Boolean.new.cast(params[:business_hours]) } ) - ).summary + ).short_summary end private