public class EcommerceTransaction extends AbstractEvent
Implementation note: EcommerceTransaction/EcommerceTransactionItem uses a legacy design. We aim to deprecate it eventually. We advise using SelfDescribing events instead, and attaching the items as entities. The specific items purchased in the transaction must be added as EcommerceTransactionItem objects. This event type is different from the others in that it will generate more than one tracked event. There will be one "transaction" ("tr") event, and one "transaction item" ("ti") event for every EcommerceTransactionItem included in the EcommerceTransaction. To link the "transaction" and "transaction item" events, we recommend using the same orderId for the EcommerceTransaction and all attached EcommerceTransactionItems. To use the Currency Conversion pipeline enrichment, the currency string must be a valid Open Exchange Rates value.
| Modifier and Type | Class and Description |
|---|---|
static class |
EcommerceTransaction.Builder<T extends EcommerceTransaction.Builder<T>> |
context, subject, trueTimestamp| Modifier | Constructor and Description |
|---|---|
protected |
EcommerceTransaction(EcommerceTransaction.Builder<?> builder) |
| Modifier and Type | Method and Description |
|---|---|
static EcommerceTransaction.Builder<?> |
builder() |
java.util.List<EcommerceTransactionItem> |
getItems()
The list of EcommerceTransactionItems passed with the event.
|
TrackerPayload |
getPayload()
Returns a TrackerPayload which can be passed to an Emitter.
|
getContext, getSubject, getTrueTimestamp, putTrueTimestampprotected EcommerceTransaction(EcommerceTransaction.Builder<?> builder)
public static EcommerceTransaction.Builder<?> builder()
public TrackerPayload getPayload()
getPayload in interface EventgetPayload in class AbstractEventpublic java.util.List<EcommerceTransactionItem> getItems()