Skip to content

Conversation

@anvasiliev
Copy link

@anvasiliev anvasiliev commented Nov 30, 2020

Description (*)

By default magento2 have 2 algorithms to determines the best match for sources: source priority in stock and distance priority algorithms.

Default for country SSA define which source more priors for selected country and as additional check other algorithms executed to determine best match (additional algorithm can be configured in Stores→ Configuration→ Catalog→ Inventory → Default For Country SSA → "Additional Algorithm" field).

Example,

Sources:
DE-1 (Munich),
DE-2 (Frankfurt),
FR-1 (Paris),
FR-2 (Nice),
GB-1 (London),
GB-2 (Liverpool)

Stocks:
eu-stock-1 with DE-1, DE-2, FR-1, FR-2, GB-1, GB-2 sources with priority order setting as given above.

Shipping address: BE (Brussels)

Priority SSA will give next result:
DE-1 (Munich),
DE-2 (Frankfurt),
FR-1 (Paris),
FR-2 (Nice),
GB-1 (London),
GB-2 (Liverpool)

Distance SSA will give next result (it's around as example):
DE-2 (Frankfurt),
GB-1 (London),
FR-1 (Paris),
GB-2 (Liverpool),
DE-1 (Munich),
FR-2 (Nice)

As example, because of some tax laws shipping from London should be less priors then even shipping from DE-2 or FR-2 for merchant and in this case default for country SSA will be helpfull.
Using "Default for country SSA" merchant can define

Stores→ Configuration→ Catalog→ Inventory → Default For Country SSA → "Exclude Unmatched Sources From List" setting allow to show/use only sources assignment for given country if set to "Yes". Example, if requested source selection for country BE and store have 6 sources but only for 2 of them BE assignment, this 2 sources will be available in list and 4 other will be not in the list at all.

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@anvasiliev
Copy link
Author

@magento run all tests

@anvasiliev
Copy link
Author

@magento run all tests

@anvasiliev
Copy link
Author

@magento run all tests

2 similar comments
@anvasiliev
Copy link
Author

@magento run all tests

@anvasiliev
Copy link
Author

@magento run all tests

…country-ssa

# Conflicts:
#	_metapackage/composer.json
@anvasiliev
Copy link
Author

@magento run all tests

@anvasiliev anvasiliev changed the title Default for country SSA [WIP] Default for country SSA Feb 21, 2021
@sidolov sidolov changed the base branch from 1.2-develop to develop November 11, 2021 17:48
@engcom-Hotel engcom-Hotel moved this to Ready for Review in Inventory - Pull Request Progress Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready for Review

Development

Successfully merging this pull request may close these issues.

3 participants