Can I just use primaryAttributeValue when firing off a custom activity?
Hello everyone,
I'm currently in the process of trying to deprecate our use of Segment (an event-handling framework) and move towards a more API-focused approach to working with custom activities. But I'm unclear if I can just use the primaryAttributeValue to index our activity, or if we need to somehow get the leadId to trigger this.
For more specifics, let's say that we want to give people an option to opt out of marketing emails for GDPR compliance. During signup, we would get an email and (our internal) customer id, but I don't know if we've created a lead for them in Marketo yet. In Segment (docs) I would get the Custom Activity ID, determine what field is the primary key, and upload whatever other information is pertinent. So if I know that "myself@me.com" doesn't want an email, I assume that there is something that can figure out which lead has that email and do the necessary actions.
However, when looking through some API documentation (this doc, this ref), it appears that I need to provide *both* a primaryAttributeValue and a leadId. If I want to do a custom activity, do I need to know the leadId in order to make it happen? Alternately, is there a smarter way to handle this sort of event-based behavior besides custom activities?
Thank you in advance,
Paul