DeprecatedNext-generation platform

Integrating peripheral devices

You can set up integration between Sterling Store Engagement and peripheral devices such as bar code scanners.

Note: The information provided in this topic is relevant to Angular version 11 Sterling Store Engagement and needs to be updated for Angular version 15.

Need for integration with peripheral devices

Most of the store operations involve scanning bar codes for products, location and so on. Additionally, Sterling Store Engagement interacts with payment devices, respond to notifications, and so on. Therefore, it is necessary that Sterling Store Engagement responds to events from external devices/services such as scanners.

Solution

Only applications that are native to a device or a platform can communicate directly with peripheral devices such as bar code scanners. However, hybrid applications make it possible to embed standard web applications inside a native container so that they can communicate with external devices. Therefore, we can embed the Sterling Store Engagement inside a native wrapper application using hybrid technology.

Supporting features in the application

To support integration with peripheral devices, Sterling Store Engagement provides the following components by default:
  • BarcodeScannerService service. Provides a utility method called placeBarcodeToElement to pass the bar code data to the application screens.
  • BarcodeScannerDirective directive. Is used as an attribute to the input field for listening to bar code scanner events. Refer JavaScript documentation for more information.
  • CordovaService service. Provides a utility method called registerPluginInitialization to register the plugin initialization code.