---
title: "Models (React Native) "
id: "models"
project: "Contextual Commerce"
url: "https://docs.bazaarvoice.com/articles/contextual-commerce/models"
updated: 2026-10-15T09:12:54Z
---

# Models \(React Native\) 

* [Carter](/articles/contextual-commerce/models/a/h3__235978437)
* [DiscountCode](/articles/contextual-commerce/models/a/h3_651501256)
* [MatchingGroup](/articles/contextual-commerce/models/a/h3_1791903336)
* [Navigator](/articles/contextual-commerce/models/a/h3_891063211)
* [Order](/articles/contextual-commerce/models/a/h3__784112042)
* [PageIdentifier](/articles/contextual-commerce/models/a/h3_661090534)
* [Product](/articles/contextual-commerce/models/a/h3__1792473877)
* [ProductReviews](/articles/contextual-commerce/models/a/h3__115697942)
* [QuantityProduct](/articles/contextual-commerce/models/a/h3__1298924654)

### Carter

Defines callbacks that Contextual Commerce can call to add a product to the cart. Implement this interface using whatever mechanism your app requires to add a product to the cart.

See more
 * * *
 
##### Constructors 
 
```
new Carter(): Carter

```
 
Returns: Carter
 
* * *
 
##### Methods 

`addCurrentProductToCart()`
 Adds the current product to the cart. When invoked, the current product should be added to the cart or some indication should occur to notify the shopper of any selections that must first be made before the item can be added to the cart.
 
The intention here is that the “Add To Cart” button in the Contextual Commerce campaign should exactly mirror the user adding the current product to their cart from elsewhere in the app, given the selections currently made.
 
Declaration:
 
```
addCurrentProductToCart(): void

```
 
Returns: void

### DiscountCode

Declaration:


```
interface DiscountCode {
amount: number;
code: string;
}

```
 
Represents an order discount code.

See more
 * * *
 
##### Properties 

`amount`
 The discounted amount.
 
Declaration:
 
```
amount: number

```


`code`
 The discount code string. Typically this is some coupon or promo code string entered by the user to apply the discount to the order.
 
Declaration:
 
```
code: string

```


###  MatchingGroup

Declaration:


```
enum MatchingGroup

```
 
Matching groups that a shopper may be assigned to.

Contextual Commerce configures each site to allow only certain matching groups to be used. Contact your account manager if you are uncertain which values are valid in your case.

See more
 * * *
 
##### Enumeration members 

`BASELINE`
 Baseline group that will not be shown any message that the engine may match.
 
This uses the default (baseline) single-match engine.
 
Declaration:
 
```
BASELINE

```


`BASELINE_B`
 Baseline group 'B' used for A/B tests between two default groups on a site (alongside the `baseline` group).
 
This uses the default (baseline) single-match engine.
 
Declaration:
 
```
BASELINE_B

```


`BASELINE_MULTI_MATCH`
 Baseline group that will not be shown any messages that the engine may match.
 
This uses the (baseline) multi-match engine, utilizing the single-match engine but with a second layer running in tandem to allow for multi-match configured campaigns to match at will.
 
Declaration:
 
```
BASELINE_MULTI_MATCH

```


`BASELINE_MULTI_MATCH_B`
 Baseline multi-match group 'B' used for A/B tests between two multi-match groups on a site (alongside the `baselineMultiMatch` group).
 
This uses the (baseline) multi-match engine.
 
Declaration:
 
```
BASELINE_MULTI_MATCH_B

```


`BASELINE_MULTI_MATCH_V1`
 The same as `baselineMultiMatch` but using an updated MultiMatch Engine.
 
Declaration:
 
```
BASELINE_MULTI_MATCH_V1

```


`BASELINE_MULTI_MATCH_V2`
 This uses the (baseline) updated multi-match engine, utilizing the predictions first single-match engine but with a second layer running in tandem to allow for multi-match configured campaigns to match at will.
 
Declaration:
 
```
BASELINE_MULTI_MATCH_V2

```


`GRANIFY`
 Active group that will be shown any single message that the engine may match.
 
This uses the default single-match engine.
 
Declaration:
 
```
GRANIFY

```


`GRANIFY_B`
 Granify group 'B' used for A/B tests between two default groups on a site (alongside the `granify` group).
 
This uses the default single-match engine.
 
Declaration:
 
```
GRANIFY_B

```


`GRANIFY_MULTI_MATCH`
 Active group that will be shown any messages the engine may match.
 
This uses the multi-match engine, utilizing the single-match engine but with a second layer running in tandem to allow for multi-match configured campaigns to show whenever they are matched.
 
Declaration:
 
```
GRANIFY_MULTI_MATCH

```


`GRANIFY_MULTI_MATCH_B`
 Granify multi-match group 'B' used for A/B tests between two multi-match groups on a site (alongside the `granifyMultiMatch` group).
 
This uses the multi-match engine.
 
Declaration:
 
```
GRANIFY_MULTI_MATCH_B

```


