Price and inventory delta indexing
Until now, updating price and inventory data in your Algolia indices meant iterating over the whole catalog: the AlgoliaProductPriceIndex_v2 and AlgoliaProductInventoryIndex_v2 jobs visit every product assigned to the site on each run and send an update for each one, even if nothing changed since the last run. The cost of a run grows with the size of the catalog rather than with the number of changes, which limits how often the jobs can reasonably be scheduled, and both jobs support only the Variation product record model.
This release introduces price and inventory delta indexing. The new AlgoliaProductPriceDeltaIndex_v2 and AlgoliaProductInventoryDeltaIndex_v2 jobs consume scheduled B2C price book and inventory list delta exports and only process the products whose prices or inventory data changed since the last run, so a run's cost scales with the number of changes. This makes frequent price and inventory updates practical on large catalogs, keeping prices and availability accurate between full reindexes, and the new jobs work with all record models. For setup instructions, see Price and inventory delta indexing.
The reason delta updates were previously limited to product data is that B2C Commerce provides a job step only for catalog delta exports (CatalogDeltaExport, which AlgoliaProductDeltaIndex_v2 runs as its first step). There is no equivalent job step for price book or inventory list delta exports, so they can't be incorporated into the Algolia jobs: each delta export must be created and scheduled manually in Business Manager, and the corresponding Algolia job consumes its output on its own schedule. This one-time setup is the trade-off for cutting price and inventory update runtimes down to the products that actually changed.
Metadata update
Required. Import metadata/algolia/meta/custom-objecttype-definitions.xml after upgrading to pick up the new AlgoliaConsumedDeltaArchive custom object type. All delta jobs, including the existing AlgoliaProductDeltaIndex_v2, now track consumed archives in these custom objects and fail with an error if the type is missing.
Import metadata/algolia/jobs.xml (or create the jobs manually) to get the two new job definitions.
What's new
AlgoliaProductPriceDeltaIndex_v2andAlgoliaProductInventoryDeltaIndex_v2jobs: consume the numbered archives produced by scheduled B2C delta exports of price books and inventory lists (Administration > Site Development > Delta Exports). B2C Commerce records the changes in its Change Log regardless of their origin: Business Manager edits, feed imports, and API writes are all included.- Full record updates: the prices and quantities in the archives only identify the changed products; each record is rebuilt from the product's current data, so the result matches a full reindex of the changed products. With Index out of stock products off, a product that sells out is removed from the index and re-added once it's back in stock. Products that no longer qualify for the index are removed.
- All record models supported: changed product IDs are matched to the configured record model. With the Base product and Attribute-sliced models, a changed variant updates its base product's record; with the Variation product model, a changed base product updates the records of the variants that inherit from it. The existing
AlgoliaProductPriceIndex_v2andAlgoliaProductInventoryIndex_v2jobs support the Variation product model only. - New consumed-archive tracking: delta jobs record the archives they have processed in
AlgoliaConsumedDeltaArchivecustom objects and leave the archives in the outbox, where the platform deletes them after 30 days. The custom objects expire after 33 days, so no cleanup is needed. Consumption is tracked per site and per job, so several sites, or several jobs on the same site (for example, jobs splitting the work by locale), can consume the same delta export independently. This supports price books and inventory lists shared between sites. - The new jobs send data through the indexing API configured for the site, either the Search API or the Ingestion API.
- BM dashboard: the job deep links in the report tables are now computed once per job before rendering. If a link can't be built, the dashboard shows the job ID as plain text instead of failing.
Breaking changes
- Metadata import is mandatory (see Metadata update above). Without the new custom object type, every delta job run ends in error.
- Consumed-archive tracking changed completely. Delta jobs no longer move processed archives to
_completedand_failedfolders in the outbox; archives stay in place and consumption is recorded in custom objects. If you have tooling or monitoring that relies on the folder moves, adapt it before upgrading. The old_completedand_failedfolders are no longer used and can be deleted; the platform's 30-day Impex retention removes their contents either way.
Notes
- Price book and inventory list delta exports have no platform job step, so the Algolia jobs can't trigger them. Create each delta export in Business Manager, give it its own schedule, and match its name and consumer to the job's
deltaExportJobNameandconsumerparameters. The Delta Export and Change Log platform features must be activated by Salesforce support. - Run
AlgoliaProductIndex_v2at least once before relying on the delta jobs: the delta exports only contain changes made after you create them, so the jobs maintain existing records but can't build the initial index. - The Change Log retains changes for seven days. If a delta export or job is paused for longer, the missed changes only reach Algolia with the next full reindex. Keep your periodic
AlgoliaProductIndex_v2full reindex scheduled. - For large-scale changes such as replacing a price book through an import, deleting a price book or inventory list, or assigning different ones to the site, run a full atomic reindex. These operations don't produce per-product delta entries for everything they affect.
- Leave the
indexingMethodstep parameter of the new jobs set tofullRecordUpdate. The jobs rely on full records to re-add products that return to stock or aren't in the index yet. - In a multi-instance setup, the full records sent by the new jobs would overwrite the attributes indexed from the other instance. Keep using
AlgoliaProductPriceIndex_v2andAlgoliaProductInventoryIndex_v2on the production instance. - A newly created (or renamed) job pointed at an existing delta export has no consumption history, so its first run processes every archive still in the outbox, up to 30 days of history.
- Deleting a delta export and recreating it under the same name restarts the archive numbering at
000001.zip, and the existing consumption records prevent the jobs from processing the new archives with the same names. Use a different name, or delete the site'sAlgoliaConsumedDeltaArchivecustom objects first.
What's Changed
- feat: Changed direct product property accesses to getters and setters by @ede-somogyi-algolia in #278
- fix: Miscellaneous fixes by @ede-somogyi-algolia in #279
- fix: Preferences and store list are injected into AlgoliaLocalizedProduct directly by @ede-somogyi-algolia in #280
- fix: Duplicate attributes while creating the model by @ede-somogyi-algolia in #281
- feat: Price and Inventory deltas by @ede-somogyi-algolia in #287
Full Changelog: 26.4.0...26.5.0