PiOrder

Package: com.salesforce.marketingcloud.analytics

SDK Version: 11.0.0

Overview 

PiOrder is a data class representing an order object used with the Salesforce Marketing Cloud SDK’s analytics tracking functionality. It implements Parcelable for Android serialization and is specifically designed for tracking cart conversions through the AnalyticsManager.trackCartConversion method.

All fields in this class are required and cannot be null.

Class Declaration 

1data class PiOrder(
2    val cart: PiCart,
3    val orderNumber: String,
4    val shipping: Double,
5    val discount: Double
6) : Parcelable

Inheritance 

  • Implements: android.os.Parcelable

Constructor 

1constructor(
2    cart: PiCart,
3    orderNumber: String,
4    shipping: Double,
5    discount: Double
6)

Parameters 

ParameterTypeDescription
cartPiCartThe shopping cart associated with this order
orderNumberStringThe unique identifier for this order
shippingDoubleThe shipping cost for this order
discountDoubleThe discount amount applied to this order

Properties 

cart 

1@JvmField
2val cart: PiCart

The shopping cart object containing the items in this order.

orderNumber 

1@JvmField
2val orderNumber: String

The unique order number identifying this transaction.

shipping 

1@JvmField
2val shipping: Double

The shipping cost amount for this order.

discount 

1@JvmField
2val discount: Double

The discount amount applied to this order.

Usage 

This class is used in conjunction with AnalyticsManager.trackCartConversion() to track e-commerce order conversions in the Salesforce Marketing Cloud platform.