Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

Issue with Handling orders in AEP

Avatar

Community Advisor

Hello, I have a scenario where I need to store order-related data in Adobe Experience Platform (AEP). I'm uncertain about whether to use the Individual Profile or the Experience Event for this purpose.

  1. If I opt for using the Individual Profile to manage orders, I'll face the challenge of needing to send all previous orders back to the dataset whenever a customer places a new order. This is necessary to ensure that the previous orders aren't overwritten.

  2. Alternatively, if I choose to use the Experience Event, I can easily manage all the orders, including their timestamps. However, there's a potential issue when customers contact customer care to modify their orders, such as upgrading a product. In the Experience Event approach, I'll end up with two identical orders: one made online and the other updated by customer care. As a result, when retrieving all the active bookings for the customer, it will show as two bookings, even though there is only one booking that has been updated.

Could you please provide guidance on how to address this situation in AEP?

 

CC: @arijitg @Danny-Miller @Anil_Umachigi 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@dwright @_Manoj_Kumar_ , thanks for the help, I found a way of handling this via a scheduled query which is deduplicating the events and then calculating the average of bookings and later inserting it into a profile as a profile attribute.

 

It comes with a drawback of time taken, but is fine for my client usecase.

View solution in original post

11 Replies

Avatar

Community Advisor

Hello @arpan-garg 

 

Saving it under an Experience event schema is the right move — I'm just curious to know why you want to overwrite an existing event entry. Please expand on your use case about how you will use the order data in the platform.

Adding a different eventType could be the solution to differentiate between 2 orders.


     Manoj
     Find me on LinkedIn

Avatar

Community Advisor

Hello @_Manoj_Kumar_ ,

Thank you for your prompt response. Let me provide you with a specific scenario. Imagine we have a customer named A who placed an online order with the order number 123, and the initial order price was 2000 USD (eventType: commerce.purchases). However, after placing the order, they contacted our customer care and had it updated. As a result, the new price for order number 123 is now 2400 USD (eventType: commerce.purchases.update).

Now, let's consider another customer, Customer B, who made two online orders with the order number 456 and 780, and the order price was 1000 USD and 2000 USD(eventType: commerce.purchases).

My objective is to segment these customers based on the condition that the sum of all the orders they have made exceeds 2200 USD.

 

How can i achieve this ? How can i make sure that order number 123 which is latest with changes made by customer care is only considered?

Avatar

Community Advisor

eventType doesn't matter to us in this usecase. The idea is to sum up all the active bookings of the customers. In customer A the sum should just be 2400 USD and for customer B the sum should be (1000+2000 = 3000 USD)

Avatar

Community Advisor

Hello @arpan-garg 

 

I don't have data to test. But something like this could work.

Manoj_Kumar__0-1695710647595.png

 


     Manoj
     Find me on LinkedIn

Avatar

Community Advisor

Hi @_Manoj_Kumar_  -In your where clause you added a condition exclude eventtype equal commerce purchases which will cause the issue. Because for Customer B we just have eventType Commerce purchases. I want customer B as well because the booking price is (1000+2000=3000 USD) and eventType is commerce.purchase

Avatar

Community Advisor

Plus the variable purchases is created from commerce.purchases event. I believe we can't have purchases by excluding commerce.purchases.

Avatar

Community Advisor

Hello @arpan-garg 

 

Apologies that was just an example.

 

You can replace the Purchase event with Any Event, and in the where condition to exclude you can add something like this

 

Purchase order number of "commerce.purchase"

equal to

purchase order number of "commerce. purchase.update"

 and

event type equal to "commerce.purchase"

 

I don't have these events available in my sandbox so I can't give you the exact segment logic.


     Manoj
     Find me on LinkedIn

Avatar

Community Advisor

Hi @_Manoj_Kumar_ - I understood it. However if we say include all purchases at the top, it means include all commerce.purchases.

 

But for customer A we want to include both commerce.purchases and commerce.purchases.update because initially the eventType was commerce.purchases and later it was commerce.purchases.update. I am not sure if we can include both of them and assign it to a variable

Avatar

Community Advisor

Hi , any other pointers on the above problem statement @yuhuisg  @Danny-Miller @_Manoj_Kumar_ @arijitg @Anil_Umachigi 

Avatar

Employee Advisor

@arpan-garg ,

You should look into the new Computed Attributes feature launching this week:
https://experienceleague.adobe.com/docs/experience-platform/profile/computed-attributes/overview.htm...

This will allow you to collect purchases as event data (as it should be), sum order totals across multiple purchase events, and then store the computed value as attribute data. I'm not sure about how you could handle these duplicate order scenarios, but perhaps there is a way? (I would think you would need some appropriate fields in the customer care version of the order to make this possible).

Avatar

Correct answer by
Community Advisor

@dwright @_Manoj_Kumar_ , thanks for the help, I found a way of handling this via a scheduled query which is deduplicating the events and then calculating the average of bookings and later inserting it into a profile as a profile attribute.

 

It comes with a drawback of time taken, but is fine for my client usecase.