====== 2. Location controller - Handle location suggestions ====== The location suggestion can be enabled and configured on the [[implementation:wms:locationcontr|location controller]]. When a location needs to be suggested, the list will only show locations that fit the requirements. ===== 2.1 Use location suggestions? ===== The location suggestion can be disabled for a warehouse. If the destination [[implementation:wms:warehousesettings|warehouse]] has the setting //'UseLocationSuggestions'// disabled, no location will be suggested from the warehouse and all valid locations can be selected when the stock is being moved. ===== 2.2 Suggest locations ===== If both settings are enabled, the following logic will be performed: {{map> :implementation:functionalguide:locationsuggestion:location_chart.png |}} * [[implementation:wms:locationsuggestions_locationcontrollerHandlelocationsuggestions#location_controller_-_handle_location_suggestions|Location controller @92.5,1,25,37,92.5,73,160,37]] * [[implementation:wms:locationsuggestions_locationcontrollerHandlelocationsuggestions#use_location_suggestions|Use location suggesions @92.5,97,25,133.5,92.5,170,160,133.5]] * [[implementation:wms:locationsuggestions_locationcontrollerHandlelocationsuggestions#get_empty_fixed_pick_location|Get empty location @2,176,198,765]] * [[implementation:wms:locationsuggestions_locationcontrollerHandlelocationsuggestions#get_base_locations|Get base locations @237,273,633,518]] * [[implementation:wms:locationsuggestions_locationcontrollerHandlelocationsuggestions#get_put_away_zones|Get put away zones @253,527,633,633]] * [[implementation:wms:locationsuggestions_locationcontrollerHandlelocationsuggestions#get_location_suggestions|Get location suggestions @274,647,715,770]] * [[implementation:wms:locationsuggestions_locationcontrollerHandlelocationsuggestions#list_location_suggestions|List location suggestions @760,470,897,770]] {{//**Example**// \\ In the example we move the item //‘Item A’//. The item has no default storage location. The destination warehouse has the following locations: ^ Location Code ^P1.1.^P1.2.^A1.1.^A1.2.^A1.3.^A2.1.^A2.2.^A2.3.| ^ Fixed? (ITEM A)|Y|N|N|N|N|N|N|N| ^ Can be replenished? (ITEM A)|N|N|N|N|N|N|N|N| ^ Put away zone (linked) |Z1, Z2|-|-|-|-|-|-|-| ^ Put away zone (belongs to) |-|-|Z1|Z1|Z1|Z2|Z2|Z2| First the system identifies the base locations. In our example there is one base location: * **P1.1.**, because it is fixed for Item A. Next the system finds the put away zones. In our example there are two put away zones: * **Z1**, because it is linked to P1.1. * **Z2**, because it is linked to P1.1. Finally the system will get the list of locations that belong to the identified put away zones. In the example the following locations belong to a zone: ^ Location Code ^A1.1.^A1.2.^A1.3.^A2.1.^A2.2.^A2.3.| ^ Put away zone (belongs to) |Z1|Z1|Z2|Z2|Z2|Z2| ^ Pick sequence(belongs to) |1|2|3|1|2|3| **Scenario 1** \\ Base location P1.1. has linked put away zones with the following configuration: ^ Put away zone^Z1^Z2| ^ Sort Pick Sequence Descending|N|N| ^ Sequence |1|2| When the system will get storage locations, it will use this order:\\ **A1.1, A1.2, A1.3, A2.1, A2.2, A2.3** **Scenario 2** \\ Base location P1.1. has linked put away zones with the following configuration: ^ Put away zone^Z1^Z2| ^ Sort Pick Sequence Descending|N|Y| ^ Sequence |1|2| When the system will get storage locations, it will use this order:\\ **A1.1, A1.2, A1.3, A2.3, A2.2, A2.1** ==== Get location suggestions ==== When there are put away zone(s) linked to the base location(s), only locations that belong to the put away zone(s) can be suggested. When the base location(s) have no linked put away zones, all locations can be suggested. When there are no base location(s), all locations can be suggested. ==== List location suggestions ==== After the locations that can be suggested are queried, the system filters and sorts the list in order to list location suggestions. === Filtering === * A location is not allowed if the item cannot be stored on the location based on the [[implementation:wms:zonetypes|zone type]]. * A location is not allowed if the item cannot be stored on the location based on the fixed items of the location. * A location is not allowed if the maximum number of logistic units will be exceeded. * A location is not allowed if the //‘Block move when location is not empty’// option is enabled for the location and the location is not empty. * A location is not allowed if the [[implementation:wms:islt|Item Storage Location type]] of the location is not the same as the Item Storage Location Type of the item. If there are multiple items to move that have different location types, every location with one of the Item Storage Location Types linked to the item are allowed. * Only bulk locations are allowed if the //‘Allow to suggest pick locations during moves/put away’// option is not enabled on the Location Controller * A location is not allowed if the //‘Block move when location is not empty’// option is enabled for the location and the location is not empty. * If pick locations are allowed, but the //‘Can be put on a pick location’// option is disabled for the quality status of the stock to be moved, then no pick locations can be suggested Please note: The quality status allowed on the [[implementation:wms:binsettings|location]] is not taken into account during the filtering of the locations. === Sorting === After the list of locations is filtered, the system sorts the remaining locations. The found locations will be sorted by the //Order by// clause defined on the [[implementation:wms:locationcontr|location controller]]. However there are a few additional rules: * When enabled, an empty fixed pick location will be suggested first (See //Get fixed pick location// section). * Next the suggested locations are added * In case a flow first builds a list of moves, before adding them to the database, a list of already selected locations is kept in memory. When the suggested location is a location that has already been selected, it will be added to the suggested locations after the 'normal' suggested location. This is to avoid always showing the same location as the first suggested location. * If a suggested location is actually the source location to move from, it will be added to the bottom of the list. When the //’Force to use first suggested location during moves/put away’// option is enabled on the [[implementation:wms:locationcontr|location controller]], the user has to select a [[implementation:wms:reasons|reason]] in order to proceed if the scanned/selected location is not the first suggested location or an empty location. Every reason with the flag //'Use for standard flow deviation'// can be selected. The selected reason and the first suggested location is stored in the PMX_MVLI table.