SOLVED

Re: Schema to Create Custom Activites

Go to solution
Anonymous
Not applicable

Schema to Create Custom Activites

Hi i want to understand how the schema for creating custom activities work. Here is the link for reference Add Custom Activities » Marketo Developers

My question is regarding Primay Attribute. So from what i understand this has to be a unique key.

For example here is a signup custom event i want the marketo support team to create.

Name: [org] Created Project

Description: [org] Created Project

Trigger Name: [org] Created Project

Filter Name: [org] Created Project

Primary Attribute:  Project Name , Project Name, string

Other Attributes:  Username , Username , string

Other Attributes:  User ID, User ID , Integer

Other Attributes:  Project Slug , Project Slug , string

So in the example above a user can create multiple projects and we want to track every event, in that case should the Username be a primary attribute of Project name?

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Grant_Booth
Level 10

Re: Schema to Create Custom Activites

Hi Ling,

Please ignore, my previous comment - I thought you were referring to a different process. Rereading your post I understand what you were referring to. The "Primary Attribute" is not a unique identifier - as an activity, it's only written to on creation and can't be updated subsequently. The "Primary Attribute" is only referring to the field which appears by default in the filter/trigger. Other fields must be added as constraints. For example, in my own Marketo environment, I created a custom activity called "Test Activity", with the Primary Attribute "Name" and other attribute "Deadline". When I drag over the trigger for it, it looks like this:

TestActivity.png

Notice how "Name" already appears in the filter (since it's the Primary Attribute), while "Deadline" must be added as a constraint.

Grant

View solution in original post

4 REPLIES 4
Grant_Booth
Level 10

Re: Schema to Create Custom Activites

Hi Ling,


Is it possible for multiple projects to have the same Project Name? If not, then this should be fine. I think most people would have a "Project ID" field as well though, which is unique for every record of the activity, and use that as the primary attribute.


Grant

Anonymous
Not applicable

Re: Schema to Create Custom Activites

Yes it is possible for multiple projects to have a same name. So when they say primary attribute is like a primary key in a table ?

In some case we wont have one  unique field, we will have a combination of fields which are unique together.

How do you think that schema should be layed out?

And one more this in the developer documentation is say that primaryAttributeValue is the name of the activity, which is very confusing.

primaryAttributeValue

Required

Name of activity

Appreciate the help.

Grant_Booth
Level 10

Re: Schema to Create Custom Activites

Hi Ling,

Please ignore, my previous comment - I thought you were referring to a different process. Rereading your post I understand what you were referring to. The "Primary Attribute" is not a unique identifier - as an activity, it's only written to on creation and can't be updated subsequently. The "Primary Attribute" is only referring to the field which appears by default in the filter/trigger. Other fields must be added as constraints. For example, in my own Marketo environment, I created a custom activity called "Test Activity", with the Primary Attribute "Name" and other attribute "Deadline". When I drag over the trigger for it, it looks like this:

TestActivity.png

Notice how "Name" already appears in the filter (since it's the Primary Attribute), while "Deadline" must be added as a constraint.

Grant

Anonymous
Not applicable

Re: Schema to Create Custom Activites

Thanks.

That clears my doubt.