Skip to content
Release 1 in development, 16 of 16 sprints done. Early access is open. 16 of 16 sprints done · Join early accessJoin early access

Report cookbook

The rules that keep interval reports honest, the packaged reports, and worked examples.

Tell us the report you need and we will write it up first.

Filter by object, then field, then value#

Every interval belongs to one Tracked object and one Tracked field. Before you group by Value, filter or group by Tracked object and then Tracked field. A grouping that mixes fields adds Status minutes to Owner minutes, and the totals stop meaning anything.

The 19 packaged reports (20 with Sojourn Omni-Channel) and 4 dashboards, with the filters each relies on, are listed in Reports and dashboards. They follow this rule: each filters Tracked Field before it groups by value. The dashboards run as the user each one names, the installing admin until you change it; see step 3 of Install Sojourn before you share them.

Average finished stays only#

An open stay has no business minutes until it ends, so its Elapsed Business Hours is 0, and an average that takes in open stays runs low. Every packaged report that averages hours filters Exited At not blank; do the same in your own reports. For the time so far on open stays, use Business Minutes To Date, which the Live values job keeps current for the stays entered within its window; older open stays show it blank.

For open stays of any age, Longest Open Intervals has a Days Open column: a row-level formula, Calendar Minutes To Date divided by 1,440, with one decimal place. It is current on every row, because Calendar Minutes To Date counts to now for an open stay, and it counts calendar days, not business hours. To add it to your own report, choose Add Row-Level Formula, type Number, insert Calendar Minutes To Date from the field list, and divide it by 1440.

In the same way as the hours averages, Status Changes per Case and Owner Changes per Case filter their counts not blank, so Cases that were never tracked do not average in as zero.

Leave closed records out of open stays#

A record's last Interval stays open after the record closes: a closed Case sits in an open Closed stay. Sojourn checks Record Closed on the Intervals of a record while it is closed, by the Tracked object's closed setting. The reports of open stays, Open Cases by Status and Time to Date and Longest Open Intervals, and the Open Intervals list view on the Intervals tab filter Open true and Record Closed false. Average Hours per Status, 90 Days and Average Hours per Owner, 30 Days leave out the time reopened Cases spent closed. The Open Intervals list view shows Calendar Minutes To Date, which is always current; Elapsed Business Hours stays empty until a stay ends.

The dashboards chart hours or counts, never minutes: SLA Health counts breaches and open Cases, and shows the hours to first close.

  • Worked examples: time in status for a queue, time per owner, and the statuses that miss their goal.
  • Hours per Case: total business hours, from the Case metrics or from the Intervals.
  • Status groups: report time by value group, or edit the bucket that splits customer time from company time.
  • Reports at large volume: date ranges, custom indexes, and summaries for trends.

Report on summaries#

Summary rows keep the totals after Intervals are purged; see Keep or purge Intervals. Use the Sojourn Interval Summaries report type.

  1. Filter Granularity to Month for trends, or Day for the last weeks. Never add Day and Month rows together: each Month row already holds its days.
  2. Filter All Owners to False. Rows with All Owners true add up every owner's rows for the same day or month, for Sojourn Dashboards; adding both counts each Interval twice. The packaged summary reports already filter it.
  3. Filter Parent Object and Tracked Field, as for Intervals, then group by To Value, and by Owner Name for time per owner.
  4. For the average time in a value, add a summary formula: the sum of Sum Business Minutes divided by the sum of Interval Count. Averaging Avg Business Minutes across rows weighs a quiet day like a busy one.
  5. Breach Count counts the Intervals that ran past their goal, and Warning Count the Intervals that reached their goal's warn percent. A Breach is also a warning, so for goals with a warn percent, Warning Count less Breach Count is the stays that came close and finished in time. Goal Count counts the Intervals that had a goal when they started, so the sum of Breach Count over the sum of Goal Count is the breach rate of the stays with a goal, leaving out values that have none.

Record Count is close, not exact. It counts each record once per row as the row is built. A record that gets another Interval later for a period already summarised is counted again on that row, so the count can run slightly high. Interval Count and the minutes are exact.

Merged and deleted records#

When records are merged, Salesforce deletes the records merged away, and their Intervals keep their own Parent Id and Parent Name: Sojourn does not move them onto the record that remains. The next Reconcile closes their open stays and checks Orphaned on each; see When records are merged.

  • In the Sojourn Intervals report type, a merged record's stays show apart from the record that remains. Filter Orphaned to False to count only records that still exist, or leave the filter off to keep every stay in the totals.
  • A merge moves related records to the record that remains, so a report type that starts from the record, such as Leads with Sojourn Intervals, lists the merged record's stays under the remaining record. Filter Orphaned to False to leave them out once Reconcile has run; before then, add Parent Id to the report, since a merged stay keeps the Id of the record merged away.
  • Summary rows count stays by value and owner, so the merged record's stays stay in their totals. A stay that Reconcile closed at the merge is counted once 16 days have passed, as for any deleted record; see Run the jobs.

Opportunity amounts in more than one currency#

Opportunity Amount on an Interval is the Opportunity's Amount when the stay began, in the Opportunity's own currency, with no conversion. In an org with more than one currency, a sum or average of it across Opportunities adds amounts in different currencies, so the total means nothing. Report on Opportunities in one currency at a time, or take converted amounts from your own Opportunity reports.

Email me when Sojourn logs an error#

Sojourn writes an Error Log row whenever it cannot record a change or a job cannot run. To hear about it without opening the Health Monitor, subscribe to a copy of the packaged Error Log by Type report. You need the Sojourn Admin or Sojourn Health Monitor permission set to read Error Log rows, and Salesforce's Subscribe to Reports permission.

  1. Open Reports, then the Sojourn Reports folder, then Error Log by Type. Choose Save As, give the copy a name such as Sojourn errors to fix, and save it in a folder of your own.
  2. Edit the copy, add the filter Status equals New, and save it. The report now lists only the errors that need you.
  3. Choose Subscribe. Set the schedule to Daily, at a time early in your working day.
  4. Under Run Report As, choose a user with Sojourn Admin or Sojourn Health Monitor, so the report sees every Error Log row. Every recipient sees what that user sees, messages included, and a message can hold a record's values, so add only people who may read them.
  5. Add a condition: Record Count, greater than, 0. Then choose Save.

The email now arrives only on the mornings when at least one error waits. Fix each one from the Health Monitor; see Watch Sojourn in the Health Monitor.