Integrating With a 3rd party Ecommerce Platform
Days are gone when people were selling products only in their stores and days are gone when taking one's business to online was considered as being not affordable and fabulous. Now every business owner can setup an online store and run it. Apart from self hosted platforms like Woocommerce and Magento, there are third-party hosted solutions too with Shopify and Bigcommerce taking the leading role.
You can setup a store online and use third-party delivery services like UPS, Fedex or DHL but what if we want to deliver products on our own? - here Route4Me comes in offering the most advanced software for routing. Route4Me already has built plugins for the top ecommerce platforms (Woocommerce, Magento, Shopify, Bigcommerce) for instantaneous order to route integration. Are you using another ecommerce platform? it's not a problem -This tutorial is dedicated to explain how simple it is to integrate ecommerce platform to Route4Me.
After a successful checkout process ecommerce platform generates an order with all the details about the customer and the product that has been ordered. All of the top hosted ecommerce platforms provide API to retrieve order data and you can extend self hosted platforms with integrated plugins. Once you finish gathering the data you care about, you are ready to send them to Route4Me.
- All you need is to use 2 methods from the Route4Me API: Forward Geocoding and Create an Order
|Create an Order||https://www.route4me.com/api.v4/order.php||POST|
Geocoding an order address
The primary intention of sending an order to a routing software is to pin the order address on the map, so we can plan a route to the address and make a successful delivery. Pinning an address on the map requires Geocoding, in other words we want to get latitude and longitude out of the address.
What we do up there in the code block is that we send an address to Route4Me API providing access to only valid API Key and tell it to return response in the xml format. If everything was alright, you can expect the following response:
With this response we are getting valid address, latitude and longitude. And we are on the next step.
Creating an order
Now that we geocoded the order address we can pass it to the "Create an order" method along with other order parameters.
Scheduling an Order
When sending an order, you can schedule it to a specific date. To achieve this add following parameter to the order parameters array:
With Route4Me you are able to group orders by date. There is a built in calendar which displays days orders are scheduled for.
Date filter is there on the Orders screen too enabling to display orders for a specific date and to plan a route with them.
Parameters in Custom Data
Not all order parameters can be set as primary parameters when sent to Route4Me. But the good thing is that we can export anything under custom data. For example with our Shopify app under custom data are ending up such parameters as order origin, shipping address, customer provided note, each product attached to an order...
With this tutorial coming to the end, you learned so far how to integrate Route4Me with a 3rd party ecommerce platform. Now using this knowledge you can ditch those shipping service providers, synchronize your online store to the routing software and make a successful delivery.