Click or drag to resize

IUCServiceOneListSave Method

Save Basket or Wish List

Namespace:  LSOmni.Service
Assembly:  LSOmni.Service (in LSOmni.Service.dll) Version: Commerce Service for LS Central 2024.6
Syntax
C#
OneList OneListSave(
	OneList oneList,
	bool calculate
)

Parameters

oneList
Type: LSRetail.Omni.Domain.DataModel.Loyalty.BasketsOneList
List Id
calculate
Type: SystemBoolean
Perform Calculation on a Basket and save result with Basket

Return Value

Type: OneList
Remarks
OneList can be saved, for both Member Contact and Anonymous Users. Member Contact can have one or more Member Cards and each Card can have one WishList and one Basket For Anonymous User, keep CardId empty and OneListSave will return OneList Id back that should be store with the session for the Anonymous user, as Commerce Service for LS Central does not store any information for Anonymous Users.

Used OneListGetById to get the OneList back.

NOTE: If no Name is provided with OneList, system will look up contact to pull the name, this can slow the process.

Examples
This Sample request can be used in SOAP UI application to send request to LS Commerce.

Include minimum data needed to be able to process the request

SOAP Sample Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://lsretail.com/LSOmniService/EComm/2017/Service" xmlns:ns="http://lsretail.com/LSOmniService/Base/2017" xmlns:ns1="http://lsretail.com/LSOmniService/Loy/2017">
 <soapenv:Header/>
  <soapenv:Body>
     <ser:OneListSave>
        <ser:oneList>
           <!--Empty for anonymous basket:-->
           <ns1:CardId>10021</ns1:CardId>
           <ns1:Items>
              <ns1:OneListItem>
                 <ns1:Image>
                    <ns:Id>40020</ns:Id>
                 </ns1:Image>
                 <ns1:ItemDescription>Skirt Linda Professional Wear</ns1:ItemDescription>
                 <ns1:ItemId>40020</ns1:ItemId>
                 <ns1:Quantity>2</ns1:Quantity>
                 <ns1:VariantDescription>YELLOW/38</ns1:VariantDescription>
                 <ns1:VariantId>002</ns1:VariantId>
              </ns1:OneListItem>
           </ns1:Items>
           <ns1:ListType>Basket</ns1:ListType>
           <ns1:Name>Tom Tomsson</ns1:Name>
           <ns1:StoreId>S0001</ns1:StoreId>
        </ser:oneList>
        <ser:calculate>true</ser:calculate>
     </ser:OneListSave>
  </soapenv:Body>
</soapenv:Envelope>
See Also