This folder contains scripts and other artifacts used to install the Olo Intercepts at a customer site. The build will copy these into the 
Artifacts zip that we distribute to the customer site. It contains files for two types of installations: BOH via a Manifest and manually on the FOH 
terminals. Installing with the Manifest is the preferred method of installation.

## Manifest

RAL is the application that completely manages configuration of an entire Aloha installation. When a terminal boots, it launches RAL which then 
takes whatever steps are necessary to configure the terminal to the expected state. RAL allows 3rd parties to hook into this process via Manifests.
These files tell RAL how to install and configure a 3rd party application on the terminals. 

We've created a Manifest that can be installed on a site's BOH server. After it's been enabled, RAL takes over responsibility for installing the
Olo Intercepts. We followed [this](https://drive.google.com/file/d/1TKf_NnLHrfhnsq69BgTsqgiqDGIY0mbC/view?usp=drive_link) guide to create the Manifest.
After creating the appropriate XML, you send it to NCR and they send you back an encrypted version. If we ever need to update the Manifest, please be
sure to commit both the encrypted and unencrypted version.

To install the Manifest at a site, follow the steps below.

1. Log on to the BOH machine.
1. Copy Artifacts-Release.zip to the machine and unzip it.
1. Edit the config file (`Olo.AlohaIntercepts.dll.config`) as needed.
1. Locate the Aloha BIN folder and Manifests folder. The defaults are `C:\BootDrv\Aloha\BIN` and `C:\BootDrv\Aloha\EXTDATA\Manifests`.
1. If the site's BIN and Manifests folders are the default, then with administrator privileges, run `Install-InterceptsOnBOH.bat`. 
	* If you need to use different folders, change the command to `Install-InterceptsOnBOH.bat <BIN_FOLDER_PATH> <MANIFESTS_FOLDER_PATH>`.
1. Open RAL Admin-> Manifests and add the Manifest to RAL. Once the row is added, select the terminals you want it to be installed at.
1. Save everything and exit RAL Admin.

The Intercepts will have also have to be enabled in CFC before they will be loaded. To so, follow the steps below.

1. Open CFC and navigate to Maintenance -> Business -> Store -> Store Settings -> System.
1. In the Interfaces section, find an empty "External integrated software component" row and enter "Olo.AlohaIntercepts" in the text box. 
1. Click Maintenance -> POS -> Refresh POS and All Installed Products. 

The next time RAL runs on the affected terminals, the Olo Intercepts will be installed.

## FOH

If the Manifest file can't be used at a given site, then you can use `Install-InterceptsOnFOH.ps1` to manually install on each terminal.

On each temrinal:
1. Copy Artifacts-Release.zip to the machine and unzip it.
1. Edit the config file (`Olo.AlohaIntercepts.dll.config`) as needed.
1. Run `powershell.exe -executionpolicy bypass -nologo -noprofile -file "Install-InterceptsOnFOH.ps1" [-BinPath <BIN_PATH>]`.

The Intercepts will also need to be enabled in CFC as shown in the Manifest steps.