Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Further reading
Microsoft Dynamics AX 2012 for Developers [AX 2012] Inventory and warehouse management [AX 2012]
Tutorial
AX Retail provides the availability service as part of the Commerce Runtime (CRT).
Replicate to CRT
1. Open Retail/Periodic/Calculate inventory. Click OK. 2. Open Retail/Periodic/Distribution schedule. 3. Select A-1130_OC, click Run directly, click Yes.
4. Open Microsoft SQL Server Management Studio. 5. Connect to Store Connect Message DB server. Run the following query, and verify the job (JobId = A-1130_OC) is completed successfully (Status = 1)
select * from AxRetailMsg.dbo.OutgoingMessages order by PackageNo desc
6. Connect to CRT DB server. Run the following query, and verify the availability data.
Consume availability
The availability service is exposed at three layers in CRT: Service, Workflow and Client APIs. The core functionalities of the availability service are exposed in service APIs.
Warehouse preferences
The CRT checkout process uses the notion of a preferred warehouse when creating a sales order in AX, since a corresponding sales warehouse needs to be specified for each line item. The preferred warehouse is also used for other purposes such as determining the item origin when computing shipping charges. The warehouse preferences are computed in a manner that is consistent with how a warehouse is determined, when creating a sales order directly. Default sales warehouse for the customer, product and channel are all taken into account by the service when deciding which one to use as the preferred warehouse.
are included. This method should be used when other methods cannot satisfy your need. You should use pagination to minimize the perf impact.
Reserve/Release items
The available quantities are automatically deducted when a sales order is created in CRT. This will help ensure the availability number is up to date and reduce the cases of overbooking. If you want more certainty on avoiding overbooking, you should consider to use the reserve/release items APIs. These methods will not reserve the items in AX, but it will reduce the availability number in CRT immediately without submitting the sales orders. For example, if you are selling some high price, limited quantity, hot items, you may choose to create your own workflow where you call reserve items after all other validations but right before you call authorize payments. That way, the customer does not end up in the situation where the payment is authorized (and may take time to cancel/expire) but the item is unavailable.
Notifications
The availability service may generate the following notifications. The default notification handlers just ignore the notifications and continue. You can replace them with your own handlers if you want.
EmptyInventoryUnitOfMeasureNotification Indicates that no inventory unit of measure for the given item were found.
You may provide your own custom handler, e.g., to block checkout if back order is not allowed, or the item is discontinued.
InventoryNotFoundNotification Indicates that no inventory for the given sales line were found.
You may provide your own custom handler, e.g., to block checkout if pre-order is not allowed.
UnableToConvertUnitOfMeasureNotification Indicates that unable to convert quantity between unit of measures for an item.
This is possibly a database connectivity issue. You may provide your own custom handler, e.g., to warn you if this occurs persistently or too frequent.