Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
OmnichannelInventoryService Class
Namespace
OmnichannelInventoryService Methods
createReservation(createReservationInputRepresentation)
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.OCICreateReservationOutputRepresentation createReservation(ConnectApi.OCICreateReservationInputRepresentation createReservationInputRepresentation)
Parameters
- createReservationInputRepresentation
- Type: ConnectApi.OCICreateReservationInputRepresentation
- Data to reserve inventory at one or more Omnichannel Inventory locations or location groups.
Return Value
fulfillReservation(fulfillReservationInputRepresentation)
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.OCIFulfillReservationOutputRepresentation fulfillReservation(ConnectApi.OCIFulfillReservationInputRepresentation fulfillReservationInputRepresentation)
Parameters
- fulfillReservationInputRepresentation
- Type: ConnectApi.OCIFulfillReservationInputRepresentation
- Wraps a list of inventory reservations to fulfill.
Return Value
getInventoryAvailability(inventoryAvailabilityInputRepresentation)
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation getInventoryAvailability(ConnectApi.OCIGetInventoryAvailabilityInputRepresentation inventoryAvailabilityInputRepresentation)
Parameters
- inventoryAvailabilityInputRepresentation
- Type: ConnectApi.OCIGetInventoryAvailabilityInputRepresentation
- Details of a request to retrieve inventory availability.
Return Value
Type: ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation
getInventoryAvailabilityUploadStatus(uploadId)
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation getInventoryAvailabilityUploadStatus(String uploadId)
Parameters
- uploadId
- Type: String
- The upload ID of the upload job.
Return Value
Type: ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation
getPublishLocationStructureStatus(uploadId)
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation getPublishLocationStructureStatus(String uploadId)
Parameters
- uploadId
- Type: String
- The upload ID of the publish job.
Return Value
Type: ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation
publishLocationStructure()
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.OCIPublishLocationStructureOutputRepresentation publishLocationStructure()
Return Value
Type: ConnectApi.OCIPublishLocationStructureOutputRepresentation
releaseReservation(releaseReservationInputRepresentation)
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.OCIReleaseReservationOutputRepresentation releaseReservation(ConnectApi.OCIReleaseReservationInputRepresentation releaseReservationInputRepresentation)
Parameters
- releaseReservationInputRepresentation
- Type: ConnectApi.OCIReleaseReservationInputRepresentation
- Details of one or more inventory reservations to release.
Return Value
submitInventoryAvailabilityUpload(fileUpload)
API Version
51.0 (NDJSON), 63.0 (CSV)
Requires Chatter
No
Signature
public static ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation submitInventoryAvailabilityUpload(ConnectApi.BinaryInput fileUpload)
Parameters
- fileUpload
- Type: ConnectApi.BinaryInput
- NDJSON or CSV file containing inventory availability data.
Return Value
Type: ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation
Usage
To create an inventory data file, format the data as a series of NDJSON or CSV entries that represent locations and individual inventory records.
Inventory Import Data Considerations:
- Separate the top-level entries with line feeds, not commas. Each entry must be on a single line.
- When the system reads a location entry, it assigns the subsequent inventory entries to that location until it reads another location entry.
- Legacy NDJSON requires that you specify a header record for each location entry ({"location":"wickenburg","mode":"UPDATE"}). The header isn’t required for a high-performance NDJSON layout or CSV file.
- Each inventory record entry requires a unique recordId. Best practice is to use a UUID. The recordId protects against importing duplicate data. The recordId is provided in NDJSON and automatically generated for CSV.
- Each inventory record entry requires an effectiveDate.
- If provided, each futures entry requires a nonzero quantity and a future expectedDate.
This example illustrates the data format:
1{
2 "location":"Warehouse-A", // location identifier
3 "mode":"UPDATE" // must be UPDATE (other operations might be available in future releases)
4}
5{
6 "recordId":"0a87539d-f3dd-47bc-91c7-9c752e39dbe0", // unique identifier for the inventory record
7 "onHand":10,
8 "sku":"12389156",
9 "effectiveDate":"2020-12-08T14:05:22.790896-07:00",
10 "futures":[ // list of future restocks
11 {
12 "quantity":1,
13 "expectedDate":"2021-04-18T14:05:22.781-07:00"
14 },
15 {
16 "quantity":5,
17 "expectedDate":"2021-05-18T14:05:22.781-07:00"
18 }
19 ],
20 "safetyStockCount":0
21}
22{
23 "recordId":"0a87539d-f3dd-47bc-91c7-9c752e312345",
24 "onHand":10,
25 "sku":"9485728",
26 "effectiveDate":"2020-12-08T14:05:22.790896-07:00",
27 "futures":[
28 {
29 "quantity":10,
30 "expectedDate":"2021-04-18T14:05:22.781-07:00"
31 }
32 ],
33 "safetyStockCount":0
34}
35{"location":"Warehouse-B","mode":"UPDATE"}
36{"recordId":"0a87539d-f3dd-47bc-91c7-9c75abc123de","onHand":10,"sku":"12389156","effectiveDate":"2020-12-08T14:05:22.790896-07:00","futures":[{"quantity":1,"expectedDate":"2021-04-18T14:05:22.781-07:00"}],"safetyStockCount":0}
37{"recordId":"0a87539d-f3dd-47bc-91c7-9c75abc98765","onHand":10,"sku":"93867201","effectiveDate":"2020-12-08T14:05:22.790896-07:00","futures":[{"quantity":5,"expectedDate":"2021-04-18T14:05:22.781-07:00"}],"safetyStockCount":0}transferReservation(transferReservationInputRepresentation)
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.OCITransferReservationOutputRepresentation transferReservation(ConnectApi.OCITransferReservationInputRepresentation transferReservationInputRepresentation)
Parameters
- transferReservationInputRepresentation
- Type: ConnectApi.OCITransferReservationInputRepresentation
- Wraps a list of inventory reservation transfers and specifies whether a single failure cancels the entire list.
Return Value
updateReservation(updateReservationInputRepresentation)
API Version
61.0
Requires Chatter
No
Signature
public static ConnectApi.OCIUpdateReservationOutputRepresentation updateReservation(ConnectApi.OCIUpdateReservationInputRepresentation updateReservationInputRepresentation)
Parameters
- updateReservationInputRepresentation
- Type: ConnectApi.OCIUpdateReservationInputRepresentation
- Data to update one or more Omnichannel Inventory item reservations.