# Nearily for iiko

An iikoFront plugin that runs Nearily loyalty right on the till. The barista enters the guest's code on the order screen — the visit is counted, and a due reward is applied to the open order as a discount.

HTML version: https://nearily.com/iiko

## Download

- Plugin: https://nearily.com/downloads/nearily-iiko-plugin.zip
- Short link: https://neari.ly/ikd

## What it does

- A Nearily button on the iikoFront order screen — one tap from the order
- The barista enters the guest's 4-digit code or phone number, or scans their QR — the visit is counted
- When a reward is due, the till offers it: a free drink or cashback lands on the open order as a discount
- Loyalty rules come from the Nearily server and refresh on their own — no visits to the till, no restarts

## Install

1. Download and extract the archive — inside is a `Nearily` folder with the plugin and a short install note.
2. Copy the whole `Nearily` folder into `C:\Program Files\iiko\iikoRMS\Front.Net\Plugins\Nearily\`. The path may differ per installation — what matters is that it lands in your iikoFront's `Plugins` folder.
3. Close iikoFront completely and open it again — the plugin loads only at startup.
4. Open an order — a Nearily button appears on the order screen. If the settings are not filled in yet, the button itself tells you what is missing.

## Setup

1. Request access from Nearily (hello@nearily.com or your partner manager). We register the cafe on the platform and issue the till's credentials: the cafe id and a secret key, issued once per cafe.
2. In the plugin folder, rename `config.example.json` to `config.json` and fill in the two values you received — `cafeId` and `sharedSecret`. Leave `baseUrl` as it is.
3. In iikoOffice (Retail sales → Discount and surcharge types) create two entries, both with the "can be applied manually" checkbox: a fixed discount for the free drink and a flexible-sum discount for cashback. Send the GUID of each to Nearily — they are configured centrally, nothing goes into `config.json`.
4. Everything else the plugin fetches from the Nearily server at startup and keeps refreshing while the till runs.

## Notes

- Runs inside iikoFront 8.x on the till — no extra hardware, no tablets at the counter
- The till needs internet access to reach Nearily; settings are cached, so a brief outage does not break the button
- If the button is missing: the folder is in the wrong place, config.json is missing or has a typo, or iikoFront was not restarted — details are in the iikoFront log (`Front.Net\Logs`)

## Also see

- Cafe+ (the partner product): https://nearily.com/cafe-plus
- Partner cafes: https://nearily.com/cafes

## Support

- Email: hello@nearily.com
