SmartCampaigns
Create, update, delete, and query SmartCampaigns for a Marketo organization.
Table Specific Information
Select
Note: All filterable columns must be specified using the '=' operator.
Retrieve all smart campaigns
SELECT * FROM SmartCampaigns
Retrieve a specific smart campaign
SELECT * FROM SmartCampaigns WHERE Id = 2046
Insert
To create a new smart campaign, specify at least the Name, FolderId and FolderType column.
INSERT INTO SmartCampaigns (Name, FolderId, FolderType) VALUES ('NewSmartCampaign', '1357', 'Folder')
Update
Only the Name and Description columns can be updated.
UPDATE SmartCampaigns Set Name = 'UpdatedSmartCampaignName', Description = 'CData Campaign' WHERE Id = 2047
Delete
To delete a smart campaign you must specify the ID field.
DELETE FROM SmartCampaigns WHERE Id = 2047
Columns
Name | Type | ReadOnly | Filterable | Description |
Id [KEY] | Integer | True | True |
The Id of the smart campaign. |
Name | String | False |
The name of the smart campaign. | |
ComputedUrl | String | False |
The Computed Url of the Smart Campaign | |
Description | String | False |
The description of the smart campaign. | |
Type | String | True |
The type of the the smart campaign. Batch: has at least one filter and no triggers. Trigger: has at least one trigger. Default: has no smart list rules. | |
SmartListId | Integer | True |
The Id of the smart campaign's child smart list. | |
FlowId | Integer | True |
The Id of the smart campaign's child flow. | |
CreatedAt | Datetime | True |
The date and time the smart campaign was created. | |
UpdatedAt | Datetime | True |
The date and time the smart campaign was last updated. | |
WorkSpace | String | True |
The name of the workspace where the folder is located. | |
Status | String | True |
The status of the smart campaign. The allowed values are Inactive, Single Run, Invalid, Recurring Run, Active, Requested, Never Run. | |
IsSystem | Boolean | True |
Whether smart campaign is system managed. | |
IsActive | Boolean | True |
Whether smart campaign is active. | |
IsRequestable | Boolean | True |
Whether smart campaign is requestable (is active and contains 'Campaign is Requested' trigger with Source of 'Web Service API'). | |
IsCommunicationLimitEnabled | Boolean | True |
Whether smart campaign communication limit is enabled (i.e. block non-operational emails). | |
MaxMembers | Integer | True |
The smart campaign membership limit. | |
QualificationRuleType | String | True |
The type of qualification rule. The allowed values are once, any, interval. | |
QualificationRuleInterval | Integer | True |
The interval of qualification rule. Only set when qualificationRuleType is 'interval' | |
QualificationRuleUnit | String | True |
The unit of measure of qualification rule. Only set when qualificationRuleType is 'interval' = ['hour', 'day', 'week', 'month'] | |
RecurrenceStartAt | Datetime | True |
The datetime of the first scheduled campaign to run. Required if setting recurrence. Not required to create a smart campaign that has no recurrence. | |
RecurrenceEndAt | Datetime | True |
The datetime after which no further runs will be automatically scheduled. | |
RecurrenceIntervalType | String | True |
The recurrence interval. Not required to create a smart campaign that has no recurrence = ['Daily', 'Weekly', 'Monthly']. | |
RecurrenceInterval | Integer | True |
The number of interval units between recurrences. | |
RecurrenceWeekDayOnly | Boolean | True |
Only run smart campaign on weekdays. May only be set if intervalType is 'Daily'. | |
RecurrenceWeekDayMask | String | True |
String array of empty or one or more of 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'. May only be set if intervalType is 'Weekly'. | |
RecurrenceDayOfMonth | Integer | True |
The day of the month to recur. Permissible range 1-31. May only be set if intervalType is 'Monthly' and dayOfWeek and weekOfMonth are unset. | |
RecurrenceDayOfWeek | String | True |
The day of the week to recur. May only be set if dayOfMonth is not set, and weekOfMonth is set = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']. | |
RecurrenceWeekOfMonth | Integer | True |
The week of the month to recur. Permissible range 1-4. May only be set if dayOfMonth is not set, and dayOfWeek is set. | |
FolderId | Integer | False |
The Id of the folder. | |
FolderType | String | False |
The type of folder. The allowed values are Folder, Program. |
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 |
EarliestUpdatedAt | Datetime |
Exclude smart campaigns prior to this date. |
LatestUpdatedAt | Datetime |
Exclude smart campaigns after this date. |
Folder | String |
JSON representation of parent folder, with members 'id', and 'type' which may be 'Folder' or 'Program'. |