Tracking nested orders in CJA | Community
Skip to main content
bsimoes-lcg
Level 2
June 13, 2024
Solved

Tracking nested orders in CJA

  • June 13, 2024
  • 1 reply
  • 553 views

We have a scenario where the final transaction is composed of multiple orders, and each order has it's related products.

The customer can choose different payment methods or financing options for each order (based on product category) in a single checkout.

The structure is similar to this:

  • Transaction
    • transactionId
    • totalValue
    • ...
    • Orders[]
      • orderId
      • paymentType
      • financingMethod
      • ...
      • Products[]
        • SKU
        • price
        • ...

All that data is captured as an event via Web SDK.

 

I was wondering how to create a Schema that could represent that format, while at the same time allowing us to send Product events that are not related to an Order (such as ProdView, CartAdd, ...).

 

The end goal is to allow breakdowns in CJA of Transaction by Order by Products, and allow me to use the same Product dimension associated with all the metrics for the Product funnel (ProdViews, CartAdds, Orders, Transactions) at the same time.

 

We thought of some options:

  1. Referencing IDs (like a lookup table using a non-people id) within the same event Dataset
    • it did not work: if I send an event with 2 Orders and 2 Products each, CJA associates all products to all orders
  2. Creating a secondary Product array within the Orders Array, and feeding both of them on Order Confirmation
    • Not the best user experience, since the user will have two separate Product dimensions depending on the use-case
  3. Flattening the orders array in each product somehow
    • We would have to compromise some information and breakdown possibility
  4. Sending Orders to a separate Dataset as a lookup table for Products
    • It adds a lot to the complexity of data collection

 

Anyone stumbled upon this or have any idea on how to approach this problem?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Anil_Umachigi

@bsimoes-lcg Had done something similar, we will probably need a good discussion to come to a solution but here are some thoughts to get started. 

 

  • Would recommend taking a step back and design (or make changes) to the datalayer which forms the foundation of schema. 
  • We had a similar usecase where customers could pay using card, points and gift card in one transaction for various products, we realised passing each of these context details (payment type by product, amount, product details) in datalayer helps designing schema easier  
  • The product array will be key, add custom field group to add all the above details. 
  • In addition if you want to associate related products pre transaction ( Prod view, cartAdd etc events ), you might want to consider passing the product details with original product ( assuming they are a packaged products) view. 

 

Good luck! Would love to try recreating this when i get time.

 

Anil

Anil

1 reply

Anil_Umachigi
Adobe Employee
Anil_UmachigiAdobe EmployeeAccepted solution
Adobe Employee
June 14, 2024

@bsimoes-lcg Had done something similar, we will probably need a good discussion to come to a solution but here are some thoughts to get started. 

 

  • Would recommend taking a step back and design (or make changes) to the datalayer which forms the foundation of schema. 
  • We had a similar usecase where customers could pay using card, points and gift card in one transaction for various products, we realised passing each of these context details (payment type by product, amount, product details) in datalayer helps designing schema easier  
  • The product array will be key, add custom field group to add all the above details. 
  • In addition if you want to associate related products pre transaction ( Prod view, cartAdd etc events ), you might want to consider passing the product details with original product ( assuming they are a packaged products) view. 

 

Good luck! Would love to try recreating this when i get time.

 

Anil

Anil