Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Importing Purchase Order data into AEP

Avatar

Community Advisor

Hello guys,

 

I am importing a purchase Order into AEP. Any suggestion to build the unique ID (_id), do we have some best practices to be followed? Every experience event must have Point Of Sale ID.

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi @Luca_Lattarini

Before you construct, do consider the below points:

  • purchase orders can be from multiple stores (POS) and from online
  • orders may be stored in multiple systems (depending on scenarios from client)

The best way would be to prefix this sourceId, storeId, and the purchaseId of the order from that store. This will make it unique.

 

Thanks,

Chetanya

View solution in original post

8 Replies

Avatar

Correct answer by
Level 4

Hi @Luca_Lattarini

Before you construct, do consider the below points:

  • purchase orders can be from multiple stores (POS) and from online
  • orders may be stored in multiple systems (depending on scenarios from client)

The best way would be to prefix this sourceId, storeId, and the purchaseId of the order from that store. This will make it unique.

 

Thanks,

Chetanya

Avatar

Employee

@Luca_Lattarini Another thing to consider is if a Purchase Order would ever change (e.g. status)?  If so, remember:

  1. Events are immutable.
  2. It will need to be ingested as a new Event
    1. Any _id strategy will need to accommodate this (e.g. concat(purchaseId + latest updated date) )

Avatar

Level 4

Couple more things i could think of 

  • Think on how purchase id/ sale id will work in case of returns and exchanges
  • Check timestamp and ensure it is order/txn timestamp. 

Avatar

Community Advisor

Thanks guys for the very helpful suggestion that I will use. 

I have another question, assuming that i have an event with _id:"1000" email:"xxx", purchased:"shoes model 1" with no timestamp. What happend if  later I ingest another another event with same _id but for example _id:"1000" email:"xxx", purchased:"shoes model 2" .

Is it possible that the last event overrides the previous event  and i will only see the last event ? 

Thanks

 

Avatar

Employee

@Luca_Lattarini 

  1. "No Timestamp"? 
    1. Sounds like a data quality issue in your source system that needs to be fixed
  2. If a duplicate _id for an Event is loaded into the same dataset (as part of a subsequent Event), it will be ignored or cause an error.

Avatar

Level 1

If a duplicate _id for an Event is loaded into the same dataset , the event will be ignored from the profile store but it will be available in the data lake. So both the events that have shoes model 1 and shoes model 2 will show up in the data lake when you query the dataset using query services . However, only the shoes model 1 event will be associated to the profile when you do a profile lookup.

Avatar

Employee

Good point... sometimes I focus too much on the Profile, thanks for reminding everyone.