Backfill past Intervals
Give records that already exist their Intervals, from field history, from their current values, or not at all.
A new Tracked object starts with the next change. Backfill gives the records that already exist their Intervals, so reports cover the time before you turned tracking on.
Choose a mode#
Open Sojourn Settings, then Tracked objects, then the object, and its Backfill tab. The Backfill card offers three modes:
- History recreates past Intervals from the object's field history: from each record's creation to its first change, then each change to the next, with the last one open. A Tracked field without history starts from its current value.
- Seed starts each record from its current value: one open Interval per Tracked field, from the record's last change; the owner's Interval starts at the record's creation. A blank field set to Start timing at the first value gets no Interval from Seed, nor from Create interval on the Health Monitor: its first Interval opens when it first gets a value.
- Fresh adds nothing: capture begins with the next change.
History and Seed are on the Plus plan; on the Free plan the card offers Fresh. See Free and Plus plans.
History and Seed give Intervals only to the records the object tracks: of a record type the object lists, when it lists any, and meeting its records to track (both set on the Records tab, see Track an object). They follow the object's owner tracking as capture does: under Users only a queue's stretch in the history is no owner Interval and the next user's stay continues the sequence, and with Ignore a move between members of the same queue a move between two direct members keeps one stay (see Track an object).
History needs field history tracking turned on for the object and its fields in Salesforce Setup before the changes happened. If the object keeps no field history at all, History seeds every record and says so in the result.
For the Closed when rule (see Track an object), History reads the field that decides: the status field, or the chosen checkbox. Track that field's history too. Without it, a closed record counts as closed since its last change, so its owner stay ends and Record Closed starts there rather than at the real close. A checkbox that Salesforce sets from the status, such as Closed (IsClosed) on Case and Opportunity, keeps no field history at all, so History always places its close at the last change. To run History on those objects, leave the Closed Checkbox Field empty and let the Closed values decide: Status and Stage keep history.
Run it#
- Choose the mode, then Run backfill.
- Read the confirmation: it names the mode and the object. Choose Run backfill again.
- The card shows Queued, then Running, then Complete or Failed with what was done, for example "Seed backfill on 12 Oct 2026, 13:56: 60 Intervals for 20 records."
Run backfill is refused, with the reason, and nothing starts:
- when the object is turned off: "Turn on Case first." A History or Seed run on an object Sojourn cannot read as a Tracked object, for example one that no longer exists in the org, is refused with its name and "is not tracked now."
- for History or Seed on the Free plan.
- while a backfill job is really running in the org (on any object) and this object's card says Queued or Running: "A backfill is still running. Try again when it finishes."
- while a Catch up runs, and, for History and Seed, when Salesforce already holds 100 batch jobs (see Run the jobs).
The job runs as you: only records and fields you can see are read and written. A backfill and a Catch up never run at the same time: each is refused while the other runs, so their chunks cannot both open an Interval for the same field. Catch up and Seed leave alone a field that keeps only the change (see The Values tab): they cannot tell that its value changed.
How a run works#
History and Seed run in the background as a chain of short jobs, one after another, not as one batch job. Each job reads its records in chunks and, while Salesforce's limits for that job leave room for another chunk, reads the next; then it starts the next job of the chain, which carries on from the next record. A chunk is 20 records for History and 200 for Seed, because History reads every field change of each record; the last chunk reads only the records left. Setup's Apex Jobs lists each job of the chain as a Queueable job of BackfillChain.
To change how many records a History chunk reads, set History backfill: records per chunk on the object's Advanced tab, from 5 to 50, and choose Save; fewer suit records with long field history. It is the size of every chunk except the last, and Salesforce's limits decide how many chunks one job of the chain runs, so a job with heavy records runs fewer of them. The chunk size is on the Plus plan, with History, and applies to the next run.
A run that stops part-way shows Failed with the records it finished, for example "History backfill on 23 Oct 2026, 12:23 stopped after 400 records: Salesforce stopped one link of the run, for example at a governor limit; see the Error Log. Records already done are skipped when you run it again." It stops that way when one job of the chain ends at a Salesforce limit, or when Salesforce does not start the next job, and the Error Log gets one row saying so. Salesforce keeps the run's list of records for 48 hours, so a run that has not finished by then stops at its next chunk, saying "Salesforce could no longer read the run's list of records, which it keeps for 48 hours; see the Error Log."; run it again to finish the rest. It also stops at its next job if the object stops being tracked, saying the object is not tracked now, and before its next chunk if the org leaves the Plus plan, saying how many chunks it did not run; run it again on Plus to finish. A Queued or Running backfill with no job left going, for example after a job was stopped in Setup, also shows Failed and says it stopped before it finished; you can run it again.
Very large objects. When you choose Run backfill, Sojourn lists the object's records once, as an Apex cursor the whole run reads from, so the confirmation can take a moment on an object with millions of records. Salesforce charges every record in that list to the org's daily allowance of Apex cursor rows: 100 million rows over a rolling 24 hours, for the whole org, shared with your own code and other apps. A backfill of an object with 20 million records uses a fifth of it. If your own code uses Apex cursors, spread the backfills of very large objects over more than one day. Run backfill is the only part of Sojourn that uses the allowance.
Safe to run again. Records and fields that already have Intervals are skipped, so a second run adds nothing to them. After a Failed run, run it again to finish the rest; the Error Log says what stopped it.
You are done when
- The Backfill card reads Complete.
- An Interval report on the object shows Intervals that start before you added it.
Updated in release 1 This page changes in the same pull request as the feature it describes.