Interface Setups

Mobi2Go Interface Setup

    Overview

    Mobi2Go is an online ordering platform from New Zealand.

    They focus on the QSR, cafe and small restaurant market.

    The integration works via our API that they have developed to. As of 1/7/16 this would be considered v.1 of the implementation.

    Prerequisites​​​​​​​

    • Setup the API as described in the Document “Setting up API with Bepoz”

    • You will need the IP address and Port to enter into Mobi2Go


    Configurations & Setup 

    1. Go to 

    https://www.mobi2go.com/admin/

     

    1. U: 

    adam@vectron.com.au

    P: Vectron123 

    1. Click on the store you want to administer.

     

     

    ​​​​​​​2. Select Settings on the right

     

     

    ​​​​​​​3. Find Incoming Orders then click on Edit

     

     

    ​​​​​​​4. Select Bepoz in POS System.

     

    ​​​​​​​5. Add in all the details for the API

     

    ​​​​​​​6. Click on Check Connection and await a OK result

     

    ​​​​​​​Notes: 

    To extract the information out of Bepoz - you will need to create a view report that includes 

    Product Name
    Product ID
    Product Name
    Parent Name
    Size 1 Name
    Price Level 1 Price (can be other price levels if needed)
    ProdMode (Normal Product and Condiment) 

    You can export this as a CSV and send through to Mobi2Go On Boarding Team

    NB. It is worth noting that they need to then administer products via Mobi2Go and CSV imports may double up existing entries. Please direct the customer to Mobi2Go if they have any queries about this. 

    Setting Up Bepoz API 

    ​​​​​​​You will need:

    ·     An open a port for the API on the router to the SmartController IP address.

    ·     An additional Till licence

    ·     Static IP address

    ·     Are you single venue or HO? HO instructions are at the end of this section.

     

     

    1.  

    Add an API till to Venue/Stores/Tills

     

    ​​​​​​​Setup the API Till 

    ·     Set the IP Address as the same as the Main Server if applicable

    ·     Make sure the device is an API Till

    ·     Select your Printer Preferences

     

    1.  

    Setup the Scheduled Job 

    ·     Go into System Setup -> Scheduled Jobs

    ·     Click Add Job

    ·     Name the job and select DLL Name: Jobxml_api.dll and Classname: XML_API

     

    ·     Set the Schedule to Everyday and On Startup

    ·     Set the MAC Secret Key – this is for API authentication

    ·     Add your Connection Port number

    ·     Select API Till from Till

    ·     Press OK, then Run Job Now!

     

     

    ​​​​​​​You will now see the API job running in SmartController!
    It is now ready to start accepting API calls on port 9100.

     Setting Up Bepoz API within a HO environment 

    ·     You will need to setup the API Till device in under remote venue. Name this the Venue’s API Till

    ·     Setup the Scheduled Job at Venue to run within the Venue’s SmartController.

    Specify the Venue’s name in the Scheduled Job name

    Testing Bepoz API

     Before You Start! 

    You will need:

    ·     Download the Bepoz API Tester from Bepoz Global DNA

    oLook for it under Files -> Documentation -> External XML API

    oAlso find it in the Vectron TechnicalDrive under POS-Bepoz.

     

    1.  

    Expand the folder and open:

    Bepoz_SDK_XMLAPI\XML_API_Tester.exe

    1. Add the IP Address and Port including the Secret Key you added in the API Till device in Backoffice.

     

    1. Using the Send Data Function: SystemCheck, press Send

     

     

     

    1. If the query is successful, you will get a response in the Data Received area.

    Possible Errors 

    oError in MAC Received

    §  Check the Secret Key

    §  It is case sensitive 

     

    oA Connection Attempt Failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to respond

    §  Check the API  Job is running and that the SmartController is running.

    §  Check IP address is correct 

     

    oNo Connection could be made because the target machine actively refused it

    §  Check the port is correct

    §  Check the port has been opened on any firewalls

     

     

    Working with Bepoz API
    Before You Start! 

    You will need

    ·         API Setup as per document “Setting Up Bepoz API”

    ·         The Vectron utility “API Tester” to test XML declarations

    ·         Bepoz External API Guide for reference

    o    Do not release the Bepoz External API Guide to customers

     

    Background

    The Bepoz API is a fully functional XML API that allows a multitude of solutions to be created with it – including:

    ·     Web Ordering (Pickup/Delivery)

    ·     Account management

    ·     Marketing and Promotions activity

    oVouchers

    oGift Certificates

    oProduct Promotions

    oPrize Promotions

    oRaffle functionality

    ·     Membership management

    ·     Basic sales

    ·     Table sales

    ·     Account Charges

     

    Online Shopping Cart Solutions 

    This provides a high level overview of a Online Shopping Cart solution for retail applications

    Workflow and Command Methods

    Command Methods are Classes/Methods available within Bepoz External API.

    WebStore Recommended Simplified Workflows 

    Create a Sale/Order as a Transaction only

    This workflow is useful when creating a transaction without relating the transaction to a client Account. 

    1. Submit transaction using 

    TransactionCreate.

     

     

    Note: Although the transaction is not associated with a Bepoz Account, a unique identifier should be submitted such as a phone number or email for temporary identification purposes within Bepoz. This allows the operator to identify the order being collected and cash off the transaction.

    Create a Sale/Order Transaction for a Client Account

    This workflow is useful when orders are associated with a client account.

    1. Determine is the client exists using 

    AccountsSearch.

    1. If the client does NOT exist, create a new client using 

    AccCreateUpdate.

    1. Submit the Transaction using 

    TransactionCreate with the addition of the <AccountNumber> </AccountNumber> from AccountsSearch or AccCreateUpdate.

     

    Syncing Products with the WebStore

    It is recommended that products are synced regularly, or attached to push updates, as opposed to retrieving the products from Bepoz each time the WebStore webpage is rendered.

     

    SystemCheck

    Used to determine if the system is up. 

    Detailed Explanation of Classes & Methods used

    AccountsSearch

    Purpose

    This method retrieves a list of matching Account IDs. Accounts is a system within Bepoz that is used to track information on people or groups.

    Request

                Field Name            Data

    Req.

    Description

    REQTYPE

    AccountsSearch

    M

     

    Data1

    SearchData

    M

    This will be fully or partially matched on the specified Field.

    Data2

    FieldNumber

    M

    This is the FieldNumber as listed in Account Search Fields table below. 

    Data3

    ExactMatch

    O

    Set this to 1 to filter out partial matches.

    Data4

     

     

    These fields are not in use.

    Data5

     

     

    Data6

     

     

    This field is not in use.

    ClassName

     

     

    Leave this blank.

    XMLDATA

     

     

    Leave this blank.

     

    Account Search Fields

     

    FieldNumber

    Field Name

    1

    FirstName

    2

    LastName

    3

    EitherName

    4

    AccountNumber

    5

    CardNumber

    6

    AnyPhoneNumber

    7

    Mobile

    8

    Email

    9

    Street

     

    AccountsSearch (with Account Search Fields) XML Example

    Successful Search

    XML Submitted to API

    XML Response from API

    <?xml version="1.0" encoding="utf-8"?>

    <Header>

    <ReqType>AccountsSearch</ReqType>

    <Data1>0420510370</Data1>

    <Data2>6</Data2>

    </Header>

    11/02/2016 3:59:31 PM

    <?xml version="1.0" encoding="utf-8"?>

    <Header>

      <ReqType>AccountsSearch</ReqType>

      <ClassName>IDList</ClassName>

      <XMLData><?xml version="1.0" encoding="utf-8"?>

    <IDList>

      <Count>1</Count>

      <ID>

        <int>28934</int>

      </ID>

      <Name>

        <string>Ayten Abdullah          , 0420510370, test@test.com</string>

      </Name>

    </IDList></XMLData>

    </Header>

    Step-by-Step explanation of XML Submitted

    Step-by-Step explanation of XML Response

    Using AccountsSearch method

    searching for mobile number ‘0420510370’

     

    within AnyPhoneNumber

     

    identified by <Data2>6</Data2>

     

    FieldNumber

    Field Name

    6

    AnyPhoneNumber

     

     

    1 record has been retuned (found) <Count>1</Count>

     

    The Account ID is 28934

      <ID>

        <int>28934</int>

      </ID>

     

    Unsuccessful Search

    XML Submitted to API

    XML Response from API

    <?xml version="1.0" encoding="utf-8"?>

    <Header>

    <ReqType>AccountsSearch</ReqType>

    <Data1>0420510380</Data1>

    <Data2>6</Data2>

    </Header>

    11/02/2016 4:27:44 PM

    <?xml version="1.0" encoding="utf-8"?>

    <Header>

      <ReqType>AccountsSearch</ReqType>

      <ClassName>IDList</ClassName>

      <XMLData><?xml version="1.0" encoding="utf-8"?>

    <IDList>

      <Count>0</Count>

    </IDList></XMLData>

    </Header>

     

    AccCreateUpdate

    Purpose

    This Method allows an Account to be created or updated in the Bepoz system.

    Request

    Field Name

    Data

    Req.

    Description

    REQTYPE

    AccCreateUpdate

    M

     

    Data1

    Template

    Account Number

    O

    This is the Account Number of an existing account to be used as a Template. This will provide defaults for the created account. 

    Data2

    Account

    Creation Flags

    O

    These determine how accounts are created in a MultiVenue system. See Appendix for details.

    1. = Normal

    2. = Skip Create at HO

    3. = Ensure Create at HO

    Data3

     

     

    These fields are not in use.

    Data4

     

     

    Data5

     

     

    Data6

     

     

    ClassName

     AccountFull

     

    This is the class that is Sent.

    XMLDATA

     

     

    This is the Account Full data needed to update/add in Bepoz

     

    Response

    Field Name

    Data

    Description

    REQTYPE

    AccCreateUpdate

     

    Data1

     

    No data will be returned in these fields.

    Data2

     

    Data3

     

    Data4

     

    Data5

     

    Data6

     

    ClassName 

    AccountFull

    This is the class that is returned.

    XMLDATA

     

    This is newly created AccountFull including its Account ID etc.

     

     

    AccountFullGet 

     

    ​​​​​​​​​​​​​​Successful Get 

    XML Submitted to API

    XML Response from API

    <?xml version="1.0" encoding="utf-8"?>

    <Header>

    <ReqType>AccountFullGet</ReqType>

    <Data1>28934</Data1>

    <Data2 />

    <Data3 />

    <Data4 />

    <Data5 />

    <Data6 />

    </Header>

    11/02/2016 4:35:38 PM

    <?xml version="1.0" encoding="utf-8"?>

    <Header>

      <ReqType>AccountFullGet</ReqType>

      <ClassName>AccountFull</ClassName>

      <XMLData><?xml version="1.0" encoding="utf-8"?>

    <AccountFull>

      <AccountID>28934</AccountID>

      <AccNumber>6131793102</AccNumber>

      <CardNumber>6131793102</CardNumber>

      <GroupID>51</GroupID>

      <IsGroup>false</IsGroup>

      <AccountType>0</AccountType>

      <Title>Mrs</Title>

      <FirstName>Ayten</FirstName>

      <LastName>Abdullah</LastName>

      <Status>0</Status>

      <AddressID>30308</AddressID>

      <CommentID>0</CommentID>

      <DateTimeCreated>2015-10-22T13:59:02</DateTimeCreated>

      <DateTimeExpiry>2050-01-01T00:00:00</DateTimeExpiry>

      <DateUpdated>2015-10-22T14:00:05</DateUpdated>

      <DateBirth>1933-08-01T00:00:00</DateBirth>

      <DateTimeJoined>0001-01-01T00:00:00</DateTimeJoined>

      <DateTimeNextRenewal>0001-01-01T00:00:00</DateTimeNextRenewal>

      <DateTimeLastRenewed>0001-01-01T00:00:00</DateTimeLastRenewed>

      <Gender>2</Gender>

      <DoNotPost>false</DoNotPost>

      <DoNotEmail>false</DoNotEmail>

      <DoNotSMS>false</DoNotSMS>

      <DoNotPhone>false</DoNotPhone>

      <ExportCode1 />

      <ExportCode2 />

      <CreditLimit>0</CreditLimit>

      <StopCredit>false</StopCredit>

      <CashOnly>true</CashOnly>

      <ChargeOnly>false</ChargeOnly>

      <UseCaLinkPoints>false</UseCaLinkPoints>

      <UseCaLinkBalance>false</UseCaLinkBalance>

      <UseGroupSettings>true</UseGroupSettings>

      <OtherName />

      <Street1 />

      <Street2 />

      <Street3 />

      <City />

      <State />

      <Country />

      <PCode />

      <PhoneHome />

      <PhoneWork>98261669</PhoneWork>

      <Fax />

      <Mobile>0420510370</Mobile>

      <Email1st>test@test.com</Email1st>

      <Email2nd />

      <FaceBook />

      <PostalStreet1 />

      <PostalStreet2 />

      <PostalStreet3 />

      <PostalCity />

      <PostalState />

      <PostalCountry />

      <PostalPCode />

      <PointsEarned>0</PointsEarned>

      <PointsRedeemed>0</PointsRedeemed>

      <PointsExpired>0</PointsExpired>

      <AccountBalance>0</AccountBalance>

      <GrossTurnover>0</GrossTurnover>

      <NettTurnover>0</NettTurnover>

      <CurrentDisc>0</CurrentDisc>

      <CountVisits>0</CountVisits>

      <DateTimePOSUsed>0001-01-01T00:00:00</DateTimePOSUsed>

      <PointsEarn>true</PointsEarn>

      <PointsRedeem>true</PointsRedeem>

      <PricingPercent>0</PricingPercent>

      <PointsPercent>10000</PointsPercent>

      <RedeemPercent>10000</RedeemPercent>

      <TaxTypePlusOne>0</TaxTypePlusOne>

      <MembershipID>0</MembershipID>

      <ImageDataID>0</ImageDataID>

    </AccountFull></XMLData>

    </Header>

    Unsuccessful Get
    Example of an Account which does not exist:

     

    XML Submitted to API

    XML Response from API

    <?xml version="1.0" encoding="utf-8"?>

    <Header>

    <ReqType>AccountFullGet</ReqType>

    <Data1>1024586</Data1>

    <Data2 />

    <Data3 />

    <Data4 />

    <Data5 />

    <Data6 />

    </Header>

    11/02/2016 1:15:23 PM

    <?xml version="1.0" encoding="utf-8"?>

    <Header>

      <ReqType>Error</ReqType>

      <Data1>Account not found</Data1>

    </Header>

    Searching for “AccountID” only.

    Error returned if the account does not exist.

     

    AccountGet

    Purpose

    This retrieves basic account information. 

    Request

                Field Name            Data

    Req.

    Description

    REQTYPE

    AccountGet

    M

     

    Data1

    AccountID

    *

    This is the accounts unique identifier in the database.

    Data2

    AccNumber

    *

    This is the account number.

    Data3

    CardNumber

    *

    This is the account card number.

    Data4

    PhoneNumber

    *

    This will match Mobile, Home or Work phone numbers

    Data5

    Email

    *

    This will match against Email1 or Email2

    Data6

     

     

    This field is not in use.

    ClassName

     

     

    Leave this blank.

    XMLDATA

     

     

    Leave this blank.

     

    Response      

    Field Name

    Data

    Description

    REQTYPE

    AccountGet

     

    Data1

     

    No data will be returned in these fields.

    Data2

     

    Data3

     

    Data4

     

    Data5

     

    Data6

     

    ClassName 

    Account

    This is the class that is returned.

    XMLDATA

     

    This is the response detail data in XML format.