The demand model · Part 2

Substitution Data and Grouping

Substitution data says where a product's sales go when it isn't available. It is the evidence a demand model is built from, and on its own it shows how shoppers divide a category. This guide covers importing it, what to do when it doesn't match your products exactly, and the two groupings that turn it into something you can read.

What substitution data is

Retailers and data agencies produce reports that say, for each product, what happens to its sales when it is unavailable. They go by several names: substitution, switching, transferable demand, or group impact analysis. Whatever the name, Spanner holds the same three things for each product:

Total demandHow much the product sells. Usually its sales over the period of the report.
SubstitutesThe products its demand transfers to, each with the amount that transfers.
Lost demandWhat buys nothing when the product is unavailable. Total demand is lost demand plus what transfers.

A document can hold several data sets, for example one for each retailer. Each has a name, and the demand model is built from the one you choose.

This guide is for Spanner 2.5.1 and later. If you haven't yet, read Part 1, How the Demand Model Works, first.

Importing it

Open the document that holds the category's products, choose Interface › Import Substitution Data, and pick the file: an Excel workbook or a CSV file.

The import window has five tabs, in two groups, because reports usually keep the transfers and the totals in different places. The first three tabs are for the demand that transfers between products: two that say which columns are which, one for each way a report can lay its substitutes out, and one that matches the report's products to yours and imports. The last two do the same for total and lost demand.

The import window's five tabs: Map Substitutes Down, Map Substitutes Across, Match Transferable Demand Products and Import Transferable Demand Data, Map Total / Lost Demand Columns, and Match Total / Lost Demand Products and Import Data
The import window's five tabs.
The Interface menu with Import Substitution Data highlighted
Interface › Import Substitution Data starts the import.
The Sheet list at the top right of the import window, open on a workbook's sheets
The Sheet list, at the top right of the import window, chooses which sheet of the workbook you are reading.

First, the demand that transfers

Reports lay their substitutes out in one of two ways, and there is a mapping tab for each.

Substitutes down. One row for each product and substitute, so a product with five substitutes fills five rows:

ProductSubstituteTransferred Sales
Brand A 4x440mlBrand A 10x440ml4,200
Brand A 4x440mlBrand B 4x440ml2,900
Brand B 4x440mlBrand A 4x440ml3,100

Substitutes across. One row for each product, with its substitutes side by side:

ProductSalesSubstitute 1Substitute 1 Transfer %Substitute 2Substitute 2 Transfer %
Brand A 4x440ml20,000Brand A 10x440ml21%Brand B 4x440ml14.5%
Brand B 4x440ml12,400Brand A 4x440ml25%Brand C 4x440ml10%

Both tables say the same thing about Brand A 4x440ml: 4,200 of its sales transfer to Brand A 10x440ml, which is 21% of 20,000.

  1. Choose the sheet that lists each product with its substitutes.
  2. Say which columns are which, on the mapping tab that suits the report: Map Substitutes Down or Map Substitutes Across. Both are described below. Then click Next.
  3. Match the products. Each product in the report is listed under External ID, beside the Spanner Product it has been matched to. Spanner fills in those it can. For the rest, click the arrow at the end of the row and pick the product. The red cross clears a match. Leave a row blank when your document has no such product.
  4. Import. In Import to, pick a data set, or type a name for a new one, and click Update Substitute Data. When the data set already exists there is also Overwrite Substitute Data, which replaces what it holds.

Map Substitutes Down

Type the column letter into the Product, Substitute and Transferable Demand boxes at the foot, and press Enter or move to another box. Each column takes the colour of its box, so you can see what you have chosen. If codes and descriptions are in separate columns, tick Separate Descriptions and two more boxes appear.

The Map Substitutes Down tab, with column A as the product, B as the substitute and C as the transferable demand
Mapping the columns. Here column A is the product, B the substitute and C the demand that transfers between them.

Map Substitutes Across

Here you say where the first substitute is, and how the pattern repeats along the row. The boxes at the foot are:

