Opportunities
Query Opportunities for a Marketo organization.
Table Specific Information
Note: This table is only available for Marketo subscriptions which do not have a native CRM sync enabled. If sync is enabled, an error will be returned when attempting to query the table stating that the API is disabled.
Select
A filter must be specified when retrieving opportunities. Valid filters are any searchable columns which include MarketoGUID, ExternalOpportunityId, ExternalCompanyId, or ExternalSalesPersonId.
SELECT * FROM Opportunities WHERE ExternalOpportunityId = 'CDATA1'
Insert
To create a new Opportunity record, specify the information about the Opportunity to be entered into the database.
The following example demonstrates how to insert a new Opportunity:
INSERT INTO Opportunities (ExternalOpportunityId, Description, ExternalCompanyId, Name) VALUES ('CDATA1', 'CData Software Inc Opportunity', 'CDATA', 'CData')
Update
Any field that is not read-only can be updated.
UPDATE Opportunities SET IsWon = true, FiscalYear = 2016, Amount = '1000.00' WHERE ExternalOpportunityId = 'Opportunity1'
Delete
Delete is used to remove opportunities from Marketo. To perform a delete, either the Id field or the ExternalOpportunityId field is required.
DELETE FROM Opportunities WHERE ExternalOpportunityId = 'Opportunity1'
Columns
Name | Type | ReadOnly | Filterable | Description |
MarketoGUID [KEY] | String | True | True |
The unique, Marketo-assigned identifier of the opportunity. |
ExternalOpportunityId | String | False | True |
The external Id of the opportunity. |
Amount | Double | False |
The amount of the opportunity. | |
CloseDate | Datetime | False |
The date and time the opportunity was closed. | |
Description | String | False |
The description of the opportunity. | |
ExpectedRevenue | Double | False |
The expected revenue of the opportunity. | |
ExternalCompanyId | String | False | True |
The external company Id of the opportunity. |
ExternalCreatedDate | Datetime | False |
The external date and time the opportunity was created. | |
ExternalSalesPersonId | String | False | True |
The external sales person Id of the opportunity. |
Fiscal | String | False |
The fiscal of the opportunity. | |
FiscalQuarter | String | False |
The fiscal quarter of the opportunity. | |
FiscalYear | String | False |
The fiscal year of the opportunity. | |
ForecastCategoryName | String | False |
The forecast category name of the opportunity. | |
IsClosed | Boolean | False |
Specifies whether the opportunity is closed. | |
IsWon | Boolean | False |
Specifies whether the opportunity was won. | |
LastActivityDate | Datetime | False |
The date and time the last activity occurred on the opportunity. | |
LeadSource | String | False |
The lead source of the opportunity. | |
Name | String | False |
The name of the opportunity. | |
NextStep | String | False |
The next step of the opportunity. | |
Probability | Integer | False |
The probability of the opportunity. | |
Quantity | Double | False |
The quantity of the opportunity. | |
Stage | Double | False |
The stage of the opportunity. | |
Type | Double | False |
The type of the opportunity. | |
CreatedAt | Datetime | True |
The date and time the opportunity was created. | |
UpdatedAt | Datetime | True |
The date and time the opportunity was last updated. |