Click or drag to resize

IUCServiceOrderCreate Method

Create Customer Order

Namespace:  LSOmni.Service
Assembly:  LSOmni.Service (in LSOmni.Service.dll) Version: Commerce Service for LS Central 2024.6
Syntax
C#
SalesEntry OrderCreate(
	Order request,
	bool returnOrderIdOnly
)

Parameters

request
Type: LSRetail.Omni.Domain.DataModel.Loyalty.OrdersOrder
returnOrderIdOnly
Type: SystemBoolean
Only return Order Id back, not full order object

Return Value

Type: SalesEntry
SalesEntry object for order if order creation was successful
Remarks
LS Central WS2 : CustomerOrderCreateVx
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 for Sales Order
<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:OrderCreate>
       <ser:request>
          <ns:Id></ns:Id>
           <!--AnonymousOrder leave empty-->
          <ns1:CardId>10021</ns1:CardId>
          <ns1:CollectLocation></ns1:CollectLocation>
          <!--OrderLines need to have minimum Price and Net Price set for Order to be valid.Price is unit price and will be used when calculate the Line Total Amount -->
          <ns1:OrderDiscountLines>
          </ns1:OrderDiscountLines>
          <ns1:OrderLines>
             <ns1:OrderLine>
                <ns1:Amount>160.00</ns1:Amount>
                <ns1:ClickAndCollectLine>false</ns1:ClickAndCollectLine>
                <ns1:DiscountAmount>0</ns1:DiscountAmount>
                <ns1:DiscountPercent>0</ns1:DiscountPercent>
                <ns1:ItemId>40020</ns1:ItemId>
                <ns1:LineNumber>1</ns1:LineNumber>
                <ns1:LineType>Item</ns1:LineType>
                <ns1:NetAmount>128.00</ns1:NetAmount>
                <ns1:NetPrice>64.00</ns1:NetPrice>
                <ns1:Price>80.00</ns1:Price>
                <ns1:Quantity>2.00</ns1:Quantity>
                <ns1:TaxAmount>32.00</ns1:TaxAmount>
                <ns1:UomId/>
                <ns1:VariantId>002</ns1:VariantId>
             </ns1:OrderLine>
          </ns1:OrderLines>
           <!--Optional: Used for PrePayment information for Shipped orders-->
          <ns1:OrderPayments>
             <!--Zero or more repetitions:-->
             <ns1:OrderPayment>
                <ns1:Amount>160.00</ns1:Amount>
                <ns1:AuthorizationCode>123456</ns1:AuthorizationCode>
                <ns1:CardNumber>45XX..5555</ns1:CardNumber>
                <ns1:CardType>VISA</ns1:CardType>
                <ns1:CurrencyCode></ns1:CurrencyCode>
                <ns1:CurrencyFactor>1</ns1:CurrencyFactor>
                <ns1:ExternalReference>My123456</ns1:ExternalReference>
                <ns1:LineNumber>1</ns1:LineNumber>
                <ns1:PaymentType>PreAuthorization</ns1:PaymentType>
                <ns1:PreApprovedValidDate>2030-01-01</ns1:PreApprovedValidDate>
                <ns1:TenderType>1</ns1:TenderType>
                <ns1:TokenNumber>123456</ns1:TokenNumber>
             </ns1:OrderPayment>
          </ns1:OrderPayments>
          <ns1:OrderType>Sale</ns1:OrderType>
          <ns1:PaymentStatus>PreApproved</ns1:PaymentStatus>
          <ns1:ShipOrder>true</ns1:ShipOrder>
           <!--Optional: ShipToAddress can not be null if ClickAndCollectOrder == false-->
          <ns1:ShipToAddress>
             <ns:Address1>Some Address</ns:Address1>
             <ns:Address2></ns:Address2>
             <ns:CellPhoneNumber></ns:CellPhoneNumber>
             <ns:City>Some City</ns:City>
             <ns:Country></ns:Country>
             <ns:HouseNo></ns:HouseNo>
             <ns:PhoneNumber></ns:PhoneNumber>
             <ns:PostCode>999</ns:PostCode>
             <ns:StateProvinceRegion></ns:StateProvinceRegion>
             <ns:Type>Residential</ns:Type>
          </ns1:ShipToAddress>
          <ns1:StoreId>S0013</ns1:StoreId>
          <ns1:TotalAmount>160</ns1:TotalAmount>
          <ns1:TotalDiscount>0</ns1:TotalDiscount>
          <ns1:TotalNetAmount>128</ns1:TotalNetAmount>
       </ser:request>
       <ser:returnOrderIdOnly>true</ser:returnOrderIdOnly>
    </ser:OrderCreate>
 </soapenv:Body>
</soapenv:Envelope>
SOAP Sample Request for Click and Collect Order
<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:OrderCreate>
       <ser:request>
          <ns1:CardId>10021</ns1:CardId>
          <ns1:CollectLocation>S0001</ns1:CollectLocation>
          <ns1:OrderDiscountLines>
          </ns1:OrderDiscountLines>
          <ns1:OrderLines>
             <ns1:OrderLine>
                <ns1:Amount>320.00</ns1:Amount>
                <ns1:ClickAndCollectLine>true</ns1:ClickAndCollectLine>
                <ns1:DiscountAmount>0</ns1:DiscountAmount>
                <ns1:DiscountPercent>0</ns1:DiscountPercent>
                <ns1:ItemId>40020</ns1:ItemId>
                <ns1:LineNumber>1</ns1:LineNumber>
                <ns1:LineType>Item</ns1:LineType>
                <ns1:NetAmount>256.00</ns1:NetAmount>
                <ns1:NetPrice>64.00</ns1:NetPrice>
                <ns1:Price>80.00</ns1:Price>
                <ns1:Quantity>4.00</ns1:Quantity>
                <ns1:StoreId>S0001</ns1:StoreId>
                <ns1:TaxAmount>64.00</ns1:TaxAmount>
                <ns1:UomId/>
                <ns1:VariantId>002</ns1:VariantId>
             </ns1:OrderLine>
          </ns1:OrderLines>
          <ns1:OrderType>ClickAndCollect</ns1:OrderType>
          <ns1:PaymentStatus>PreApproved</ns1:PaymentStatus>
          <ns1:ShipOrder>false</ns1:ShipOrder>
          <ns1:StoreId>S0013</ns1:StoreId>
          <ns1:TotalAmount>160</ns1:TotalAmount>
          <ns1:TotalDiscount>0</ns1:TotalDiscount>
          <ns1:TotalNetAmount>128</ns1:TotalNetAmount>
       </ser:request>
       <ser:returnOrderIdOnly>false</ser:returnOrderIdOnly>
    </ser:OrderCreate>
 </soapenv:Body>
</soapenv:Envelope>
See Also