Hi all, I built a custom object that records activites (page view, form submission, ad submission, etc) I created the custom object to store some of these native activites along with other custom events not native in HubSpot, to use in journey mapping. The client wants to identify the first activity based on the activity (event) date. So as these records are created, I created a workflow with the following code to mark (check) if the event was the first (custom property called "First Scoring Event". The logic is if no other event record exists assocated to the contact then set First Scoing Event to true. If there is a an exisisting record then do nothing. I created a workflow to populate another event record custome property call Associated contact ID. The workflow copies the Contact Record ID to the associated event record property. The code below works in setting the first record First Scoring Record to true but when another record is created, it can't find any other records associated to the same contact, thus changes the First Scoring Record to true on the second record when it should do nothing. Can anyone see what I'm missing? Thanks!
In this snippet of code, you only retrieve the last 100 events without navigating through all the pages: if between the contact's first event and the second, 100 events were created for all contacts combined, your first event will no longer be visible. You have to navigate through all the pages, but it's time-consuming.
There's a more efficient way to do what you want: retrieve only the events related to your current contact.
In this snippet of code, you only retrieve the last 100 events without navigating through all the pages: if between the contact's first event and the second, 100 events were created for all contacts combined, your first event will no longer be visible. You have to navigate through all the pages, but it's time-consuming.
There's a more efficient way to do what you want: retrieve only the events related to your current contact.
Have a beautiful day and thanks so much for your help! ❤️ Bérangère
HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates. Learn More.