Click or drag to resize

IeCommerceServiceOneListSave Method

Save Basket or Wish List

Namespace:  LSOmni.Service
Assembly:  LSOmni.Service (in LSOmni.Service.dll) Version: LS Omni 3.7.0
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 Registered Users and Anonymous Users. For Anonymous User, keep CardId and ContactId empty, and OneListSave will return OneList Id back that should be store with the session for the Anonymous user, as Omni does not store any information for Anonymous Users.

Used OneListGetById to get the OneList back.

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

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>
            <!--Not needed for anonymous basket:-->
            <ns1:CardId>10021</ns1:CardId>
            <ns1:Items>
               <!--Zero or more repetitions:-->
               <ns1:OneListItem>
                  <ns1:Item>
                     <ns:Id>40020</ns:Id>
                  </ns1:Item>
                  <ns1:Quantity>2</ns1:Quantity>
                  <!--Optional:-->
                  <ns1:VariantReg>
                      <ns:Id>002</ns:Id>
                  </ns1:VariantReg>
               </ns1:OneListItem>
            </ns1:Items>
            <ns1:ListType>Basket</ns1:ListType>
            <ns1:StoreId>S0001</ns1:StoreId>
         </ser:oneList>
         <ser:calculate>true</ser:calculate>
      </ser:OneListSave>
   </soapenv:Body>
</soapenv:Envelope>
Response Data from OMNI after Request has been sent
SOAP Response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <OneListSaveResponse xmlns = "http://lsretail.com/LSOmniService/EComm/2017/Service" >
         < OneListSaveResult xmlns:a="http://lsretail.com/LSOmniService/Loy/2017" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <Id xmlns = "http://lsretail.com/LSOmniService/Base/2017">16c57444-49c8-424a-b7bd-5be4adb5608f</Id>
            <a:CardId>10021</a:CardId>
            <a:ContactId>MO000008</a:ContactId>
            <a:CreateDate>2018-11-20T12:46:42.79</a:CreateDate>
            <a:CustomerId/>
            <a:Description>List MO000008</a:Description>
            <a:IsDefaultList>true</a:IsDefaultList>
            <a:Items>
               <a:OneListItem>
                  <Id xmlns = "http://lsretail.com/LSOmniService/Base/2017" > a7e973a9 - 3dad-4c93-9f10-08ba82b244b9</Id>
                  <a:Amount>80.00000000</a:Amount>
                  <a:BarcodeId/>
                  <a:CreateDate>2018-11-20T12:46:42.803</a:CreateDate>
                  <a:DiscountAmount>0.00000000</a:DiscountAmount>
                  <a:DiscountPercent>0.00000000</a:DiscountPercent>
                  <a:DisplayOrderId>1</a:DisplayOrderId>
                  <a:Item>
                     <Id xmlns = "http://lsretail.com/LSOmniService/Base/2017" > 40020 </ Id >
                     < a:AllowedToSell>true</a:AllowedToSell>
                     <a:Description>Skirt Linda Professional Wear</a:Description>
                     <a:Details>Skirt - Professional Wear from the Linda Line, Elegant skirt suitable for different occasions
                     This skirt is available in many sizes and colors. This is one of our most sold skirts. Come and try it, you will find out how well it suits you.</a:Details>
                     <a:Images xmlns:b= "http://lsretail.com/LSOmniService/Base/2017" >
                        < b:ImageView>
                           <b:Id>40020</b:Id>
                           <b:AvgColor/>
                           <b:DisplayOrder>0</b:DisplayOrder>
                           <b:Format/>
                           <b:Image/>
                           <b:ImgSize>
                              <b:Height>0</b:Height>
                              <b:Width>0</b:Width>
                           </b:ImgSize>
                           <b:LoadFromFile>false</b:LoadFromFile>
                           <b:Location>http://hq-lsotest-d01.lsretail.local/lsomniservice/ecommerceservice.svc/ImageStreamGetById?id=40020&amp;width={0}&amp;height={1}</b:Location>
                           <b:LocationType>Image</b:LocationType>
                           <b:ObjectId/>
                        </b:ImageView>
                     </a:Images>
                     <a:IsDeleted>false</a:IsDeleted>
                     <a:ItemAttributes/>
                     <a:Price/>
                     <a:Prices/>
                     <a:ProductGroupId>WOMEN-S</a:ProductGroupId>
                     <a:SalesUomId>PCS</a:SalesUomId>
                     <a:UnitOfMeasures xmlns:b= "http://lsretail.com/LSOmniService/Base/2017" />
                     < a:VariantsExt xmlns:b= "http://lsretail.com/LSOmniService/Base/2017" />
                     < a:VariantsRegistration xmlns:b= "http://lsretail.com/LSOmniService/Base/2017" />
                  </ a:Item>
                  <a:NetAmount>64.00000000</a:NetAmount>
                  <a:NetPrice>64.00000000</a:NetPrice>
                  <a:OnelistItemDiscounts/>
                  <a:Price>80.00000000</a:Price>
                  <a:Quantity>1.00000000</a:Quantity>
                  <a:TaxAmount>16.00000000</a:TaxAmount>
                  <a:UnitOfMeasure i:nil= "true" xmlns:b= "http://lsretail.com/LSOmniService/Base/2017" />
                  < a:VariantReg xmlns:b= "http://lsretail.com/LSOmniService/Base/2017" >
                     < b:Id>002</b:Id>
                     <b:Dimension1>YELLOW</b:Dimension1>
                     <b:Dimension2>38</b:Dimension2>
                     <b:Dimension3/>
                     <b:Dimension4/>
                     <b:Dimension5/>
                     <b:Dimension6/>
                     <b:FrameworkCode>WOMEN</b:FrameworkCode>
                     <b:Images>
                        <b:ImageView>
                           <b:Id>40020-Y</b:Id>
                           <b:AvgColor/>
                           <b:DisplayOrder>0</b:DisplayOrder>
                           <b:Format/>
                           <b:Image/>
                           <b:ImgSize>
                              <b:Height>0</b:Height>
                              <b:Width>0</b:Width>
                           </b:ImgSize>
                           <b:LoadFromFile>false</b:LoadFromFile>
                           <b:Location>http://hq-lsotest-d01.lsretail.local/lsomniservice/ecommerceservice.svc/ImageStreamGetById?id=40020-Y&amp;width={0}&amp;height={1}</b:Location>
                           <b:LocationType>Image</b:LocationType>
                           <b:ObjectId/>
                        </b:ImageView>
                     </b:Images>
                     <b:ItemId>40020</b:ItemId>
                  </a:VariantReg>
               </a:OneListItem>
            </a:Items>
            <a:ListType>Basket</a:ListType>
            <a:PublishedOffers/>
            <a:ShippingAmount>0.00000000</a:ShippingAmount>
            <a:StoreId>S0001</a:StoreId>
            <a:TotalAmount>80.00000000</a:TotalAmount>
            <a:TotalDiscAmount>0.00000000</a:TotalDiscAmount>
            <a:TotalNetAmount>64.00000000</a:TotalNetAmount>
            <a:TotalTaxAmount>16.00000000</a:TotalTaxAmount>
         </OneListSaveResult>
      </OneListSaveResponse>
   </s:Body>
</s:Envelope>
See Also