Click or drag to resize

IeCommerceServiceOneListCalculate Method

Same as BasketCalc except takes in OneList Basket Object and returns Order Object

Namespace:  LSOmni.Service
Assembly:  LSOmni.Service (in LSOmni.Service.dll) Version: LS Omni 3.7.0
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
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

Examples
Shows how Omni Object is mapped to LS Nav/Central WS Request
NAV WS Mapping
<Request_ID>ECOMM_CALCULATE_BASKET</Request_ID>
 <Request_Body>
   <MobileTransaction>
     <Id>oneList.Id</Id>
     <StoreId>oneList.StoreId</StoreId>
     <MemberContactNo>oneList.ContactId</MemberContactNo>
     <MemberCardNo>oneList.CardId</MemberCardNo>
   </MobileTransaction>
   <MobileTransactionLine>
     <Id>oneList.Id</Id>
     <LineNo>lineCount</LineNo>
     <LineType>0</LineType>
     <Number>oneList.Items.Item.Id</Number>
     <VariantCode>oneList.Items.VariantReg.Id</VariantCode>
     <UomId>oneList.Items.UnitOfMeasure.Id</UomId>
     <Quantity>oneList.Items.Quantity</Quantity>
   </MobileTransactionLine>
 </Request_Body>
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:OneListCalculate>
       <ser:oneList>
          <!--Not needed for anonymous basket:-->
          <ns1:CardId>10021</ns1:CardId>
          <!--Not needed for anonymous basket:-->
          <ns1:ContactId>MO000008</ns1:ContactId>
          <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>S0013</ns1:StoreId>
       </ser:oneList>
    </ser:OneListCalculate>
   </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>
      <OneListCalculateResponse xmlns = "http://lsretail.com/LSOmniService/EComm/2017/Service" >
         < OneListCalculateResult 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" >{6281701B-7C81-4FB6-9A17-C445DC522390}</Id>
            <a:AnonymousOrder>false</a:AnonymousOrder>
            <a:CardId>10021</a:CardId>
            <a:ClickAndCollectOrder>false</a:ClickAndCollectOrder>
            <a:CollectLocation i:nil="true"/>
            <a:ContactAddress xmlns:b="http://lsretail.com/LSOmniService/Base/2017">
               <b:Address1/>
               <b:Address2/>
               <b:CellPhoneNumber i:nil="true"/>
               <b:City/>
               <b:Country/>
               <b:HouseNo i:nil="true"/>
               <b:Id/>
               <b:PhoneNumber i:nil="true"/>
               <b:PostCode/>
               <b:StateProvinceRegion/>
               <b:Type>Residential</b:Type>
            </a:ContactAddress>
            <a:ContactId i:nil="true"/>
            <a:ContactName i:nil="true"/>
            <a:DayPhoneNumber i:nil="true"/>
            <a:DocumentId i:nil="true"/>
            <a:DocumentRegTime>0001-01-01T00:00:00</a:DocumentRegTime>
            <a:Email i:nil="true"/>
            <a:LineItemCount>0</a:LineItemCount>
            <a:MobileNumber i:nil="true"/>
            <a:OrderDiscountLines/>
            <a:OrderLines>
               <a:OrderLine>
                  <Id xmlns = "http://lsretail.com/LSOmniService/Base/2017" />
                  < a:Amount>160.00</a:Amount>
                  <a:DiscountAmount>0.00</a:DiscountAmount>
                  <a:DiscountPercent>0.00</a:DiscountPercent>
                  <a:ItemDescription>Skirt Linda Professional Wear</a:ItemDescription>
                  <a:ItemId>40020</a:ItemId>
                  <a:LineNumber>1</a:LineNumber>
                  <a:LineType>Item</a:LineType>
                  <a:NetAmount>128.00</a:NetAmount>
                  <a:NetPrice>64.00</a:NetPrice>
                  <a:OrderId/>
                  <a:Price>80.00</a:Price>
                  <a:Quantity>2.00</a:Quantity>
                  <a:QuantityOutstanding>0</a:QuantityOutstanding>
                  <a:QuantityToInvoice>2.00</a:QuantityToInvoice>
                  <a:QuantityToShip>0</a:QuantityToShip>
                  <a:TaxAmount>32.00</a:TaxAmount>
                  <a:UomId/>
                  <a:VariantDescription>YELLOW/38</a:VariantDescription>
                  <a:VariantId>002</a:VariantId>
               </a:OrderLine>
            </a:OrderLines>
            <a:OrderPayments/>
            <a:OrderStatus>Pending</a:OrderStatus>
            <a:PaymentStatus>PreApproved</a:PaymentStatus>
            <a:PhoneNumber i:nil= "true" />
            < a:PointAmount>1600.00</a:PointAmount>
            <a:PointBalance>53928.00</a:PointBalance>
            <a:PointCashAmountNeeded>0.00</a:PointCashAmountNeeded>
            <a:PointsRewarded>160.00</a:PointsRewarded>
            <a:PointsUsedInOrder>0.00</a:PointsUsedInOrder>
            <a:Posted>false</a:Posted>
            <a:ReceiptNo/>
            <a:ShipClickAndCollect>false</a:ShipClickAndCollect>
            <a:ShipToAddress xmlns:b= "http://lsretail.com/LSOmniService/Base/2017" >
               < b:Address1/>
               <b:Address2/>
               <b:CellPhoneNumber i:nil= "true" />
               < b:City/>
               <b:Country/>
               <b:HouseNo i:nil= "true" />
               < b:Id/>
               <b:PhoneNumber i:nil= "true" />
               < b:PostCode/>
               <b:StateProvinceRegion/>
               <b:Type>Residential</b:Type>
            </a:ShipToAddress>
            <a:ShipToEmail i:nil= "true" />
            < a:ShipToName i:nil= "true" />
            < a:ShipToPhoneNumber i:nil= "true" />
            < a:ShippingAgentCode i:nil= "true" />
            < a:ShippingAgentServiceCode i:nil= "true" />
            < a:ShippingStatus>ShippigNotRequired</a:ShippingStatus>
            <a:SourceType>LSOmni</a:SourceType>
            <a:StoreId>S0013</a:StoreId>
            <a:TotalAmount>160.00</a:TotalAmount>
            <a:TotalDiscount>0.00</a:TotalDiscount>
            <a:TotalNetAmount>128.00</a:TotalNetAmount>
         </OneListCalculateResult>
      </OneListCalculateResponse>
   </s:Body>
</s:Envelope>
See Also