ProductThe column that holds each product's code.
First SubstituteThe column that holds the first substitute's code. Spanner then reads the headings. Where the same heading comes again with its number one higher (Substitute 1, Substitute 2 and so on), or word for word, it fills in Number of Substitutes and Repeat Every for you.
First Transferable DemandThe column that holds what transfers to the first substitute.
Number of SubstitutesHow many substitutes each row holds.
Repeat EveryHow many columns it is from one substitute's columns to the next's.
MultiplierOptional. A column that every transfer on the row is multiplied by. Use it when the report gives each transfer as a share of the product's sales: put the sales column here, and Spanner works out the amounts. Leave it empty when the transfers are already amounts.

For the example table above, whose columns run from A to F, that is Product A, First Substitute C, First Transferable Demand D, Number of Substitutes 2, Repeat Every 2 and Multiplier B.

Every substitute's columns are coloured, not only the first's, so a wrong number or repeat shows on the sheet at once. The Multiplier column is yellow. With Separate Descriptions ticked there are also boxes for Product Description and First Substitute Description, and the description columns repeat as the code columns do. Next appears once First Substitute and First Transferable Demand are filled in.

The Map Substitutes Across tab on a report with five substitutes across each row, each substitute's code, description and transfer columns coloured
A report with five substitutes on each row. The first substitute's code is in BS, its description in BR and its transfer in BT, and the same three columns repeat for the other four. Rows of dashes are products the report has no substitutes for, and Spanner leaves them out.
Column Z of the same sheet, Total Sales, coloured yellow as the Multiplier
Further left on the same sheet. This report gives each transfer as a share of the product's sales, so Total Sales, in column Z, is the Multiplier.

Spanner leaves out a substitute with no code, a transfer that is not above zero, and a product listed as its own substitute. Where the same product and substitute come up more than once, the amounts are added together.

A share must be held as Excel holds a percentage: 21% or 0.21. A column of plain numbers such as 21 would give amounts a hundred times too large.
Versions. Map Substitutes Across is in Spanner 2.5.1.2 and later. Before that there is one mapping tab, Map Transferable Demand Columns, which is Map Substitutes Down under its earlier name.
The matching tab with the list of the document's products open on one row
Matching by hand: the arrow at the end of a row opens the list of your document's products.
The matching tab with most rows matched, a data set name in Import to, and the Update Substitute Data button
Ready to import. The first two rows are left blank because the document has no such product.

The three icons above the list copy it to the clipboard, paste it back, and read matches from a match file, so you can do the matching in Excel if you prefer. Leave Update Matches ticked and the codes you match by hand are added to each product's Matches, so the next import finds them.

Spanner matches a code in the file to a product by its ID, then its barcode however many digits it is written with, then the product's other codes (its Matches).

A message saying substitute data was imported into 62 products, and asking for total or lost demand to be added
Spanner says how many products now have data, and reminds you that the totals are still to come.

Then, total and lost demand

  1. Choose the sheet that holds one row for each product.
  2. Say which columns are which, on Map Total / Lost Demand Columns: the Product, its Total Demand and its Lost Demand. Give either or both. If the report has only one of the two, Spanner works the other out from the transfers. Click Next.
  3. Match and import, as before, with Update Total/Lost Data or Overwrite Total/Lost Data.

A report with its substitutes across usually has each product's sales on the same row, and often its lost demand too, which it may call sales at risk. Use the same sheet for this step.

Such a report tends to name only each product's top few substitutes, so its transfers add up to less than the demand that really transfers. Where it gives lost demand, map both Total Demand and Lost Demand. With total demand alone, Spanner works lost demand out as the total less the transfers it was given, and so counts what goes to the substitutes that were not named as lost.

The Map Total / Lost Demand Columns tab, with column A as the product and B as total demand
This report gives each product's spend, which is its total demand. It has no lost demand column, so that box is left empty.
The matching tab for total and lost demand, with two rows unmatched
Two rows have no match. The next section uses the first of them, Brand A 18x440ml, as its example.
Ask Spanner AI. It can read the report, whichever way its substitutes are laid out, work out which columns are which, import it and tell you what didn't match:
  • "Import the substitution report in this workbook as a data set called Retailer A, and tell me how much of it matched."
  • "Which codes in the substitution data have no product, largest first?"