`GRANIFY_MULTI_MATCH_V1`
 The same as `granifyMultiMatch` but using an updated MultiMatch Engine.
 
Declaration:
 
```
GRANIFY_MULTI_MATCH_V1

```


`GRANIFY_MULTI_MATCH_V2`
 This uses the updated multi-match engine, utilizing the predictions first single-match engine but with a second layer running in tandem to allow for multi-match configured campaigns to show whenever they are matched.
 
Declaration:
 
```
GRANIFY_MULTI_MATCH_V2

```


`GRANIFY_PLATFORM`
 Active Granify platform group that will be shown any messages that the engine may match.
 
This uses the Granify platform engine, allowing multiple child engines to be configured per-tool pair.
 
Declaration:
 
```
GRANIFY_PLATFORM

```


`HOLDOUT_PLATFORM`
 Baseline Granify platform group that will not be shown any messages that the engine may match.
 
This uses the Granify platform engine, allowing multiple child engines to be configured per-tool pair. This matching group functions as a top-level holdout, so messages are not displayed even for eligible tool pairs.
 
Declaration:
 
```
HOLDOUT_PLATFORM

```


`PAUSED_BASELINE`
 Used to explicitly identify legacy traffic configured in rules to only match to 1-pixel test only during an active period. Group or matching pair can be used to filter paused traffic in reporting for billing and performance purposes.
 
Declaration:
 
```
PAUSED_BASELINE

```


`PAUSED_GRANIFY`
 Used to explicitly identify legacy traffic configured in rules to only match to 1-pixel test only during an active period. Group or matching pair can be used to filter paused traffic in reporting for billing and performance purposes.
 
Declaration:
 
```
PAUSED_GRANIFY

```


`PREDICTIONS_FIRST_BASELINE`
 A predictions first matching engine which allows ongoing predictions.
 
Declaration:
 
```
PREDICTIONS_FIRST_BASELINE

```


`PREDICTIONS_FIRST_GRANIFY`
 A predictions first matching engine which allows ongoing predictions.
 
Declaration:
 
```
PREDICTIONS_FIRST_GRANIFY

```


###  Navigator

Declaration:


```
interface Navigator {
cartNavigationCallback: (() => void);
productNavigationCallback: ((productId: string, sku?: string) => void);
}

```
 
Stores callbacks to navigate to different pages on your application.

See more
 * * *
 
##### Properties 

`cartNavigationCallback`
 A callback that navigates to the cart page of your application.
 
Declaration:
 
```
cartNavigationCallback: (() => void)

```


`productNavigationCallback`
 A callback that navigates to a specific product page in your application.
 
This callback takes in a string product ID and an optional string sku as arguments. If a SKU is passed in, the callback should navigate to the product page with that sku selected.
 
Declaration:
 
```
productNavigationCallback: ((productId: string, sku?: string) => void)

```


###  Order

Declaration:


```
interface Order {
currency: string;
discountCodes: DiscountCode[];
lineItems: QuantityProduct[];
lineItemsTotal: number;
orderNumber: string;
subtotal: number;
total: number;
totalShipping: number;
totalTax: number;
}

```
 
Represents an order placed on the site.

See more
 * * *
 
##### Properties 

`currency`
 The local currency used for prices. Must be “USD”, unless another currency has been agreed upon by Bazaarvoice.
 
Declaration:
 
```
currency: string

```


`discountCodes`
 A list of discounts applied to this order. If no discounts are applicable, this should be an empty array.
 
Declaration:
 
```
discountCodes: DiscountCode[]

```


`lineItems`
 The products in the order and their corresponding ordered quantities.
 
Declaration:
 
```
lineItems: QuantityProduct[]

```


`lineItemsTotal`
 The total value of all items in the cart before any discounts, taxes and shipping, but after sale pricing.
 
Declaration:
 
```
lineItemsTotal: number

```


`orderNumber`
 The unique identifier for this order.
 
Declaration:
 
```
orderNumber: string

```


`subtotal`
 The total value of the items in the order after discounts but before shipping or taxes. This should match the order total you use in your own analytics.
 
Declaration:
 
```
subtotal: number

```


`total`
 The total price (after discounts) including shipping and possibly taxes.
 
Declaration:
 
```
total: number

```


`totalShipping`
 The total value of any shipping costs applied to this order.
 
Declaration:
 
```
totalShipping: number

```


`totalTax`
 The total value of any taxes applied to this order.
 
Declaration:
 
```
totalTax: number

```


###  PageIdentifier

Declaration:


```
interface PageIdentifier {
pageType: PageType;
path: string;
}

```
 
Contains information about a page’s type and its unique path.

See more
 * * *
 
##### Properties 

`pageType`
 The PageType of the current page.
 
Declaration:
 
```
pageType: PageType

```


`path`
 The unique path for the page.
 
Declaration:
 
```
path: string

```


###  Product

Declaration:


