Hi,
I have a following use case, please suggest right approach
Customobject "UserActivity" has following data. Email is link field
email,activityTypeID,activityType,documentName,activityDate
test1@test.com,1234,vieweddocument,Doc1,2024-02-01
test1@ptest.com,2345,vieweddocument,Doc2,2024-04-10
test2@test.com,3456,vieweddocument,Doc3,2024-01-20
test2@test.com,4567,vieweddocument,Doc4,2024-05-25
I will create a smartlist with following conditions to find users whose activity is "vieweddocument" before 02/05/2024
1. Has User Activity
2. Activity date before 02/05/2024
3.Activity type is vieweddocument
Email addresses test1@test.com and test2@test.com will be qualified with this condition
I want to send an email for these two email addresses with their respective data record information
Question: How can I get customobject records only for these two email addresses in velocity script. Is there as way to identify these two email address custom object records and personalize the email content?
I want to send email using smart campaign
Thank you so much in advance
Babu.
Solved! Go to Solution.
Seems like you’re misinterpreting what items are in a Custom Object list.
It’s not everybody’s Custom Objects of that type, it’s only the list of that person’s COs. You can never see somebody else’s records from inside Velocity. (Would be a huge security risk if you could!)
Yes, you can filter the list by interrogating any property of the object(s).
In the specific case of stringified (ISO 8601) Dates, you can simply compare them as Strings — rather than converting them to Date or Calendar objects — to determine whether the dates are in a known range.
Hi Sanford,
Thanks for the response!
I did read your previous threads on looping through CO. I am looking for
Instead of
#foreach($item in $COList)
#if($item.activityDate <= '2024-02-01')
parse the data
#end
#end
Can I identify qualified emails records like
#foreach($item in $qualifiedlist)
parse data
#end
I do not want to add a trigger whenever there is a record added to a CO. Want to use smart campaign instead.
Thank you so much for your help. Can you please point me to the thread if I missed the above discussion
Thanks,
Babu
Seems like you’re misinterpreting what items are in a Custom Object list.
It’s not everybody’s Custom Objects of that type, it’s only the list of that person’s COs. You can never see somebody else’s records from inside Velocity. (Would be a huge security risk if you could!)
Thank you, Sanford!
I am on the same page with you.
Thank you so much!
Thanks,
Babu
What are the exact criteria for “unwanted”?
Thank you, Sanford!
I will explain with below example to make sure my understanding is correct
test1@test.com,1234,vieweddocument,Doc1,2024-02-01
test1@test.com,2345,vieweddocument,Doc2,2024-04-10
test2@test.com,3456,vieweddocument,Doc3,2024-01-20
test2@test.com,4567,vieweddocument,Doc4,2024-05-25
If we write a smart list filter for above data by activityType=vieweddocument and activityDate between 2024-04-01 and 2024-04-11,
test1@test.com is qualified which has two CO records
test1@test.com,1234,vieweddocument,Doc1,2024-02-01
test1@test.com,2345,vieweddocument,Doc2,2024-04-10
Here CO record with date 2024-02-01 is unwanted, I was saying this unwanted record can be filtered by checking activityDate value in velocity script because I can see CO record with date 2024-02-01 when loop through CO .
Thanks,
Babu
Yes, you can filter the list by interrogating any property of the object(s).
In the specific case of stringified (ISO 8601) Dates, you can simply compare them as Strings — rather than converting them to Date or Calendar objects — to determine whether the dates are in a known range.
Thank you, Sanford!