Expand my Community achievements bar.

SOLVED

Identfying Recently Updated Recipient Records

Avatar

Level 5

Hi there,

 

I have a requirement where I need to be able to identify all recently modified recipient records (any recipient field updated or recipient added to a list).

 

Effectively we have a range of fairly disperate processes that can update/insert recipient records.

From Automated workflows to manual import jobs carried out by a variety of users (even API updates in some ways).

 

Most of the updates are carried out by "jobs" but some updates may be made by "update data" workflow activities or session.write API calls.

 

I basically need a way whereby I can identify when each record was last processed (present in any of the file imports, even if fields didn't change and they were only added to a list) so that we can purge records that have not been modified in last 12 months.

 

Is there any OOTB way of identifying this based on how records are modified above or a small piece of development that could log this for us going forward? (preferably the former as I don't want to have to wait to build up history).

 

lastModified would've been ideal, but this seems to update outside of the above scope (e.g. when associated delivery/tracking logs are added and potentially other things?)

 

Any thoughts appreciated

 

Thanks

 

David

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

@davidh2892249 -

Just to confirm, are you planning to build logic around the last modified field?

As you said "Recently modified recipient records", you can use ToIntlString(@lastModified) to display the milliseconds.

Do note that whenever there is a timestamp change, this @lastmodified also gets modified without even the actual change. 

You can have a small test to validate this at your end.

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @davidh2892249 ,

You can use the field '@lastModified' from nms:Recipient schema.

After a Recipient record got created, @lastModified will be same as creation date. And later @lastModified in recipient schema will get updated only if there is some edit made on recipients field for that particular record, and NOT associated with any delivery broadLogs, tracking logs etc.

So you can query Recipient's @lastModified on or after 12months and can purge your data as per your business need.

 

Regards,

ParthaSarathy 

Avatar

Correct answer by
Employee Advisor

@davidh2892249 -

Just to confirm, are you planning to build logic around the last modified field?

As you said "Recently modified recipient records", you can use ToIntlString(@lastModified) to display the milliseconds.

Do note that whenever there is a timestamp change, this @lastmodified also gets modified without even the actual change. 

You can have a small test to validate this at your end.

Avatar

Level 5

Thanks for the response.

 

Whilst this seems to work if the recipient record is modified in any way... if a recipient is part of a data file, "processed" by a job (e.g. their reconciliation key is present in the file) which adds them to a list but their recipient fields remain unupdated becuase they are already the same as the file - modification date is not updated.

 

My use case would prefer a scenario that updates the recipient modification date if they are added to a list (even if their recipient fields are unchanged).

 

Any further thoughts?

 

Thanks

 

David

 

 

Avatar

Administrator

Hi @davidh2892249 ,

Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case any of the given solutions were helpful, then kindly choose the it as the 'Correct Reply'.
Thanks!



Sukrity Wadhwa