```
interface Product {
category?: string;
color?: string;
customProperties?: [string: string | number];
image?: string;
price: number;
productId: string;
regularPrice: number;
reviews?: ProductReviews;
size?: string;
sku: string;
stock?: number;
subCategory?: string;
title: string;
url: string;
}

```
 
Represents a distinct Product with basic identifiers, price, and display information, and further optional detailed information.
 
Hierarchy

* Product
    * QuantityProduct

See more
 * * *
 
##### Properties 

`category? `
 The broad category containing this item **** (optional).
 
Declaration:
 
```
category?: string

```


`color?`
 The color of the SKU item (optional).
 
Declaration:
 
```
color?: string

```


`customProperties?`
 Named (keys) custom properties (values with a valid string representation) to be stored and reported to Granify with the product (optional).
 
This is useful for adding additional properties that may be domain-specific to your site and do not fit into any of the existing properties available on this class.
 
Declaration:
 
```
customProperties?: [string: string | number]

```


`image?`
 The address of the product image (optional).
 
Declaration:
 
```
image?: string

```


`price`
 The current unit price of the product (after discount or sale pricing).
 
Declaration:
 
```
price: number

```


`productId`
 The parent ID of the product.
 
Declaration:
 
```
productId: string

```


`regularPrice`
 The regular price of the product before sales or discounts.
 
Declaration:
 
```
regularPrice: number

```


`reviews?`
 The review and rating information for the product (optional).
 
Declaration:
 
```
reviews?: ProductReviews

```


`size?`
 The size of the SKU item (optional).
 
Declaration:
 
```
size?: string

```


`sku`
 The specific SKU of the product/variant.
 
Declaration:
 
```
sku: string

```


`stock?`
 The stock information for the product (optional).
 
Declaration:
 
```
stock?: number

```


`subCategory?`
 Further categorical identification of item (optional).
 
Declaration:
 
```
subCategory?: string

```


`title`
 The name or title of the product.
 
Declaration:
 
```
title: string

```


`url`
 Deep link to app location.
 
Declaration:
 
```
url: string

```


###  ProductReviews

Declaration:


```
interface ProductReviews {
maxRating: number;
minRating: number;
rating: number;
reviewCount: number;
}

```
 
Contains product review and rating information.

See more
 * * *
 
##### Properties 

`maxRating`
 The upper bound of the allowable rating range.
 
Declaration:
 
```
maxRating: number

```


`minRating`
 The lower bound of the allowable rating range.
 
Declaration:
 
```
minRating: number

```


`rating`
 The product rating rounded to two decimal places.
 
Declaration:
 
```
rating: number

```


`reviewCount`
 The number of reviews.
 
Declaration:
 
```
reviewCount: number

```


###  QuantityProduct

Declaration:


```
interface QuantityProduct {
    category?: string;
    color?: string;
    customProperties?: [string: string | number];
    image?: string;
    price: number;
    productId: string;
    quantity: number;
    regularPrice: number;
    reviews?: ProductReviews;
    size?: string;
    sku: string;
    stock?: number;
    subCategory?: string;
    title: string;
    url: string;
}

```
 
Represents a Product with a quantity.

See more
 * * *
 
##### Properties

`category?`
 The broad category containing this item (optional).
 
Declaration:
 
```
category?: string
```


`color?`
 The color of the SKU item (optional).
 
Declaration:
 
```
color?: string
```


`customProperties?`
 Named (keys) custom properties (values with a valid string representation) to be stored and reported to Contextual Commerce with the product. This is useful for adding additional properties that may be domain-specific to your site and do not fit into any of the existing properties available on this class (optional).
 
Declaration:
 
```
customProperties?: [string: string | number]
```


`image?`
 The address of the product image (optional).
 
Declaration:
 
```
image?: string
```


`price`
 The current unit price of the product (after discount or sale pricing).
 
Declaration:
 
```
price: number
```


`productId`
 The parent ID of the product.
 
Declaration:
 
```
productId: string
```


`quantity`
 The number of units.
 
Declaration:
 
```
quantity: number
```


`regularPrice`
 The regular price of the product before sales or discounts.
 
Declaration:
 
```
regularPrice: number
```


`reviews?`
 The review and rating information for the product (optional).
 
Declaration:
 
```
reviews?: ProductReviews
```


`size?`
 The size of the SKU item (optional).
 
Declaration:
 
```
size?: string
```


`sku`
 The specific SKU of the product/variant.
 
Declaration:
 
```
sku: string
```


`stock?`
 The stock information for the product (optional).
 
Declaration:
 
```
stock?: number
```


`subCategory?`
 Further categorical identification of item (optional).
 
Declaration:
 
```
subCategory?: string
```


`title`
 The name or title of the product.
 
Declaration:
 
```
title: string
```


`url`
 Deep link to app location.
 
Declaration:
 
```
url: string
```


[![Provide feedback button](/resources/Storage/contextual-commerce/bv-global/topic-footer-2026/provide-feedback-button.png)](https://docs.google.com/forms/d/1qGZ5rApqDrXO_j6vNzcDihDAOPMEjmUr1alHvcEIbQU/edit)