Click or drag to resize

IUCJsonOneListCalculate Method

Calculates OneList Basket Object and returns Order Object

Namespace:  LSOmni.Service
Assembly:  LSOmni.Service (in LSOmni.Service.dll) Version: Commerce Service for LS Central 2024.6
Syntax
C#
Order OneListCalculate(
	OneList oneList
)

Parameters

oneList
Type: LSRetail.Omni.Domain.DataModel.Loyalty.BasketsOneList
OneList Object

Return Value

Type: Order
Order Object that can be used to Create Order
Remarks
LS Central WS2 : EcomCalculateBasket

This function can be used to send in Basket and convert it to Order.

Basic Order data is then set for finalize it by setting the Order setting, Contact Info, Payment and then it can be posted for Creation

NOTE: Image Ids are added if not provided with the item or returned from Central, this will result in extra calls, so to speed up things, provide Image object with Image Id only (not including blob)

Examples
Sample requests including minimum data needed to be able to process the request in LS Commerce

Basket with 2 of same Items

REST Sample Request
{
    "oneList": {
        "CardId": "10021",
        "Items": [{
            "Image": {
                "Id": "40020"
            },
            "ItemDescription": "Skirt Linda Professional Wear",
            "ItemId": "40020",
            "Quantity": 2,
            "VariantDescription": "YELLOW/38",
            "VariantId": "002"
        }],
        "ListType": 0,
        "StoreId": "S0001"
    },
    "calculate": true
}
Basket with 2 of same Items and with XMAS Coupon that gives discount
REST Sample Request
{
    "oneList": {
        "CardId": "10021",
        "Items": [{
            "Image": {
                "Id": "40020"
            },
            "ItemDescription": "Skirt Linda Professional Wear",
            "ItemId": "40020",
            "Quantity": 2,
            "VariantDescription": "YELLOW/38",
            "VariantId": "002"
        }],
        "PublishedOffers": [{
            "Id": "XMAS",
            "Type": "9",
        }],
        "ListType": 0,
        "StoreId": "S0001"
    },
    "calculate": true
}
See Also