Qntrl Online Help | Inbound SOAP Use case | Automate E-commerce Order Processing with Inbound SOAP Web Services in Qntrl

Business Case: Automating Order Management

Scenario

Consider a retail company that uses Qntrl to manage its order fulfillment process. The company has an external e-commerce platform that receives orders from customers and needs to integrate with Qntrl to process these orders automatically.

Using Inbound SOAP Web Services, the e-commerce platform can send order details to Qntrl, which then validates the request, processes the order, and updates the inventory system.

How It Works  

  1. A customer places an order on the e-commerce website.
  2. The website sends a SOAP request to Qntrl’s inbound SOAP endpoint with the order details (e.g., Order ID, Customer ID, Product ID, Quantity, and Order Date).
  3. Qntrl processes the request and:
    • Validates the order details (ensures product availability, checks for duplicate orders, etc.).
    • Updates the order management system with the new order.
    • Sends a SOAP response confirming successful order creation.
  1. The e-commerce platform receives the response and updates the customer with order confirmation details.
 

Business Impact  

      ✅ Automated order processing reduces manual work and errors.
      ✅ Faster response times improve customer experience.
      ✅ Seamless integration between external platforms and Qntrl.
 

Step-by-Step Process to Create an Inbound SOAP Web Service   

Define the SOAP Service  

  1. Login to Qntrl.
  2. Navigate to (settings) >> WEB SERVICES >> Inbound >> Select SOAP.
  3. Click Create New SOAP Webservice.
  4. Fill in the service details to enable Qntrl to receive and process SOAP requests from the e-commerce platform.
    1. Name: OrderProcessingService
    2. Source Endpoint: /orderService (This will be the URL external systems call to send orders)
    3. Operation: execute (Default operation for processing requests)
    4. Resource: Create a new function to define how Qntrl processes incoming SOAP requests.
      1. Write a function in the editor to validate order details, store them in the order management system, and return a confirmation response.
    5. Authentication Type: Set up authentication to ensure secure communication between the e-commerce platform and Qntrl.
      1. OAuth
      2. API Key
      3. Basic Authentication (username and password encoded in Base64)
    6. Mandate WSDL Compliance (Optional)  
      1. True: Only the predefined request/response parameters and operations are allowed.
      2. False: Allows additional parameters but enforces validation rules.
      

 

Define Request Parameters and Response Parameters

These request parameters define the order details sent by the e-commerce platform.

Parameter

Type

Allowed Regex

Min Length

Max Length

Default Value

Mandatory

OrderID

String

^[A-Za-z0-9]{5,10}$

5

20

-

CustomerID

String

[^[A-Za-z0-9]{5,10}$

5

20

-

ProductID

String

^[A-Za-z0-9]{5,10}$

5

20

-

Quantity

Integer

\d+

1

5

1

OrderDate

Date

^[A-Za-z0-9]{5,10}$

-

-

-

 

These response parameters define the order confirmation details returned to the e-commerce platform.

Parameter

Mandatory

Status

OrderReference

 

Processing SOAP Requests in Qntrl   

Handle Incoming SOAP Requests  

Qntrl uses the soapRequest object to process the request and extract values.

let orderID = soapRequest.getParam("OrderID");
let customerID = soapRequest.getParam("CustomerID");
let productID = soapRequest.getParam("ProductID");
let quantity = soapRequest.getParam("Quantity");
let orderDate = soapRequest.getParam("OrderDate");

// Business logic: Validate and store the order
if (!validateOrder(orderID, customerID, productID, quantity, orderDate)) {
soapResponse.setFault("INVALID_ORDER", "Order validation failed.");
} else {
let orderRef = processOrder(orderID, customerID, productID, quantity, orderDate);
soapResponse.setParam("Status", "Success");
soapResponse.setParam("OrderReference", orderRef);
}


 

Sending a SOAP Response  

Qntrl sends back an XML response confirming whether the order was processed successfully.

Sample SOAP Response  

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<OrderResponse>
<Status>Success</Status>
<OrderReference>ORD12345XYZ</OrderReference>
</OrderResponse>
</soapenv:Body>
</soapenv:Envelope>

 

Making API Calls to the SOAP Web Service   

Requesting the WSDL Definition  

  • Method: GET
  • URL Format: https://core.qntrl.com/webservice/soap/<ZSOID>/orderService?wsdl
  • Purpose: External systems can retrieve the WSDL definition to understand available operations.

Sending an Order Request  
 <soapenv:Envelope
xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ord="
https://core.qntrl.com/webservice/soap/orderManagement">

<soapenv:Header>
<ord:AuthHeader>
<ord:Username>APIUser</ord:Username>
</ord:AuthHeader>
</soapenv:Header>

<soapenv:Body>
<ord:PlaceOrder>
<ord:OrderID>ORD67890</ord:OrderID>
<ord:CustomerID>CUST54321</ord:CustomerID>
<ord:ProductID>PROD1122</ord:ProductID>
<ord:Quantity>2</ord:Quantity>
<ord:OrderDate>2025-04-10</ord:OrderDate>
</ord:PlaceOrder>
</soapenv:Body>

</soapenv:Envelope>