Khaos Control Web Integration API
Khaos Control provides developers a fully featured webservice and API, to allow other systems to be integrated with the core Khaos Control application.
Hot Mustard offers a fully featured web integration into the Khaos Control Core, find out more about Dijon.
Khaos Control offers a standard SOAP based API, it’s simple to understand and allows developers to interact with it using their programming language of choice. When we came to build our e-commerce system, Dijon, we chose to take advantage of open source languages and opted for PHP and MySQL to power our integration. This allows us access the full product database and check stock information on the fly.
Khaos Control is holds all the customer information, the API allows us to register new customers and access existing customers orders and details to provide rich order tracking functionality on the website.
Integral to all of this is the ability to import orders, again this can be done seamlessly by the website, and allows us to pass the order references back to the customer after they’ve ordered to help them track their order straight after purchase. we’ve evolved these tools to not only allow us the keep everything synchronised on the website but also to bridge the gap between Amazon and Ebay, creating specialist middleware to allow orders to be collected from Ebay or Amazon and imported into Khaos Control. As everything is automatically synchronised between the website and Khaos Control you don’t need to do anything to update the information, whatever is setup in Khaos Control is replicated on the website; products, descriptions, prices, postage tables, web site categories, promotions and stock levels. From these basics we’ve layered on the ability to use customer specific pricelists and advanced re-order functionality.
One very useful feature in Khaos Control is being able to set “Invoice Priorities”. This is a way to tag an order as it’s created so that it is put into a specific area in Khaos Control for processing before being shipped out. We’ve setup an advanced system within Dijon to allow this to be easily configured, meaning that a match based on stockcodes, stock type, order value or delivery country could all trigger a specific priority that the order is tagged with. An example is at Planet X whenever someone orders a bike that needs to be custom built, any order with a product with that stock type (custom bike) triggers a specific invoice priority, the order is then put into an area in Khaos that the bike builders can access and process those orders. It’s a really simple feature that helps streamline business processes.
Technical Example in PHP
For the technical, here’s an example of using the API in PHP
<?php //simple Khaos Control API request in PHP $skuCodes = "'SKU.01','SKU.02'"; $client = new SoapClient("https://www.hotmustard.com/Khaos.exe/wsdl/KhaosWeb"); $xml_products = $client->ExportStock( $skuCodes ,1); $products = simplexml_load_string($xml_products); ?>
As you can see it’s really simple, here we request two stock items by their SKUs (SKU.01 & SKU.02) we get back the XML and convert it into an object that we can process in PHP for the website. This simplicity shows why SOAP based APIs are so prevalent across the web, this is a brief overview of what Khaos Control has to offer and some examples to whet your appetite.