Engagements

Engagements represent any of a number of different types of engagements you have in HubSpot.

Table Specific Information

Engagements represent any of a number of different types of engagements you have in HubSpot. These can very from simple Tasks, to Emails, Calls, Meetings, or others. Due to the different types of engagements available, any individual Engagement will have several columns that come back null due to its type.

Select

When selecting engagements, they can only be filtered by the Id. For instance:

SELECT * FROM Engagements WHERE Id = 12345

Insert and Update

When inserting Engagements, a Type must be specified. In addition, different fields are available on insert depending on the type used. The available fields for each type are as follows: CALL,EMAIL,MEETING,NOTE,PUBLISHING_TASK,TASK

  • CALL: ToNumber, FromNumber, Body, DurationMilliseconds, Status, ExternalId, ExternalAccountId, RecordingUrl, Disposition
  • EMAIL: FromEmail, FromFirstName, FromLastName, ToEmail, Cc, Bcc, Subject, EmailHtml, EmailText
  • MEETING: Body, StartTime, EndTime, Title
  • PUBLISHING_TASK: Body, CampaignGuid, Category, CategoryId, State, Name
  • TASK: Body, Status, ForObjectType
In addition, there are some common fields available when inserting or updating any type of Engagement. These include DateTime, AssociatedContacts, AssociatedCompanies, AssociatedDeals, AssociatedOwners, and AssociatedWorkflows. For instance:
INSERT INTO Engagements (DateTime, Type, Body, CampaignGuid, Category, CategoryId, ContentId, State, Name, AssociatedContacts) VALUES ('1/1/2011', 'PUBLISHING_TASK', 'Cool Post with Topics', 'f43fe9fd-4082-4a45-93d8-cb8a88f01654', 'BLOG_POST', 3, '2682673052', 'TODO', 'Test Blog Task With topics 3', '234,567')

Columns

Name Type ReadOnlyReferencesDescription
Id [KEY] LongTrue

The id of the engagement.

PortalId LongTrue

The portal id the engagement is associated with.

IsActive BooleanTrue

Boolean indicating if the engagement is active or not.

CreatedAt DatetimeTrue

When the engagement was created.

UpdatedAt DatetimeTrue

When the engagement was last updated.

CreatedBy LongTrue

User id of the user who created the engagement.

ModifiedBy LongTrue

User id of the user who lastmodified the engagement.

OwnerId LongFalse

Owners.OwnerId

The owner id of the engagement.

Type StringFalse

The type of engagement. Required on inserts.

ActivityType StringFalse

The activity type of engagement.

DateTime DatetimeFalse

A custom datetime that can be specified when inserting the engagement. This can be used for keeping track of something related to the engagement such as when a call was made.

AssociatedContacts StringFalse

A comma separated list of contact ids associated with the engagement.

AssociatedCompanies StringFalse

A comma separated list of company ids associated with the engagement.

AssociatedDeals StringFalse

A comma separated list of deal ids associated with the engagement.

AssociatedOwners StringTrue

A comma separated list of owner ids associated with the engagement.

AssociatedWorkflows StringFalse

A comma separated list of workflow ids associated with the engagement.

AssociatedTickets StringFalse

A comma separated list of ticket ids associated with the engagement.

Attachments StringFalse

The attachments associated with this engagement.

MessageId StringFalse

The messageId of an engagement.

ThreadId StringFalse

The threadId of an engagement.

Body StringFalse

The body of an engagement. Only used when Type = NOTE, TASK, PUBLISHING_TASK, CALL, or MEETING.

Status StringFalse

The status of the task. Only used when Type = TASK, CALL, MEETING.

ForObjectType StringFalse

The object type the task is for. For instance, CONTACT. Only used when Type = TASK.

StartTime StringFalse

The start date time for the meeting. Only used when Type = MEETING.

EndTime StringFalse

The end date time for the meeting. Only used when Type = MEETING.

Title StringFalse

The title of the meeting. Only used when Type = MEETING.

FromEmail StringFalse

The from email in the engagement. Only used when Type = EMAIL.

FromFirstName StringFalse

The first name the email was from in the engagement. Only used when Type = EMAIL.

FromLastName StringFalse

The last name the email was from in the engagement. Only used when Type = EMAIL.

ToEmail StringFalse

A comma separated list of emails the message was sent to. Only used when Type = EMAIL.

Cc StringFalse

A comma separated list of cc'd email addresses. Only used when Type = EMAIL.

Bcc StringFalse

A comma separated list of bcc'd email addresses. Only used when Type = EMAIL.

Subject StringFalse

The subject of the email. Only used when Type = EMAIL.

EmailHtml StringFalse

Html content consisting of the body of the email. Only used when Type = EMAIL.

EmailText StringFalse

Plain text content consisting of the body of the email. Only used when Type = EMAIL.

CampaignGuid StringFalse

The campaign guid of an engagement. Only used when Type = PUBLISHING_TASK.

Category StringFalse

The category of the engagement. Used when Type = PUBLISHING_TASK.

CategoryId IntegerFalse

The category id of the engagement. Used when Type = PUBLISHING_TASK.

ContentId StringFalse

The content id of the engagement. Used when Type = PUBLISHING_TASK.

State StringFalse

The state of the engagement. Used when Type = PUBLISHING_TASK.

Name StringFalse

The name of the engagement. Used when Type = PUBLISHING_TASK.

ToNumber StringFalse

The phone number that was called. Used when Type = CALL.

FromNumber StringFalse

The phone number that was used as the from number. Used when Type = CALL.

ExternalId StringFalse

For calls made in HubSpot, this will be the internal ID of the call. Used when Type = CALL.

DurationMilliseconds LongFalse

The duration of the call in milliseconds. Used when Type = CALL.

ExternalAccountId StringFalse

For calls made in HubSpot, this will be the internal ID of the account used to make the call. Used when Type = CALL.

RecordingUrl StringFalse

The URL of the recording file . Used when Type = CALL.

Disposition StringFalse

Internal GUID that corresponds to the Call Outcome. Used when Type = CALL.

MeetingOutcome StringFalse

Meeting outcome. Used when TYPE = MEETING. The allowed values are: SCHEDULED, COMPLETED, RESCHEDULED, NO SHOW, CANCELED.

TaskType StringFalse

Task type. Used when TYPE = TASK. The allowed values are: TODO, EMAIL, CALL.

ExtraUrlParameters StringTrue

An input only property for specifying additional parameters when selecting data from HubSpot. Specify the parameters as name=value pairs in a comma separated list. For instance, 'param1=value1,param2=value2,param3=value3'.