It previews the import first, so you can check the columns before anything changes. It needs the Read Files permission.

When the data doesn't match your products

It rarely will, exactly. The report may be older than your planogram, or newer. It may come from a retailer whose range differs from the one you are planning. So expect two kinds of gap:

  • Products in your document with no data. They were not in the report.
  • Codes in the report with no product. They are not in your document. Spanner keeps them, so that if the product is added later, the data is there for it.

This is normal, and it is not a reason to stop. Match what the codes give you, note how much is unmatched, and carry on. Substitution data is most of the picture, not all of it. The demand model exists to carry what the data shows to the products it doesn't cover, by their attributes.

Do check the size of the gap. If only a small part of the category has data, or most of the transfers go to products that aren't in the document, the evidence is thin and the model will lean more on your judgement. The model's report tells you both figures.

When a code is really one of your products

Some gaps are only a change of pack. Suppose your planogram is the older of the two and still has Brand A 20x440ml, while the report has Brand A 18x440ml, the pack that replaced it. The import finds no product for the 18 pack, so its row is left blank. But what the report says about the 18 pack is the best evidence you have for the 20 pack: they are the same product to the shopper.

Give the 18 pack's data to the 20 pack on the manager's Substitute Gap Data tab:

  1. Choose Edit › Manage Substitution Data, pick the data set, and open Substitute Gap Data. It lists every code that your products transfer demand to and that has no product, largest first.
  2. In the code's Match to box, type part of the product's name, or click the arrow, and pick the product from the list. The product takes the transfers that were going to the code, and the code's own total demand, lost demand and substitutes where the report had them.
  3. The round red button at the end of the row undoes a match.
The Substitute Gap Data tab, with Brand A typed into the Match to box of the Brand A 18x440ml row and a coloured list of products beneath
Matching Brand A 18x440ml, which is in the report, to Brand A 20x440ml, which is on the planogram. Typing "Brand A" lists the products with that in their name.
ColumnWhat it shows
Unmatched Substitute IDA code in the report with no product in your document.
Parent Products, Parent Products SalesHow many of your products name it as a substitute, and their sales by the measure chosen at the top.
Unmatched Transferable DemandThe demand those products transfer to it. This is what the data loses while the code is unmatched, so work from the top.
On Selected Planogram, PositionsWhether any of those products is on the selected planogram, and how many positions they have.

The colours in the list tell you what a match would do:

GreenA straightforward match.
OrangeThe product is already a substitute of some of the same products. Matching adds this demand to what already transfers to it.
RedThe product is one of those that transfer demand to this code. A product can't be its own substitute, so it can't be chosen.

The Substitution Data manager

Choose Edit › Manage Substitution Data and pick the data set. The manager shows the data product by product, and arranges the products so that those that substitute for each other sit together.

The Edit menu with Manage Substitution Data open, listing the document's two data sets
Edit › Manage Substitution Data lists the document's data sets. Manage Demand Model, just below it, is covered in Part 3.
TabWhat it is for
Substitute Gap DataThe codes in the report that have no product, for matching by hand. See the section above.
Products Substitutes SummaryEvery product with its total and lost demand, and how many substitutes it has.
Grouped Products MatrixEvery product against every other, coloured by how strongly they substitute.
Grouped Products TreeThe groups as a tree, with a read-out on each division. This is where you run Group from Bottom and Group from Top, and move products and groups by hand.
Grouped Products Tree RulesShown once there is a grouping. The rule that defines each group, in terms of your classifications.
Grouped Products Cross ClassificationsA check on those rules. It counts the products that meet the rule of more than one group, and lists them where the two groups cross. See From a grouping to a model.
Grouped Products Demand ShapesA chart for each top group, and Create Demand Model. See From a grouping to a model.

Products Substitutes Summary

Start here after an import, to see what you have. Each product is shown with its sales, whether it is on the selected planogram, its Total Demand and Lost Demand, the number of Substitutes it has, and the number of products it is a Substitute of. Hover over either number to see the products. Products shaded orange have no data.

