RE: NetSuite: How to Build a Saved Search That Returns Only First-Time Event Attendance (Workflow Input Needed)
I’m hoping someone can point me in the right direction with a workflow/saved search problem. I apologize for the long explanation, but I want to clearly outline the challenge, and I’d be very grateful for any suggestions.
Goal
I have a daily workflow to check a checkbox on a Seminar Attendance (SA) custom record that identifies when a customer attends an event for the first time for a given event-type. We will use this flag for analytics around customer entry points and “first touch” events.
The Challenge
We have several million SA records going back to the early 2000s. Customers may attend the same event-type many times.
Example: a customer attended Event A 8 times over 10+ years, and then attends it again recently. When their 9th SA record is created, the workflow must determine whether this is their first Event A or not.
I need a way for the saved search (triggering the workflow) to return only those SA records where the customer is attending that event-type for the first time.
What I’ve Tried
- If I let the search look across all time, the dataset becomes enormous and slow.
- If I filter by event date (e.g., only events from 2025), the search can’t look backward to detect whether the customer attended the same event-type before 2025.
- I can get the earliest attendance using a MINIMUM(Event Date) summary result grouped by Customer + Event Type — but workflows can’t use summary-type results because they’re not stored on the record.
Sticking Point
I have not found a way to make a saved search return only the SA records that represent a customer’s first-ever attendance for that event-type, without relying on summary results.
Question
How can I build a saved search that only returns first-time attendance records (per event-type per customer) so a daily workflow can check a flag on those SA records?
Has anyone solved something similar at scale?
If you read this far, thank you.
Stephen
Working this through, removing all summary ‘Group’ from the saved search and retaining ‘Minimum’ only.
The search now returns one rolled up result, an ID.
The custom field is now working with that, and an ID is showing up in the SA records.
So far so good.
When I investigate individual customer’s SA records for different event-types they attended – the new custom field – it displays the earliest ID (singular event) from all that customer’s attended event-types.
To clarify: only the ID of one event; their earliest event.
So, I’m not getting that differentiation of event-types i.e. the ID of the earliest of each event-type, attended by the customer.
Referring back to mmfranklin75’s instructions,
“Now when you view any SA record, this field will show the internal ID of the first-ever SA for that customer/event-type pair.”
I’m looking for a way to filter for the pair, “… for that customer/event-type pair.”
Thank you in advance for any questions or feedback,
Stephen