Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 3b039f6

Browse files
irajneeshguptameker12keharper
authored
update inventory-cli-reference.md incorrect info (#8023)
* update inventory-cli-reference.md incorrect info since the cli command inventory:reservation:create-compensations yet not accepting the -c & -i argument , I rectified few points here for incorrect message string and the arguments. * Format error message as terminal text * Remove trailing space * Remove duplicated content and fix syntax errors * Added examples and missing option - Added the `bunchsize` option to the inventory:reservation:list-inconsistencies command. - Added " Detect inconsistencies and create compensations" section with examples to run piped commands for incomplete and complete orders. * Apply suggestions from code review Co-authored-by: Kevin Harper <keharper@users.noreply.github.com> * Updates based on review feedback Co-authored-by: Margaret Eker <meker@adobe.com> Co-authored-by: Kevin Harper <keharper@users.noreply.github.com>
1 parent 19b7d26 commit 3b039f6

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

src/guides/v2.3/inventory/inventory-cli-reference.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Command options:
5353

5454
- `-c`, `--complete-orders` - Returns inconsistencies for completed orders. Incorrect reservations may still be on hold for completed orders.
5555
- `-i`, `--incomplete-orders` - Returns inconsistencies for incomplete orders (partially shipped, unshipped). Incorrect reservations may hold too much or not enough salable quantity for the orders.
56+
- `-b`, `--bunch-size` - Defines how many orders to load at once.
5657
- `-r`, `--raw` - Raw output.
5758

5859
Responses using `-r` return in `<ORDER_INCREMENT_ID>:<SKU>:<QUANTITY>:<STOCK-ID>` format:
@@ -90,14 +91,15 @@ To create reservations, provide compensations using the format `<ORDER_INCREMENT
9091
bin/magento inventory:reservation:create-compensations
9192
```
9293

93-
Command options:
94+
Command option:
9495

95-
- `-c`, `--complete-orders` - Creates reservations for completed order inconsistencies.
96-
- `-i`, `--incomplete-orders` - Creates reservations for incomplete order inconsistencies.
9796
- `-r`, `--raw` - Returns raw output.
98-
- `-d`, `--dry-run` - Simulates reservation creation without applying reservations.
9997

100-
If the format of the request is incorrect, the following message displays: A list of compensations needs to be defined as argument or STDIN.
98+
If the format of the request is incorrect, the following message displays:
99+
100+
```terminal
101+
Error while parsing argument "your_incorrect_format_argument". Given argument does not match pattern "/(?P<increment_id>.*):(?P<sku>.*):(?P<quantity>.*):(?P<stock_id>.*)/".
102+
```
101103

102104
As the command creates reservations, it displays messages indicating the updates by SKU, order, and stock.
103105

@@ -108,30 +110,46 @@ Following reservations were created:
108110
- Product bike-123 was compensated by +2.000000 for stock 1
109111
```
110112

111-
You can run both commands by piping `list-inconsistencies` and `create-compensations` to detect inconsistencies and immediately create compensations. Use the `-r` command option to generate and submit the raw data to `create-compensations`.
113+
### Detect inconsistencies and create compensations
114+
115+
You can detect inconsistences and immediately create compensations by using a pipe to run both the `list-inconsistencies` and `create-compensations`. Use the `-r` command option to generate and submit the raw data to `create-compensations`.
112116

113117
```bash
114118
bin/magento inventory:reservation:list-inconsistencies -r | bin/magento inventory:reservation:create-compensations
115119
```
116120

117121
Example response:
118122

119-
```terminal
123+
```bash
120124
bin/magento inventory:reservation:list-inconsistencies -r | bin/magento inventory:reservation:create-compensations
125+
```
121126

127+
```terminal
122128
Following reservations were created:
123129
- Product bike-123 was compensated by +2.000000 for stock 1
124130
- Product bikehat-456 was compensated by +1.000000 for stock 1
125131
```
126132

127133
After updates complete, run the list command to verify:
128134

129-
```terminal
135+
```bash
130136
bin/magento inventory:reservation:list-inconsistencies -r
137+
```
131138

139+
```terminal
132140
No order inconsistencies were found.
133141
```
134142

143+
You can also pipe the commands to detect inconsistencies and create compensations for only incomplete (`-i`) or complete (`-c`) orders.
144+
145+
```bash
146+
bin/magento inventory:reservation:list-inconsistencies -r -i | bin/magento inventory:reservation:create-compensations
147+
```
148+
149+
```bash
150+
bin/magento inventory:reservation:list-inconsistencies -r -c | bin/magento inventory:reservation:create-compensations
151+
```
152+
135153
## Import geocodes
136154

137155
{{site.data.var.im}} provides the [Distance Priority](https://docs.magento.com/m2/ce/user_guide/catalog/inventory-configure-distance-priority.html) algorithm, which helps determine the best option for shipping a full or partial order. The algorithm uses GPS information or geocodes to calculate the distance between the source (a warehouse or other physical location) of each item in an order and the shipping address. Based on those results, the algorithm recommends which source should be used to ship out each item in the order.

0 commit comments

Comments
 (0)