coco-react-native-sdk

Contextual Commerce SDK React-Native Wrapper

This project houses a react-native library to be utilized from within react-native mobile applications to make it easy to communicate with Contextual Commerce servers.

The coco-react-native-sdk module is the main interface for functions to be called by your application. See the documentation for each of these functions for details, as well as the quick start guide below for an overview of how each function fits into the API as a whole.

Follow the Installation Checklist. The checklist includes a list of every step you might require, with details on exactly how to implement it. Make sure you implement all the required steps, and as many optional steps as necessary for your case.

  • Make sure you include the following includes in your project's settings.gradle file:
      includeBuild('../node_modules/coco-react-native-sdk/android/granify-sdk')
    includeBuild('../node_modules/coco-react-native-sdk/android')

When the shopper returns after hiding or suspending the app, or returns after idling for long periods of time (greater than 30 minutes), communication with the Contextual Commerce servers may have ceased. In this case the shopping session has become inactive and a new session will be created.

On session start, the SDK will re-send its most recent cached information about the shopper (i.e. shopper id, cart, and wish list information) to the server to initialize the new session's data. It is important however to call any of the Contextual Commerce session tracking functions with updated information if it may have been changed while the app was idle or suspended. For example, if a shopper's cart is synced with their account across multiple devices, changes made on other devices will require trackCart(...) to be called when the app becomes aware of the change to the cart.

Information specific to the shopper's current session will not be cached and automatically sent to the Contextual Commerce servers on app resume. Therefore, it is important to call the appropriate API functions (trackProduct(...), and setCurrentProduct(...)) explicitly with the information for the app view that loads when resuming from a suspended state.

Privacy and Data Protection is very important to Bazaarvoice. We take every effort to make sure the data we collect is secure, and we never, ever sell the information to anyone else. Bazaarvoice is fully compliant with GDPR, CCPA and other Data Protection legislation. If your app complies with any of these systems, your company's contract with Bazaarvoice will clearly define the roles played by both parties.

For the most part, Contextual Commerce does not collect personally identifiable information about shoppers. We care about how many times they look at a product, or what they add to their cart, but we don't want or need to know who they are. We don't collect names, addresses, email addresses or any such information.

We do, however, link all the shoppers' actions together using a shopperId that you give us. It is important that you refrain from using any personally identifiable data as the shopperId; don't use the email address, for example. It should be impossible to identify who the shopper is from the ID. Ideally, this should not even be the unique primary key you use to identify the shopper either, but a new, unique code just for Contextual Commerce.