--- title: "Products and Orders" slug: "mapp-intelligence-ios-sdk-v5-products-and-orders" updated: 2026-04-30T11:47:33Z published: 2026-04-30T11:47:33Z canonical: "docs.mapp.com/mapp-intelligence-ios-sdk-v5-products-and-orders" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # Products and Orders E-commerce tracking captures the shopping flow in your iOS app — from product views and add-to-cart actions to purchases. Build an `MIEcommerceParameters` object containing one or more `MIProduct` entries and attach it to a page or action event. Before you start, complete the [Quickstart](/v1/docs/mapp-intelligence-ios-sdk-v5-quickstart) so the SDK is initialized. --- ## How it works E-commerce data has no dedicated `track…` method. Instead, you attach `MIEcommerceParameters` to an existing event: - `MIPageViewEvent` — see [Pages](/v1/docs/mapp-intelligence-ios-sdk-v5-pages) - `MIActionEvent` — see [Events](/v1/docs/mapp-intelligence-ios-sdk-v5-events) The combination of `status` and the screen on which you send the event determines what kind of e-commerce step is recorded (view, add-to-cart, purchase, …). --- ## MIEcommerceParameters | Property | Description | | --- | --- | | `products` | Array of `MIProduct` entries that describe the products in this event. | | `status` | `MIStatus` enum (raw values in parentheses): - `noneStatus` (0) — no e-commerce status - `addedToBasket` (1) - `purchased` (2) — order confirmation - `viewed` (3) — product / list view - `deletedFromBasket` (4) - `addedToWishlist` (5) - `deletedFromWishlist` (6) - `checkout` (7) | | `currency` | ISO currency code (for example `"EUR"`, `"USD"`). | | `orderID` | Unique identifier of the order (used with `purchased` status). | | `orderValue` | Total order value as `NSNumber`. | | `returningOrNewCustomer` | Flag for new vs returning customer. | | `returnValue` | Value of returned items. | | `cancellationValue` | Value of cancelled items. | | `couponValue` | Coupon discount applied to the order. | | `paymentMethod` | Selected payment method. | | `shippingServiceProvider` | Carrier name. | | `shippingSpeed` | Shipping speed (for example `"standard"`, `"express"`). | | `shippingCost` | Shipping cost. | | `markUp` | Markup value. | | `orderStatus` | Free-text order status string. | | `customParameters` | Dictionary of numbered custom e-commerce parameters. | --- ## MIProduct | Property | Description | | --- | --- | | `name` | Product name (typically SKU). | | `cost` | Product price as `NSNumber`. | | `quantity` | Quantity of this product in the event. | | `productAdvertiseID` | Advertise ID for the product. | | `productSoldOut` | Whether the product is sold out. | | `productVariant` | Variant identifier (for example `"red-large"`). | | `categories` | Dictionary of numbered product categories. | | `ecommerceParameters` | Dictionary of numbered product-level custom parameters. | --- ## Examples ### Track a product view Attach an `MIEcommerceParameters` with status `.viewed` to the page event for a product detail screen. **Swift** ```swift let product = MIProduct(dictionary: [:]) product.name = "SKU-12345" product.cost = 49.90 product.quantity = 1 let ecommerce = MIEcommerceParameters() ecommerce.products = [product] ecommerce.status = .viewed ecommerce.currency = "EUR" let pageEvent = MIPageViewEvent(name: "Product Detail") pageEvent.ecommerceParameters = ecommerce MappIntelligence.shared()?.trackPage(pageEvent) ``` **Objective-C** ```objectivec MIProduct *product = [[MIProduct alloc] initWithDictionary:@{}]; product.name = @"SKU-12345"; product.cost = @49.90; product.quantity = @1; MIEcommerceParameters *ecommerce = [[MIEcommerceParameters alloc] init]; ecommerce.products = @[product]; ecommerce.status = viewed; ecommerce.currency = @"EUR"; MIPageViewEvent *pageEvent = [[MIPageViewEvent alloc] initWithName:@"Product Detail"]; pageEvent.ecommerceParameters = ecommerce; [[MappIntelligence shared] trackPage:pageEvent]; ``` ### Track an order confirmation Use status `.purchased` together with `orderID` and `orderValue` on the confirmation screen — once per successful order. **Swift** ```swift let ecommerce = MIEcommerceParameters() ecommerce.products = orderedProducts // [MIProduct] ecommerce.status = .purchased ecommerce.orderID = "order-2026-04-28-0001" ecommerce.orderValue = 149.70 ecommerce.currency = "EUR" ecommerce.paymentMethod = "credit_card" let pageEvent = MIPageViewEvent(name: "Order Confirmation") pageEvent.ecommerceParameters = ecommerce MappIntelligence.shared()?.trackPage(pageEvent) ``` **Objective-C** ```objectivec MIEcommerceParameters *ecommerce = [[MIEcommerceParameters alloc] init]; ecommerce.products = orderedProducts; // NSArray * ecommerce.status = purchased; ecommerce.orderID = @"order-2026-04-28-0001"; ecommerce.orderValue = @149.70; ecommerce.currency = @"EUR"; ecommerce.paymentMethod = @"credit_card"; MIPageViewEvent *pageEvent = [[MIPageViewEvent alloc] initWithName:@"Order Confirmation"]; pageEvent.ecommerceParameters = ecommerce; [[MappIntelligence shared] trackPage:pageEvent]; ``` > [!NOTE] > Use the `purchased` status only on the order confirmation screen, after a successful purchase. Sending `purchased` multiple times for the same order leads to inflated revenue numbers. --- ## Related - [Quickstart](/v1/docs/mapp-intelligence-ios-sdk-v5-quickstart) - [Object Oriented Tracking](/v1/docs/mapp-intelligence-ios-sdk-v5-object-oriented-tracking) - [Pages](/v1/docs/mapp-intelligence-ios-sdk-v5-pages) - [Events](/v1/docs/mapp-intelligence-ios-sdk-v5-events)