CustomActivities
Query Custom Activities for a Marketo organization.
Table Specific Information
Each custom activity contained within your Marketo organization will be returned as it's own table. Each table name will be prefixed with 'Activity_' followed by the name of your custom activity.Select
Custom activities can be retrieved by performing a SELECT query on the custom activity table.
SELECT * FROM Activity_MyCustomActivity
INSERT
Custom activities can be added by performing an INSERT. To create a new custom activity record, specify the information about the custom activity to be entered into the database.
The following properties are required when creating a custom activity record: ActivityDate, LeadId, and PrimaryAttributeValue (note this column name changes based on the name you designated for the primary field of the activity).
The following example demonstrates how to insert a new custom activity called MyCustomActivity:
INSERT INTO Activity_MyCustomActivity (ActivityDate, PrimaryFieldValue, LeadId, MyInt, Email) VALUES ('11/08/2016', '123', '1', 12345, '[email protected]')
Update
UPDATEs are not supported on custom activities.
Delete
DELETEs are not supported on custom activities.
Columns
Name | Type | ReadOnly | Filterable | Description |
ActivityId [KEY] | Integer | True |
The unique Id of the activity. | |
LeadId | Integer | True | True |
The unique Id of the lead associated with the activity. |
ActivityDate | Datetime | True | True |
The date and time the lead was added to the list. Can be used as a filter to specify the starting date and time to retrieve all activities on or after the specified date. |
PrimaryAttribute | String | True | True |
The primary field Id |
PrimaryAttributeValue | String | True |
The primary field value. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
ListId | Integer |
A List Id used to retrieve actvities for all leads contained within the specified list. |