The Products Substitutes Summary tab, with a list of products showing over one row's Substitute of Other Products figure
The summary. The selected product is a substitute of seven others, listed where the pointer is. The twelve orange rows at the top are products with no data.
See it on the planogram. View › Highlight › Substitutions colours the selected planogram by which products have data, by the groups of products that substitute for each other, or by the substitutes of a product you select. See Substitutions and demand segments.

Which products are grouped

A product is included when it has demand, has at least one substitute in the document, and is itself a substitute of some other product. Products you have excluded from the grouping are left out.

The number in each cell of the matrix

(demand that transfers from A to B + demand that transfers from B to A) ÷ (demand of A + demand of B)

White is no transfer, yellow is moderate, and red is a third or more. For two groups, the same sum is taken over every link between their products. The black outlines mark the groups, one inside another for each level.

The Grouped Products Matrix tab: products down the side and across the top, with coloured percentages where they substitute and black outlines round each group
The matrix after grouping. Products that substitute for each other sit together, so the colour gathers into blocks along the diagonal. Group runs Group from Bottom, and the buttons on the left export the matrix.

Group from Bottom

There are two ways to build the groups. They answer different questions, so they give different results, and both are worth looking at. Neither is "the answer": they are evidence for you to decide with.

Group from Bottom finds each product's closest substitutes and builds upwards.

  1. The first level. Every product starts on its own. The product with the strongest link to anything else is joined to that partner, and this repeats until no single product has a link left. A product still standing alone goes with the group that receives most of its transferred demand.
  2. Higher levels. Groups are then merged, strongest link first. The bar for merging is lowered step by step, and each step at which something merges becomes a level of the tree. Merging stops when no two groups are linked above the Minimum Group Threshold.

What it tells you

  • The first level shows the tightest substitutes: products shoppers treat as nearly the same thing. Typically the same brand and variant in another pack size, or the same flavour in another brand.
  • Look inside each first-level group. What its products share, often the brand or the flavour, is what shoppers hold to. What varies inside it, often the pack size, is what matters least to them.
  • Each product is placed by its single strongest link, so you can always see why two products are together.

What to be careful of

  • Because a product follows its one strongest link, a weakly linked product can end up in a top group it has little to do with. The top level is the least reliable part.
  • The number of levels depends on the Minimum Group Threshold. Try more than one setting.

Group from Top

Group from Top looks for the places where the category divides, and works downwards. It starts with everything as one group, so the first divide comes from the data too.

Fair share

If shoppers had no preferences beyond popularity, the demand a product gives up would spread over the other products in proportion to their size. That is fair share. Group from Top looks for divisions that hold much more transfer inside each part than fair share would.

Split quality

For any division of a group into parts:

Split quality = 1 − (transfer that crosses between the parts) ÷ (transfer that would cross under fair share)
100% 0% Below 0% Nothing crosses: separate markets As much crosses as size predicts More crosses: they belong together
How to read a split quality. The higher it is, the more real the divide.

How a group is split

Spanner tries several ways of dividing the group, keeps the best, and only makes the split if its quality reaches the Minimum Split Quality (50% unless you change it). Each part is then split again in the same way, until nothing reaches the minimum.

So a group is divided where a real divide exists, whatever its size, and a group whose products all substitute for each other is left whole, however large it is.

The levels of the tree

The levels are bands of strength, not depth. With the minimum at 50%:

Top levelOnly divides of 83% or more.
Next levelAdds divides of 67% or more.
Lowest levelAdds divides of 50% or more: everything that was accepted.

The top level shows the strongest boundaries in the category. These are the natural candidates for demand segments. The levels beneath show weaker structure inside them, which is where to look for attributes.

What to be careful of

  • A small group can show a high split quality by chance. Treat splits of four or five products with caution.
  • A product with almost no recorded transfer can't be placed with confidence by any method.

Reading the tree

The read-outs are worked out from whatever grouping is on screen: Group from Bottom, Group from Top, or your own after moving things by hand. That makes them a common yardstick.

