SDK Functionality

The Pensa library is a lightweight SDK that simplifies interactions through straightforward method calls. This SDK enables you to:

  • Locate stores: Easily find the stores you're looking for.

  • Access stores directly: Use global store IDs to access a specific store and initiate a scan directly.

  • View store history: Conveniently access a list of previously visited stores.

  • Monitor scan uploads: Track the upload status of your scans.

Before using the SDK methods below, make sure to import the required functions:

import {
  showShelfScans,
  showProductScans,
  showStoreSearchView,
  showStoresScreen,
  showScanArea,
  showStockingScreen,
  showStoreChecklist,
} from 'pensa-sdk-react-native';

Searching Stores

To initiate a store search using the Pensa SDK, integrate the following code snippet:

This will present a search interface where you can input keywords (e.g., store name, location) to find the desired store. Upon selecting a store from the search results, the SDK will automatically redirect you to that store's details, allowing you to begin a scan.

Accessing Stores Directly with Global Store IDs

The Pensa SDK lets you directly access a store and initiate a scan using its global store ID. To do this, use the showStoreChecklist method:

Sending Custom Parameters with Scans

In addition to using global store IDs, the Pensa SDK allows you to send custom parameters along with your scans. This can be useful for including company-specific information or metadata.

To send custom parameters, use the sectionKey and guid parameters in the showStoreChecklist method.

Recently Visited Stores

The Pensa SDK maintains a cache of recently visited stores for easy access and reuse. This allows you to quickly return to a previously scanned store without searching for it again.

Adding Stores to the Cache

A store is automatically added to the "Recently Visited Stores" cache when you:

  • Use the showStoreChecklist() method to access a store.

  • Select a store from the search results after using showStoreSearchView().

Accessing Recently Visited Stores

To display the "Recently Visited Stores" screen, use the following code:

This will present a screen listing the recently visited stores. You can select a store from this screen to access its details and initiate a new scan.

Monitoring Scan Uploads

The Pensa SDK provides convenient methods to monitor the progress of your scan uploads. There are two separate methods depending on the type of scan:

Shelf Scans

To monitor shelf scan uploads, use the following method:

Product Scans

Both methods present a screen that displays the status of each scan upload. You can use these screens to:

  • Track upload progress: Observe the progress of ongoing uploads.

  • View completed uploads: See a history of successfully uploaded scans.

  • Cancel uploads: Stop the upload of any scan that is in progress.

These features give you complete control over your scan uploads and ensure you're always informed about their status.

Stocking Screen

The Pensa SDK allows you to access the stocking screen. This screen is used to review and manage stock actions related to the selected store.

Scan Area

To directly open a scan area, you must provide a scanId and either a storeId or a globalStoreId.:

This method allows you to navigate directly to a scan area without going through the store selection flow.

Last updated

Was this helpful?