question

harshapaul avatar image
harshapaul asked harshapaul commented

Mapping our Orders XML to clover APIs.

This question is in continuation to the discussion in the following ticket:

http://devask.clover.com/question/107...

Here is the use case:

Our company is called nuOrder Technologies, and we provide custom online & mobile ordering for restaurants (www.nuordertech.com). When a customer goes to www.freebirds.com they can hit the "Online Ordering" button, they are taken to our website to order and pay for their food.

One of the most important parts of our business is delivering customer orders to each restaurant. The most efficient way for us to send online orders to the store is by sending them directly to the POS. We have years of experience sending orders from our website into Micros, Aloha, POSitouch, and several other POS platforms.

Recently our sales team has found a demand from several Clover POS customer who would like to use our ordering solution, given that we can send online orders directly to their Clover POS.

Our task is to build a native Android application that will reside on the Clover device inside the restaurant. The app will accept orders in our XML format, then we will place the order for the customer on Clover.

Does that make sense?

Since we will be using Clover devices and there is a clover-android-sdk, we will need tutorial around sending Orders data from our XML to the Clover POS using the android sdk. However there is no step by step guide explaining what code is for what purpose. We will need a document that explains us step by step, what is to be done in the sdk to place the orders that come from our XML and also how to setup the Android app to use the clover sdk.

We have a list of orders XML which you will receive from Daniel from your team. I have added it at the bottom, however it appears in some other format. Tried attaching but it asks for 50 points. It is basically a batch order covering all possible information about a set of orders. We need to place orders in the clover POS using the information available in the below XML. I will explain what each element means. I would like to know which all APIs will have to be called in specific, to place orders using this XML. I would also like to know which elements are to be mapped against which keys in which API. What will be the basic response structure for the APIs responses and what will be the alternate response structure for APIs(in case of API failures) and which keys are we supposed to look at in the response structure and which are to be ignored, for both the basic and alternate responses. Also, if any information is missing in our XML which will be required in your APIs for the orders to be placed.

Elements and attributes in our XML:

  • CHECKREQUESTS element - collection of orders
  • ADDCHECK element - Individual order
    • TOTAL attribute - Total amount of the order including tax, tip, delivery fee etc.
    • READYDATETIME attribute - The probable ready date time of the order.
    • SUBTOTAL attribute - The actual total of the order i.e. the price of the menu items multipled by their quantity.
    • ORDERID attribute - The order id in our system.
    • EXTCHECKID attribute - the userid for this order in our system.
    • ORDERMODEDESC attribute - The description of order mode viz. Delivery, pickup etc.
    • READYTIME attribute - The probable ready time of the order.
    • ORDERMODE attribute - The order mode id set in our system viz. Delivery, pickup etc.
    • NOTE attribute - Any specific note for this order
    • TAX attribute - tax on order
    • BALANCEDUE attribute - Balance payment remaining
    • ORDERMODEFEE attribute - Charges for delivery, pickup etc.
    • TIP attribute - tip if any
  • LOCATIONINFO element - The location info of the store.
  • CONTACT element - Information of the user who placed the order.
  • DELIVERY element - Delivery Address
  • ITEMREQUESTS element - collection of menu items in the order.
  • ADDITEM element- The Menu item to be ordered
    • ITEMID attribute - The unique item id for the menu item in our system
  • KITCHENMSG element- Any preparation message pertaining to this item for the kitchen.
  • MODITEM element- the modifier for this menu item.
    • ITEMID attribute - The unique item id for the modifier in our system.
    • MODCODE attribute - The unique modifier code viz. with, extra, side, heavy, light etc.
    • TOPPINGPLACEMENT attribute - which part of the item to place the topping on.
    • TOPPINGAMOUNT attribute - How much amout of topping viz. heavy, light, normal etc.
  • MODMOD element- The modifier to a modifier if any.
  • PAYMENTREQUESTS element - collection of payment methods.
  • ADDTENDER element - The payment method configured in our system and selected by the user.
    • TENDERID attribute - The unique identifier of the tender type in the system, viz. visa, cash, gift card etc.

Below is our XML structure: email="test@something.com" phone1="1234567890" phone2="1234567890" company="" loyalty="Rewards=testcard" lastname="B"/> TEST SPL INST FOR ITEM TEST NAME SPL INST ITEM PIZZA email="test@something.com" phone1="1234567890" phone2="1234567890" company="" loyalty="Rewards=testcard" lastname="A"/> TEST SPL INST FOR ITEM TEST NAME SPL INST ITEM PIZZA

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jacob Abrams avatar image
Jacob Abrams answered

Maybe you can step back from the details for a moment so we can try to understand the bigger picture. What are you planning on doing with the Clover devices? It sounds like you already have a good system for handling orders, are you looking for a device that integrates with your current system to take payments such as chip cards and apple pay?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

anthonypinto avatar image
anthonypinto answered harshapaul commented

I have removed Daniel's email address from your post

In order to create an Order in our system from your web service, your app will need to consume our HTTP API. Please review the web apps section of the docs here: https://docs.clover.com/build/web-apps/. And see here for an overview of building Order objects: https://docs.clover.com/build/web-app....

Any changes made to a merchant's data are synched automatically with all of that merchant's devices, as long as they are connected to the internet. Your app can also include an android component running on the Clover device, which can be notified when you need to process the orders your web service created. For the android portion of your app, review this section of the docs: https://docs.clover.com/build/android...

This example covers sending notifications to your own app: https://github.com/clover/android-exa...

1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

harshapaul avatar image harshapaul commented ·

Thanks. Our XML also contains the information for payment as given below:

     <PAYMENTREQUESTS>
        <ADDTENDER TENDERID='3' AMOUNT='81.34' EXPDATE='0116' CARDID='************1111' TENDERTYPE='Visa' />
     </PAYMENTREQUESTS>

How do we pass on this information to clover after creating the order.

Another point is, if our app is on a clover device and we integrate the clover android sdk in our app, is it possible to create and build orders using only the sdk OR do we have to make the rest calls irrespective of this? If its possible using only the sdk, are there any tutorials?

0 Likes 0 ·

Welcome to the
Clover Developer Community