Embedding Spaaza’s Store App in a POS system
POS vendors can embed the Spaaza Store web application into their POS system. This allows them to leverage features like search, customer creation, customer editing, reward selection and omnichannel order history without building these features into their own POS software (a POS vendor can also use Spaaza’s API directly is this is preferable and access the same functionality in Spaaza Store programmatically if that is preferred).
Spaaza has also built integration points to make Spaaza Store work seamlessly with a POS system. These integration points are described below:
Logging in with an existing POS user session
Normally a staff member is required to login with a Spaaza account to access Spaaza Store. A POS system can log a user, under the assumption that they are already logged into the POS system.
This is done by sending the following header when requesting pages from Spaaza Store:
Header name: X-Spaaza-Aux-Session
Header value: user_id:session key
Where user_id is the ID of the POS user and session_key is the value returned from the Spaaza Login API.
Spaaza Store has events which a POS system can “listen” for and then use these to trigger some action in the POS software. For example when a customer is selected in Spaaza Store the POS Software could retrieve all vouchers for that customer in the background using the Spaaza API.
The following events are available:
SelectCustomerSearchResults: this event is triggered when a customer is selected in the search results.
CloseCustomerPage: this event is triggered when the customer page is closed in Spaaza Store.