Excel Add-In for Marketo

Build 24.0.9175

LeadChanges

Query Lead changes.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM LeadChanges WHERE ActivityDate = '2024-02-02 08:15:10.0'
	SELECT * FROM LeadChanges WHERE ActivityDate > '2024-01-17T14:32:21'
	SELECT * FROM LeadChanges WHERE ActivityDate >= '2024-01-17T14:32:21'
	SELECT * FROM LeadChanges WHERE ActivityDate > '2024-01-17T14:32:21' AND ActivityDate < '2024-02-17T14:32:21'
	SELECT * FROM LeadChanges WHERE LeadId IN (4, 14454)
	SELECT * FROM LeadChanges WHERE ListId = 1014
	SELECT * FROM LeadChanges WHERE ListId = 1014 AND ActivityDate > '2023-06-14T14:13:27Z'
	SELECT * FROM LeadChanges WHERE LeadId = 9 AND ActivityDate > '2023-06-14T14:13:27Z'

Use LeadFields to specify the Lead columns from which you want to retrieve changes. Defaults to all columns. Retrieve column names from SYS_TABLECOLUMNS and provide them as comma-separated values.

SELECT * FROM LeadChanges WHERE LeadFields = 'mobilePhone'
SELECT * FROM LeadChanges WHERE LeadId = 4 AND LeadFields = 'mobilePhone'

Columns

Name Type Operators Description
ActivityId [KEY] String Unique id of the activity.
ActivityDate Datetime >,>=,=,<,<= Datetime of the activity.
ActivityTypeId Int Id of the activity type.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
Attributes String JSON aggregate containing the list of attribute key value pair for this activity.
Fields String JSON aggregate containing a list of changes made to lead fields.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.

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
LeadFields String Mirror column used to specify Lead columns for which you want to retrieve changes for. Defaults to all columns. Column names can be retrieved from SYS_TABLECOLUMNS. SELECT [ColumnName] FROM SYS_TABLECOLUMNS WHERE TableName='leads' and should be provided as comma separated values.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 24.0.9175