Reading this page
- Names are exact. Type a command as it is written here, capitals included. In Settings a name Spanner doesn't know shows salmon pink.
- 1 and 2 are Parameter 1 and Parameter 2. A command with neither takes no values.
- The selected document is the one a command works on. Commands about a planogram work on the selected planogram, and the Change commands on the selected object: a bay, fitting or point of sale. Select it by clicking it, or with Select By ID earlier in the automation.
- Product commands change every product in the document, unless the command says otherwise.
- A field is a product property, such as UPC, ID or Name, or a classification, by its name or by its number in the document's list, counting from 0.
- Measurements are in microns: 1 mm is 1,000 and 1 m is 1,000,000. Change Dimension, Change Position and Move Shelf also take a measurement with its units, such as 50cm or 100mm.
- Lists are separated by | unless the command says otherwise.
- A sales code is a measure, an outlet, a period and a year joined by underscores, such as VAL_0_1_TY: value, the first outlet, Time1, this year. * stands for every outlet, period or year.
- (2.5.1.2) marks a command or option that needs Spanner 2.5.1.2 or later, and likewise for other versions.
Document setup
The same changes the Document Editor makes; Document Setup explains each part.
| Command | Parameters | What it does |
|---|---|---|
| Times | 1: Time1 weeks 2: Time2 weeks | Sets the two time periods. Time1 and Time2 set one each (1: the weeks). |
| Set Latest, Set Previous | 1: the name | How the latest year and the year before are labelled. |
| Set Default Outlet, Set Default Channel | 1: name or number | The outlet or channel used where a planogram has none of its own. |
| Add Outlet | 1: name 2: place, blank for the end | Adds an outlet, with no data yet. |
| Rename Outlet | 1: outlet 2: new name | Renames it. |
| Move Outlet To | 1: outlet 2: place from 0, or End | Moves it, with its data. |
| Delete Outlet | 1: outlet or channel | Deletes it and its sales data. |
| Clear Outlet Sales Data (2.5.1.2) | 1: outlet or channel | Sets all its figures to zero and keeps it, as before importing a new period. |
| Add Classification | 1: name 2: place, optional | Adds a classification. |
| Rename Classification | 1: classification 2: new name | Renames it. |
| Move Classification To | 1: classification 2: place, or End | Moves it. Move Classification Up and Move Classification Down move it one place. |
| Delete Classification | 1: classification | Deletes it and its values. |
| Remove Empty Classifications | Deletes classifications no product has a value in. | |
| Add Default Classifications, Add Default Measures, Add Default Calculated Measures, Add Default Movement | Add your defaults from Settings that the document lacks. Calculated measures with the same code are updated. | |
| Add Measure | 1: Code \ Short Description \ Long Description \ Hide \ Calculation \ Criteria \ Preset Value 2: a number format, optional, e.g. N0 | Adds a measure, or changes the one with that code. Only Code and Short Description are needed. |
| Move Measure To, Delete Measure | 1: code or short description 2 (Move): place, or End | Moves it, or deletes it with its data. |
| Add Calculated Measure | 1: Code \ Group \ Description \ Type \ Calculation 2: a number format, optional | Adds one, or changes the one with that code. Codes start with a small c, e.g. cMARGIN; Type is Product Double, Product String, Position Double or Position String. |
| Move Calculated Measure To, Delete Calculated Measure (2.5.1.2) | 1: code 2 (Move): place, or End | Moves or deletes it. |
| Calculate | Works out every calculated measure again. | |
| Set Movement (2.5.1.2) | 1: the rows, e.g. MOVE Outlet 1 TY|MOVE Channel 1 TY | Replaces the movement rows. Each is a measure code, Outlet or Channel, 1 or 2 (the period) and TY or YA. |
| Case Rule, Minimum Days Cover, Desired Days Cover | 1: a planogram (name, number or ID), All, Document (2.5.1.2), or blank for the selected one 2: the value | Sets the stock rule. All sets every planogram and the document's default; Document sets only the default a new planogram starts with. |
| Set Substitution Scope (2.5.1.2) | 1: Planogram, Group, Department, Category, Sub-Category, Cluster, Region, Status or Document | Which planograms count as the range when judging whether substitutes are there. |
| Set Substitution Share (2.5.1.2) | 1: a number from 0 to 1 | How much substitution overlap is shared between two listed products. |
| Rename Substitute Data, Move Substitute Data To, Clear Substitute Data, Delete Substitute Data (2.5.1.2) | 1: the data set 2: new name, or place | Work on a substitution data set. |
| Apply Demand Model, Apply Space Model (2.5.1.0) | 1: a model's name or number in Settings; blank for the only one or the default; None to take it off | Gives the document a model saved in Settings. |
| Scale Document | 1: a number | Multiplies every measurement in the document by it. |
Product codes
These change a field for every product. A calculated classification is left alone, as its formula would only put the values back.
| Command | Parameters | What it does |
|---|---|---|
| Copy Product Strings | 1: from field 2: to field, or Matches (2.5.1.1) | Copies each product's value across. With Matches, the value is added to the product's other codes and nothing is replaced. |
| Concatenate | 1: fields, separated by spaces; put a name with a space in quotes, e.g. Brand "Pack Size" 2: to field | Joins the values with a space between them, leaving out blanks. |
| Set Text | 1: field 2: the text | Gives every product that value. Blank empties the field. |
| Clear | 1: field, or Matches | Empties the field. With Matches, every product's other codes go. |
| Trim | 1: field | Takes spaces off the start and end. |
| Left, Right | 1: field 2: how many characters to keep | Keeps the first, or last, characters. |
| Mid | 1: field 2: where to start, counting from 1, and how many, e.g. 3 5 | Keeps that part. |
| Remove Characters | 1: field 2: how many and Start or End, e.g. 1 Start | Takes characters off the start or end. |
| Clean Web Text | 1: field, blank for Name | Turns web codes such as & back into the characters they stand for. |
| Check Digit | 1: field, blank for UPC 2: 7 12, or blank for every code | Adds the barcode check digit to the end. With 7 12, only to codes of 7 or 12 digits. |
| UPC Length | 1: blank for 8/13 digits, or 13 | Writes every UPC in that form. |
| IRI2UPC | 1: field, blank for UPC | Turns Circana (IRI) item codes into UPCs. |
| Code Products (2.5.1.0) | 1: Classification=Value, e.g. Status=Archive 2: the test, as Delete Products takes it, joined by |, e.g. VAL_*_*_*|==0 | Sets the classification for the products that pass the test. A blank value clears it. |
| Copy Table Column | 1: the column's letter in the table showing, e.g. K or AB 2: to field | Copies a product table's column on the Reports tab into a field. |
| Calculate Classification Sizes | 1: the size classification 2: the rules, e.g. L=1000ml Kg=1000g | Rewrites sizes in one unit, so 1.5L becomes 1500ml. |
| Calculate Products Sizes | 1: the size classification 2: a pack count classification, optional | Sets each product's size from the numbers in the classification, times the pack count: 6x330ml gives 1,980. |
Products
| Command | Parameters | What it does |
|---|---|---|
| Merge Products | 1: the product to keep, by ID, UPC or name 2: the product to merge into it | Merges the second product into the first: its positions become the first product's. |
| Merge Many Products | 1: the key: UPC or a classification 2: options (2.5.1.0): Pad14 and ID | Merges every group of products that share a key. Building a Product Library explains the options. |
| Delete Products | 1: a classification, a property such as HasUnitDimensions, or a sales code 2: the value, or a comparison such as <30 or any>=30 | Deletes the products that pass. DIST_*_1_TY with <30 deletes products under 30 in every outlet. |
| Remove Unused Products | Deletes every product with no position on any planogram. | |
| Colour Products | 1: a colour, or blank | Gives every product that colour, or with blank, the average colour of its picture. |
| Other Merch Positions | 1: words in the product's name, blank for all 2: planogram names, or <SELECTEDPLANOGRAM> | For products with no Other pack yet, works one out from how they are faced on those planograms. |
| Load Images | 1: Missing, Positions Missing, Reload, Reload Positions, Product by Product, Positions Product by Product, or Clear | Loads product pictures, as View › Images does. Positions means only products on a planogram. |
| Images | 1: On, Off, or blank to switch | Shows or hides product pictures. |
Sales data
| Command | Parameters | What it does |
|---|---|---|
| Load Sales Data | 1: a sales data interface's name 2: optional, parts separated by \: add, and Their Name»Our Name for an outlet | Runs the import, as Interface › Sales Data Interfaces does (see Importing Sales Data). If the interface's file isn't there, Spanner asks for it. add adds products the file has and the document hasn't; Retailer A Total»Retailer A puts the file's outlet into the document's. |
| Scale Measure | 1: a measure code, or a sales code 2: a number | Multiplies the figures by it, e.g. 0.001 to turn units into thousands. |
| Set Outlet, Set Channel | 1: the name | The selected planogram's outlet or channel. |
| Refresh Navigator Sales Data | Brings the sales figures in the navigator up to date. |
To empty an outlet before an import, use Clear Outlet Sales Data.
Planograms and fixtures
| Command | Parameters | What it does |
|---|---|---|
| Add Planogram | Adds an empty planogram and selects it. | |
| Add Preset Planogram (2.5.1.2) | 1: a preset planogram's name or number, blank for the first | Adds a planogram from a preset, as Edit › Add › Preset Planogram does. Part 4 covers presets. |
| Add Bay, Add Shelf, Add Bar, Add Pegboard, Add Pegboard Multi, Add Chest, Add Curved Shelf, Add Table, Add Pallet, Add Point of Sale | 1: the preset's name or number, blank for the first | Adds that preset fixture from Settings to the selected planogram, and selects it. |
| Change Dimension | 1: Height, Width, Depth, or another, such as Base Height, Thickness, Notch Separation, MaxMerchHeight 2: microns, or with units | Changes the selected object's size. |
| Change Position | 1: X, Y, Z or Top of Fitting 2: microns, or with units | Moves the selected object. |
| Change Angle | 1: Angle Down (or Slope), Angle Right, Merchandise Angle or Arm Angle 2: the angle times 100, e.g. 1500 for 15° | Tilts or turns the selected object. |
| Change Colour (2.5.1.2) | 1: Colour, Border Colour, Base Colour, Base Border Colour, Riser Colour or Riser Border Colour 2: a colour name such as Silver, or #AARRGGBB | Colours the selected bay, fitting or point of sale. Base colours are a bay's; riser colours a shelf's. |
| Change Flow | 1: Left to Right, Right to Left, Spread Even, Facings or Manual | How positions are placed along the selected fitting. |
| Change Z Flow | 1: Front to Back, Back to Front, Spread Even or Facings | The same, front to back, in a chest. |
| Change Leg Display | 1: None, Block, Sides or Legs | How a display table's legs are drawn. |
| Change Obstructs | 1: Obstruct, Not-Obstruct, or blank to switch | Whether the selected point of sale pushes positions aside. |
| Change Position Cover | 1: the value | The selected fitting's position cover. |
| Change Txt | 1: the text | The words on the selected point of sale. |
| Move Shelf, Move Fitting | 1: Up, Down, Lowest, or a height with units, e.g. 100mm | Moves the selected shelf or fitting a notch, to the lowest free notch, or to that height. |
| Target Capacity | 1: the stock to hold, e.g. 1.25 * CaseCount > 1 (a space before the *) 2: LinearFacings (blank) or MaxBack | Sets each position's facings on the selected planogram to hold that much: here 1.25 cases, for products with more than one unit to a case. |
| Image String | 1: the side's number 2: the picture, as text | Puts a picture on a side of the selected object. Written by Decode to Automation Code. |
| Rotation | 1: X in microns and the angle in degrees, e.g. 3000000 90 2: the X and Z shift in microns | Adds a turn to the selected planogram, for a run of bays that goes round a corner. |
| Viewpoint | 1: the camera's X, Y and Z in microns 2: the direction it looks, X, Y and Z, and the field of view in degrees | Adds a 3D viewpoint to the selected planogram. |
| FSDU | For a free-standing display unit: shapes the 3D sides of the point of sale at each end of the selected planogram to the slope in their side pictures. |
To bring fixtures in from another file, see Import Fixture and Import Planograms.
Selecting and viewing
These change only what you see or what is selected, never the document's data.
| Command | Parameters | What it does |
|---|---|---|
| Select Planogram | 1: name, First, Last, or a number from 0 | Selects the planogram, so the work area shows it. |
| Select | 1: Planogram, Product, Bay, Fitting, Position or Point of Sale 2: First, Last, a number, or an ID, UPC or name; or Selected Position or Selected Fitting | Selects one. With Selected Position, a Bay or Fitting is the one the selected position is on; with Selected Fitting, the bay it is in. |
| Select By ID | 1: the ID of a planogram, product, bay, fitting, position or point of sale | Selects it. |
| Select Bay | 1: the bay's number | Selects that bay on the selected planogram. |
| Deselect All | Clears the selection. | |
| Set Comparison Planogram | 1: name, or blank to stop | The planogram the Compare tab compares the selected one with. |
| Set Product Filter | 1: a classification 2: values; ≠ in front leaves them out; blank takes the classification out of the filter | Sets the product filter below the menu bar. |
| Set Planogram Filter | 1: Group, Department, Category, Sub-Category, Cluster, Region, Status or Planogram 2: as above | Sets the planogram filter. |
| Clear Filters | 1: Product, Planogram, or blank for both | Clears them. |
| View | 1: Fit All, Fit Height or Fit Width 2: blank or 2D for the Front View, 3D for the 3D View | Shows the selected planogram on that tab, fitted to the screen. |
| Visual Render | 1: Hardware or Software 2: seconds, with Hardware | How 3D is drawn. With a number of seconds, Spanner goes back to Software after that time. |
| Clear 3D | 1: blank for the selected planogram, Document for all | Frees the memory the 3D model takes; it is built again when next shown. |
| Undo, Redo | 1: how many 2: a pause between each, in milliseconds | Undoes or redoes that many steps, as Edit › Undo does. |
Files
Give files and folders by their full path. A path can start %userprofile%, for your own user folder, so the same automation works for colleagues.
| Command | Parameters | What it does |
|---|---|---|
| Add Document | Starts a new document and selects it, as the New Document button does. | |
| Open Document | 1: a Spanner document or PSA 2: for a PSA, Convert, or blank | Opens it and selects it. Convert adds your default classifications, measures and data format, and keeps the retailer's codes as Retailer ID and Retailer UPC. |
| Open PLNX | 1: a Spaceman .plnx file | Opens it as a new document. |
| Save Document | 1: blank for its own file, or a full path to save as | Saves the selected document. |
| Save Image | 1: the .png file 2: High and, on the 3D View, Shading, separated by a space | Saves a picture of the selected planogram from the tab showing, with a clear background. |
| Export PPT, Export PDF | 1: an export template's name, then optionally | and planogram names 2: the file to write | Exports, as File › Export PPT does. With no names, every planogram. |
| Export PSAs | 1: a folder | Writes each planogram to its own .psa file, named after it. |
| Import Fixture | 1: a Spanner document | Adds the bays, fittings and point of sale of its first planogram, without products, as a new planogram. |
| Import Planograms | 1: a Spanner document 2: planogram names | Copies those planograms, with their products, into the selected document. |
Libraries and settings
| Command | Parameters | What it does |
|---|---|---|
| Product Library | 1: a product library interface's name 2: ImportAll, ImportMatched, ExportAll, ExportMatched, ExportNew, ExportModified, ExportFillGaps (2.5.1.1), or ExportFiltered (2.5.1.0), which can be followed by :Classification=Value1,Value2 | Does what the buttons in the product library window do. Using a Product Library explains each. |
| Product Library Get All | 1: the interface's name 2: a filter, optional: Column=Value1,Value2;Column2=Value3 | Brings every product in the library into the document, or only those that pass the filter. The filter uses the library's own column names. |
| Load Settings | 1: a settings file 2: Add, or blank to replace | Adds the file's settings to yours, or replaces yours with them. Settings can't be undone. |
| Get MCP Sidecar Path | Shows, and copies, where Spanner's connector for AI apps is, for setting one up. See Using Spanner with AI apps. |
Loops and conditions
A saved automation can repeat commands, or skip them, with these. They work only in an automation run from the menu, so Enter Automation Command doesn't list them. Most automations never need them: a straight list is easier to follow and to mend.
| Command | Parameters | What it does |
|---|---|---|
| Skip | 1: Start, End, Last, a number (1 is the next command, -2 two back), or the name of a command in the automation | Carries on from there. With a name, from the first command of that name. |
| Int | 1: a variable's number, from 0 2: a whole number; +n or -n to add or take away; ++ or --; or Planograms Count, Bays Count, Fittings Count or Points of Sale Count | Sets a counter. The counts are the document's planograms, or the selected planogram's bays, fittings or point of sale. Before 2.5.1.2, +n and -n set the counter to n. |
| Equals, Not Equals, Less Than, More Than | 1 and 2: the numbers of two variables | Compares them, for the If or If Not that follows. To compare with a fixed number, put it in a variable first. |
| If, If Not | 1: Skip 2: the name of a command in the automation | Goes to the first command of that name when the last comparison was true (If) or false (If Not), and otherwise carries on. |
For example, to add four bays from the first preset:
| Action | Parameter 1 | Parameter 2 |
|---|---|---|
| Int | 0 | 0 |
| Int | 1 | 4 |
| Add Bay | ||
| Int | 0 | ++ |
| Less Than | 0 | 1 |
| If | Skip | Add Bay |
- Set every variable at the start. Variables keep their values from one automation to the next.
- A command can't take a variable as its value, so loops suit commands that add something or act on what is selected.
- A loop that never ends stops after 10,000 steps, with a message.
Where else commands run
- Sales data interfaces. In an interface's custom commands, pre: or post: in front of a command's name runs it before or after the import, with the custom command's two values as its parameters: post:Calculate works the calculated measures out again after each import.
- Preset planograms are saved as commands. Part 4 covers them, and turning a planogram into commands.
- Common Custom Commands runs a command per button. See Part 2.
- Spanner AI uses these commands for many of the changes you ask for. See Part 5.