The Grouped Products Tree tab after Group from Bottom: products on the left joined into Level 1 groups, then Level 2 and Level 3, with split quality read-outs above the divided groups
A tree made by Group from Bottom. Products on the left join into Level 1 groups, and those into larger groups to the right. 90% Segment + Flavour Group, on the right, is the read-out for the whole category divided into its top groups. 50% Segment + Pack Type is in red because that division falls short of the Minimum Split Quality. Two products, a third of the way down, carry edge diamonds.
Above each divided groupThe split quality, then the classification that best matches the division, for example 92% Flavour Group.
To the right of the top groupsThe same, for the whole category divided into the top groups.
Red textThe division is below the Minimum Split Quality.
A "?" in place of a classificationNo classification matches the division.
Hover over a read-outSplit quality, the share retained inside the parts, fair share (shown as Share by Size) and the match in full.

Classification match

For each division, Spanner looks for the classification whose values best tell which part a product is in, and reports the share of products it gets right. A classification with a different value for nearly every product, such as a very detailed brand list, explains nothing and isn't reported. Two classifications together are reported only when they do clearly better than the best single one, for example Pack Type + Pack Size.

A "?" is as useful as a match. It says shoppers are dividing these products on something your classifications don't capture. Either the right classification is missing, or its values are the wrong buckets: too fine, too coarse, or only meaningful in combination. The product names in each part usually show what it is. Part 3 shows what to do about it.

Edge products

A diamond beside a product marks an edge product: one that fits another top group nearly as well as its own. Orange means it is close. Red means it fits the other group better than the one it is in. Hover to see which group and by how much. Edge products are the ones to decide by judgement rather than by the numbers.

Using the two together

QuestionLook at
What are the candidate demand segments?Group from Top, the top level.
Do my own groups hold together?Arrange the top groups by hand, then read the split quality to their right and the edge products.
What matters inside a segment?Group from Top, the levels below the top, and the classification named on each division.
Which attributes hardly matter to shoppers?Group from Bottom, the first level: what varies between the products inside a group.
Are my classifications the right ones?Divisions marked "?", and classifications that are never named.
Which products need a judgement call?Edge products, and products that sit in different groups under the two methods.

Where the two methods agree, the structure is solid. Where they disagree, the products involved are boundary cases, and that is where your knowledge of the category has to decide.

Ask Spanner AI. It can run either grouping and read it with you:
  • "Group the substitution data from the top and tell me where the category divides."
  • "Test whether Segment then Brand is how shoppers divide this category."
  • "List each product with its group and its Segment, Pack Type and Brand, and tell me what the coding misses."

From a grouping to a model

The last tab, Grouped Products Demand Shapes, charts each top group: how its sales build up as its distribution builds. Choose the measures and the period at the top.

Each group's curve is described by two numbers in the legend, A and B: the first product serves A, and each further one adds less, by B. A product in half the stores counts as half a product. This is a rough first stab at a group's shape, and useful for seeing whether groups behave differently. The demand model gives a fuller fit: see The equations, and how well they fit in Part 1.

Create Demand Model then opens the Demand Model editor on a new model, with a segment for each top group that has a rule, and builds it straight away. The rules are the ones on the Grouped Products Tree Rules tab.

Check the rules first

A rule describes a group in terms of your classifications, and two rules can claim the same product. Grouped Products Cross Classifications shows where that happens. The line at the top counts the products that meet more than one group's rule, and the grid lists them where the two groups cross.

In a model, a product goes to the first segment whose rule it meets, so for these products the order of the segments decides, not the data. If there are more than a few, tighten a rule on the Tree Rules tab before you create the model.

The Grouped Products Cross Classifications tab: a grid of Level 3 Group 1 against Level 3 Group 3, with four products listed where they cross
Four products meet the rules of both Level 3 Group 1 and Level 3 Group 3. The grid shows them twice, once each way round.
Treat this as a first look, not a finished design. The top groups are the candidates for segments, but a group's rule may leave products in no segment, and a group that passes much of its demand to another should be joined to it. Part 3 shows how to test each candidate.
The Grouped Products Demand Shapes tab: a chart with a curve for each of three top groups, and the Create Demand Model button at the top right
Grouped Products Demand Shapes, with a curve for each of three top groups. Create Demand Model is at the top right.

Want help with a demand model?

A demand model for your category is worth setting up carefully. We can build one with you, from your substitution data and your knowledge of the category.

Email us Book a Demo