Code Interpreter
A Code Interpreter is responsible for determining if a scanned, linked, or otherwise provided, code has any specific meaning and what, if any, consequences triggering the code should have.
This can be used for many things, for example:
- Coupon codes providing discounts
- Loyalty-only identity codes on kiosk
- Promotion codes providing discounts
- Marketing tracking codes which tracks how many, and potentially which, users use a specific marketing code
What is a Code Interpreter?
A Code Interpreter is software which provides an HTTP endpoint which Future Ordering will call when a code which needs to be interpreted is triggered.
The Code Interpreter, once asked what a code means, is reponsible for deciding what the code means, perform any potential background actions which should be taken as part of interpreting the code and responding with a list of actions which the UI should perform as a result of interpreting the code. Such UI action could include, but is not limited to, showing a modal dialog, requiring that the user is logged in or animating and adding a product to the basket.
Who can create a Code Interpreter?
A web agency, an IT partner, an internal IT department or Future Ordering can create Code Interpreters.
Code interpreters are likely to be integrations to the loyalty system used. Anyone with the capacity to expose an HTTP endpoint to the outside can create a Code Interpreter, but in order to be used it needs to be configured in Future Ordering.
How do I get my Code Interpreter configured to be used?
Once a Code Interpreter endpoint has been exposed, contact Future Ordering support and provide the endpoint which should be called, as well as provide information about whether you want to use OAuth or Basic Authentication for authenticating the communication.
Remember that to be able to calculate discounts, webhook configuration, which can be done in the Future Ordering Navigator portal, is needed. See the article on handling deals for more information.
Which codes trigger a Code Interpreter?
Any code which is triggered, and is not configured on any product in the current menu to be a barcode, will be send to Code Interpreters.
Examples
- Example: identity code in kiosk - an example combining a Code Interpreter, discount calculations and frontend plugins to allow guests to scan a QR code for identifying their loyalty connection on a kiosk