Overview
There are times when a third-party service handles every aspect of an order outside of Cloud Retailer, and there's a need to bring that information in for reporting and inventory deduction. This need led us to create an expansion tool for our /Orders/Create API endpoint that allows the system to automatically complete the order into a completed sales transaction. The best part about this tool is that it eliminates the need for the user to recall the order at the POS for completion.
This tool is only available upon special request. If you have a need to create sales transactions through our API, please reach out to support@cloudretailer.com for a consultation to see if this tool will fit your needs.
When should the API order be created?
Let's say a customer logs into your website and places an order. There's typically a process that confirms the item is available before the payment is fully processed. The API order should be created after the order is confirmed, and the payment has been processed outside of Cloud Retailer.
If the order's intent is for the customer to pay in the store when they pick up their order, it's best to instead use a standard order type that can be recalled at the POS.
How does this work?
We made this tool work off the order type's code that's specified in the API order request. There are specific order type codes that can be used to identify when an API order needs to be created as a sales transaction.
When the system sees an API order was created using one of these codes, it bypasses the part that sends it to the POS, and instead closes the order, and creates a completed sales transaction.
That's it! The system will handle the inventory deduction for you, and put the data in the appropriate places for reporting.
How will these transactions appear in reports?
These transactions are tied to a special register, and appear in reports exactly like sales transactions that happen at the POS.
The Detailed Sales Report will display the product's sold quantity and their price, the Sales Tax Collected Report will display the tax amount collected from the third party, and the quantity sold will be deducted from the Inventory Value Report.
Will there be a sales receipt for these transactions?
No. Since the third-party service handles every aspect of the transaction, including the payment, the third-party service will need to provide the sales receipt to the customer.
You will also need to reference that transaction in the third-party service if you need to review, reprint, or resend the receipt, and filing your tax reports.
Will this tool work with Loyalty?
Yes! We included logic to calculate the points a customer will earn when the transaction is created. This will look at your earn rules to make sure the product qualifies for points.
POST /Orders/Create Endpoint Structure
{ "orderType": "string", "locationId": 0, "customerId": "string", "customerAccountNumber": "string", "referenceNumber": "string", "comment": "string", "transactionComment": "string", "registerId": 0, "deviceId": 0, "scanCode": "string", "pricingMode": "AllExplicit", "lineItems": [ { "productCode": "string", "price": 0, "quantity": 0, "taxAmount": 0, "comment": "string", "discountItems": [ { "discountAmount": 0, "referenceName": "string", "comment": "string" } ] } ] }
Example of how to use the tool
After we install the tool, we will create a register specifically for the external orders. You will receive the following information, that needs to be used for every API order.
- locationId
- registerId
- deviceId
The example below uses an order type called "Online Order".
{ "orderType": "Online Order", "locationId": 1, "registerId": 3, "deviceId": 51, "customerAccountNumber": "CA000000001", "referenceNumber": "O000000001", "lineItems": [ { "productCode": "400000000114", "price": 10.00, "quantity": 1, "taxAmount": 0.75 } ] }
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article