First time posting here! I am facing an issue I cannot seem to crack around deduplication of records based on specific criteria.
I am trying to implement the logic that if a caller [Caller Number] calls a store [Shop#], then the call will be tagged as a lead. then any call from that caller to the same store would be considered a duplicate until 60 days [StartDateTime] have passed from the initial call. After 60 days, this record can be considered a new lead, then all subsequent records from the same caller to the same shop would again be considered a duplicate for 60 days. This would continue until a new caller + shop# combination starts, then the process would repeat.
Example cases:
1) So if a phone number (123-345-6789) calls the same shop twice, once on 3/01/19 and once on 4/01/19, only the 3/01/19 call should be considered a lead. If they called again on 5/01/19 (more than 60 days after, that would be considered an additional lead.
2)If a phone number (111-111-1212) calls shop1 and shop2 within 1 minute of each other, these should be considered 2 separate leads.
I was able to ID the original call of a given caller + shop combination, but cannot figure out how to have Alteryx reference that lead and dedup accordingly. I have attached an example workflow of tagging this first call along with a sample input and output with only the first call tagged.
I also attached a file that is the ideal output of which should be tagged as a lead or a duplicate.
Looking forward to any advice or thoughts anyone can offer!