Opportunities
This table has 1 row per opportunity and per org id.
Note: depending on how mappings are enabled, definitions for fields may differ between customers
Column | Type | Definition | Sample Value(s) | Sample Use |
---|---|---|---|---|
ACCOUNT_ID | Varchar | The account ID associated with the opportunity. | Maps to the ACCOUNTS table | |
AMOUNT | Number | The dollar amount associated with the opportunity. | ||
BENTO | Varchar | A collection of machines that power the Outreach app. Orgs live inside these. | This may distinguish orgs that are in different data centers. | |
CLOSE_DATE | Timestamp_NTZ | The expected Date (not datetime) for the deal to be closed. This is in local time, not UTC. | ||
COMPUTED_CREATED_AT | Timestamp_NTZ | For backfilled opportunities, this is the synced created at. For opportunities created after sync, computed and standard created_at match. | ||
COMPUTED_CREATOR_ID | Varchar | Matches creator ID for non-backfilled opportunities. Otherwise a mapping is created based on the plugin. | ||
COMPUTED_CREATOR_TYPE | Varchar | Will be Plugin unless created post sync. | 'plugin', 'import', 'user' | |
CREATED_AT | Timestamp_NTZ | The date the record was created in Outreach. | ||
CREATOR_ID | Varchar | The ID for whomever created a record in Outreach, or who updated it if records are overwritten when changed. Maps to different tables based on the "creator_type" field. | ||
CREATOR_TYPE | Varchar | The object type that created this row. | 'plugin', 'app', 'user', 'trigger', 'import' | This will dictate what table the creator_id maps to. |
CURRENCY_TYPE | Varchar | The ISO code of the opportunity currency. | 'USD' | |
CUSTOM_FIELDS_LONG | Variant | A variant JSON field of custom values that were associated with the opportunity. | {custom9: "commit"} | |
DESCRIPTION | Varchar | Any associated descriptions of the opportunity. | ||
DML_AT | Timestamp_NTZ | A datetime (local to server) in which the row was last modified. dml_at can be used to identify updated and new records, but as tables may not see changed records every day, it is not authoritative on when the table was last synced. | 2019-01-01 12:14:01:10 | Where dml_at::date >= current_date-7 This will return all rows modified in the last 7 days. |
DML_TYPE | Varchar | The type of manipulation that last occurred to a row. | 'update', 'delete', 'insert', 'backfill', 'backfill-delete' | Where dml_type <> 'delete' Excludes deleted rows. |
EXTERNAL_CREATED_AT | Timestamp_NTZ | Generally NULL. Redundant with computed fields. | ||
EXTERNAL_CREATOR_ID | Varchar | Generally NULL. Redundant with computed fields. | ||
ID | Varchar | Represents an individual row of data in a table. Fields in other tables that match to this ID will be called thisTable_id. e.g. ID in the calls table will appear as the call_id in another table. | Count(1), count(id), and count(distinct id) are equivalent in a table without joins or groupings for a given bento & o_id. | |
IS_DELETED_IN_APP | Boolean | Is the latest dml_type "delete" or "backfill-delete". | Where is_deleted_in_app = false Only keeps undeleted rows. | |
NAME | Varchar | The name of the opportunity. | ||
NEXT_STEP | Varchar | A mappable field for the next action to be taken against an opportunity. | ||
OPPORTUNITY_TYPE | Varchar | The type of opportunity. | ||
OWNER_ID | Varchar | The user that owns the opportunity currently. | Maps to the USERS table | |
O_ID | Varchar | Organization ID, also called instance ID. This is the ID for your unique Outreach account. | Most commonly used on joins alongside other primary keys. where a.o_id = b.o_id and a.id = b.a_id | |
PROBABILITY | Number | A mappable field for probability from 0-100 of a deal closing. | ||
STAGE_ID | Varchar | The current stage of the opportunity. | Maps to the OPPORTUNITY_STAGES table | |
STATE | Varchar | The current state of the opportunity, defaults to Open, Lost, or Won. More details available in the OPPORTUNITY_STAGES table. | 'open', 'lost', 'won' | |
SURROGATE_ID | Varchar | An md5 hash of bento, o_id and ID for a table. | This can be used to get distinct counts of records if an account has more than 1 org instance. Two orgs will both have a prospect with ID of "1" but each will have a different surrogate ID. | |
TOUCHED_AT | Timestamp_NTZ | The last UTC datetime that the opportunity was engaged. | ||
UPDATED_AT | Timestamp_NTZ | The UTC datetime for the last time this record was updated. | 2019-01-01 20:14:01:10 | Almost equivalent to dml_at (but adjusted for time zones), but doesn't include record creation or deletion. |