Common Tickets

Racking Plan

What is Racking Plan?

  • Racking Plan is to create new stock location based on layout definitions. In order to create new stock location, we write a Racking Plan script, and then we have to run that script to add a new stock location.

How to create Racking Plan

Pre-Requisite

  • Region (NL, FR, BE) must be provided in the racking plan Jira ticket.
  • SiteID must be mentioned in the Jira ticket.
  • NameOfShop must be given in the Jira ticket.

Steps to create Racking Plan

  • Clone Repository - https://github.com/Toolstation/offline-reports
  • Copy the batch-location-tools/_old/locations.gb.00-TEMPLATE.html and rename as locations.{regionCode}.{siteID}-{NameOfShop}.html You have to update code inside locations.{regionCode}.{siteID}-{NameOfShop}.html file using the image pdf file provided in the ticket which will be similar to file shown below.
    1. First for all you have to provide the siteID in this code line - $depot = strtoupper('');
      For example: $depot = strtoupper('FD');
    2. Then you can add locations using the provided racking plan image and write code for adding location as given below:

      For example:
      $i++; $name = $i.'';
      $depots[$name] = [$depot];
      $areas[$name] = ['A'];
      $zones[$name] = ['0'];
      $bays[$name] = array(1, 3);
      $levels[$name] = range(1, 2);
      $positions[$name] = range(1, 4);

      • Refer below pdf file
      VariablesHow to set
      $depots[$name][$depot] - will be set as Site Id
      $areas[$name]['A'] - As shown in the pdf below 2 green boxes for area 'A' namely A0-01 and A0-03
      $zones[$name]['0'] - will be always set as 0 as given A0 in names A0-01 and A0-03
      $bays[$name]array(1, 3) - Bay's can be figure out as 01 from A0-01 and 03 from A0-03. In case there multiple bays we can also use range() instead of array().
      $levels[$name]range(1, 2) - Refer Racking Profiles section in pdf file. Since, we considered area A which is in green color, we will figure out levels from Green 4x2 structure. Here level is 2 because there are 2 vertical boxes, so we've set level range(1, 2)
      $positions[$name]range(1, 4) - Here we've set range (1, 4) because in Green 4x2 structure, there are 4 horizontally separated structure. So, for levels we have to check vertical sections and for position we have to check horizontal sections
    3. You can also activate and deactivate locations using $override variable as given in the example given below -

      For example:
      $i++; $name = $i.'';
      $overrideAreas[$name] = array('S');
      $overrideZones[$name] = array('0');
      $overrideBays[$name] = array(47);
      $overrideLevels[$name] = range(1, 9);
      $overridePositions[$name] = range(1, 3);
      $overrideSettings[$name] = array('closed' => 0, 'pickable' => 1);
    VariablesHow to set
    $overrideAreas[$name]array('S') - Provide area
    $overrideZones[$name]array('0') - Provide zone
    $overrideBays[$name]array(47) - Provide bay or you can even pass multiple bays in array
    $overrideLevels[$name]range(1, 9) - Provide level
    $overridePositions[$name]range(1, 3) - Provide posistion
    $overrideSettings[$name]array('closed' => 0, 'pickable' => 1) - set closed to 0 and pickable to 1 if you want to activate the location or vice versa to deactivate location (set closed to 1 and pickable to 0)
    1. Please refer the PR created for the below racking plan image pdf
    2. Also, refer to the Jira ticket link

Mail format After racking plan deploy on pre prod

Subject :- Racking Plan Prismalaan/PY

Please can you authorise Owtanet to upload the attached script to the NL extranet to add the Prismalaan (Change to warehouse name) locations.

Once uploaded, this can be run at:   
https://extranet.toolstation.nl/_dev/bulk_locations/locations.nl.PY-Prismalaan.html (Change to Warehouse link)

This has been reviewed and the review can be seen at:   
https://github.com/Toolstation/offline-reports/pull/259 (Review)

The commit point for the code can be found at:   
https://github.com/Toolstation/offline-reports/pull/259/commits/2e49854aea03a749e273cf215c9b4c1d9f455d4d (Merge commit)

Jira:
https://toolstation-support.atlassian.net/browse/KOET-2557 (Ticket)

Regards,   
Vineet kumar (Your name)

Copyright © 2026