Golf Range Servant Integration

Home » Golf » Golf Range Servant Integration
Golf, Range Servant No Comments

API Document

Range Servant software integration APIx

Integration

Step 1: Customer wants to buy 100 balls.
Step 2: Our POS software identifies who the customer/member is and records the payment and add 100 balls credit to the person.
Step 3: Our software then generated a barcode and print it out for the customer.
Step 4: Customer walks to the RangeServant, scans the barcode.
Step 5: RangeServants sends a “validaterangeid” API call to our software via TCP on specific port.
Step 6: Our software respond the API call. If barcode is valid then we replied RangeOk=1. RangeServant then dispense 100 balls.
Step 7: After successful dispense, RangeServant then sends a “SetRangeUsage” API call to our software.
Step 8: Our software then remove the 100 balls credit since it is successfully dispensed.

Q&A

  • Can RangeServant API call our cloud server via Internet or can it only call a server on local area network?
I’m guessing yes, I don’t see why it shouldn’t as it is all tcp/ip, but it should definitely be tested.
  • If customer has 100 balls available from a barcode scan, can he/she choose how many balls to dispense or does it have to dispense in full eg 100 balls?
Yes and no. The dispenser has a setting that is called ‘direct dispense’. With it enabled it will dispense any barcode directly without user interaction. (it will use Number1/Price1) If it is disabled the customer will be presented with the choices you send and will have to make selection on the touch screen. The setting is global and is either on or off for all barcodes.
  • Does API call has a timeout? eg if you don’t get a response within 60seconds then it becomes unsuccessful? Or is this just standard socket timeout?
The screen has a timeout of about 30sec if a reply is received, and the socket I think has about 15sec.

Simulator EXE

Download the simulator below

INTEGRATION DEMO no exe

Rename the “.ex_” file to “.exe”. Edit “config.ini” to configure the listening host & port. Use IP address for host.

“ngrok” might be handy for local testings.

Sample Code in Delphi

socketcomm.pas

Contact Details

Peter Melin
Development engineer
Range Servant AB
Skallebackavägen  11
30241 Halmstad
Sweden
Phone: +46 35 10 92 40
Direct: +46 35 15 29 54
Email: [email protected]