Skip to content

Spend Trends

Navigate to Analytics → Spend → Spending Trends in the sidebar, or open /analytics/spend-trends.

Spending trends of costs per channel
Spending trends of costs per channel

Report Spend Trends report displays an analysis of WhatsApp (and other channel) conversation costs over the selected period. The report consists of two KPI cards, a daily cost bar chart, and a pie chart of cost distribution by conversation category.

Date parameters are taken from global date range at the top of the Analytics page. Format: yyyy-MM-dd.

Displays the total conversation cost during the selected period, along with the percentage change compared to the previous period.

AspectDetails
Data sourcedata.kpis.totalCost — array CurrencyKpiMetric, one entry per active currency
ValueDivided by 100,000 then formatted as currency (e.g. Rp 1,250,000 for IDR)
Perubahanchange * 100, displayed with 1 decimal (e.g. “+12.3%“)
Indicator colorUp (positive) = red/destructive (rising costs are considered bad); Down (negative) = green/success (falling costs are considered good)
Label”vs. previous period”

Displays the average cost for each conversation that occurred during the selected period.

AspectDetails
Data sourcedata.kpis.avgCostPerConversation — array CurrencyKpiMetric
ValueDivided by 100,000 then formatted as currency
PerubahanSame as Total Cost — indicator color and direction are identical

KPI cards display all active currencies simultaneously (for example, IDR and USD in one card). Select a currency via the dropdown in the daily cost chart title.

Available currencies are fetched from data.kpis.totalCost.map(c => c.currency). Default: IDR. If a previously selected currency is no longer available after the data changes, it is automatically reset to the first currency in the list.

AspectDetails
TypeBar chart (Recharts BarChart)
Data sourcedata.dailyCostChart — array of daily { date, costs: { IDR, USD } }
X axisDate, formatted as “Mon DD” (e.g. “Jun 1”)
Y axisCost in the selected currency, formatted with formatCurrency
TooltipDisplays the cost value with full currency format
Bar colorhsl(221.2 83.2% 53.3%) (blue)

Pie Chart — Cost per Conversation Category

Section titled “Pie Chart — Cost per Conversation Category”
AspectDetails
TypeDonut chart (Recharts PieChart with innerRadius: 50)
Data sourcedata.costByCategory — array { type, costs: { IDR, USD } }
FilterOnly categories with cost > 0 are displayed
LegendVertical, to the right of the chart
CategoryColorDescription
MarketingGreen (hsl(142.1 76.2% 36.3%))Promotional and marketing messages
UtilityBlue (hsl(221.2 83.2% 53.3%))Transactional messages and notifications
AuthenticationPurple (hsl(262.1 83.3% 57.8%))OTP messages and identity verification
ServicePink (hsl(346.8 77.2% 49.8%))Customer service messages
UnknownGray (hsl(215 20.2% 65.1%))Unrecognized category

All financial values from the API use an integer scale (multiplied by 100,000). The portal divides by 100,000 before displaying:

  • IDR: no decimals (e.g., Rp 1.250.000)
  • USD: 2 decimals (e.g. $8.50)
ConditionDisplay
Authentication token not foundRed alert: “Authentication token not found.”
API request failedRed alert with an error message
No dataText message: “No cost data available for the selected period.”
LoadingText: “Loading cost analytics…”
  • The date range is controlled by the global DateRangePicker in the Analytics page header (default: last 30 days).
  • Cost changes (up/down indicators) are calculated by the backend — the portal does not calculate them itself.
  • The change indicator color uses inverted logic: a cost increase is shown in red (bad), a cost decrease is shown in green (good).