Learn about CRM action components for use in UI extensions.
@hubspot/ui-extensions/crm
.
onError
callback.
Each action requires an actionType
and actionContext
.
actionType
: the type of action. See the available actions section below.actionContext
: the CRM object and record context required for the action to be performed. For example, to include an action to open a preview sidebar for a specified record, you’ll need to provide the record’s objectTypeId
and objectId
in actionContext
. See the available actions section for more information about what’s required for each action.PREVIEW_OBJECT
action opens a preview sidebar for the specified CRM record.
Requires the following actionContext
:
objectTypeId
: the CRM record’s object type (e.g., 0-1
for contacts). See full list of object IDs.objectId
: the ID of the CRM record to preview.ADD_NOTE
action opens a note composition window, enabling users to add a note to the specified CRM record.
Requires the following actionContext
:
objectTypeId
: the CRM record’s object type (e.g., 0-1
for contacts). See full list of object IDs.objectId
: the ID of the CRM record.ADD_TASK
action opens a task composition window, enabling users to add a task to the specified CRM record.
Requires the following actionContext
:
objectTypeId
: the CRM record’s object type (e.g., 0-1
for contacts). See full list of object IDs.objectId
: the ID of the CRM record.SEND_EMAIL
action opens a one-to-one email composition window, enabling users to send an email to the specified contact or the contacts associated with the specified record.
Requires the following actionContext
:
objectTypeId
: the CRM record’s object type (e.g., 0-1
for contacts). See full list of object IDs.objectId
: the ID of the CRM record to send the email to.initialEmailSubject
: optionally, set to a string to prefill the email subject line in the composition window.initialEmailBody
: optionally, set to a string to prefill the email body in the composition window.SCHEDULE_MEETING
action opens a window for scheduling a meeting.
Requires the following actionContext
:
objectTypeId
: the CRM record’s object type (e.g., 0-1
for contacts). See full list of object IDs.objectId
: the ID of the CRM record to schedule the meeting with.OPEN_RECORD_ASSOCIATION_FORM
action opens a side panel for creating a new record to be associated with another.
Requires the following actionContext
:
objectTypeId
: the type of CRM record to create (e.g., 0-2
for companies). See full list of object IDs.association
: an object containing information about the record that the new one will be associated with. This is typically the currently displaying record. Contains:
objectTypeId
: the type of CRM record to associate the new one with.objectId
: the ID of the CRM record to associate the new one with.ENGAGEMENT_APP_LINK
action navigates the user to a specific engagement on a CRM record timeline, such as a call or task.
Requires the following actionContext
:
objectTypeId
: the type of CRM record to navigate to (e.g., 0-2
for companies). See full list of object IDs.objectId
: the ID of the CRM record to navigate to.engagementId
: the ID of the engagement, such as a task or note.external
: optionally, set to true
to navigate to the engagement in a new browser tab.RECORD_APP_LINK
action navigates the user to a specific CRM record.
Requires the following actionContext
:
objectTypeId
: the type of CRM record to navigate to (e.g., 0-2
for companies). See full list of object IDs.objectId
: the ID of the CRM record to navigate to.external
: optionally, set to true
to navigate to the record in a new browser tab.includeEschref
: optionally, set to true
to include a Back button in the top left corner of the opened CRM record to navigate the user back to the original record.PAGE_APP_LINK
navigates the user to any page within the HubSpot account. Use this action when a user would need to navigate to a non-CRM record account page, such as the email tool.
Requires the following actionContext
:
path
: the URL path of the HubSpot page. This path is relative to https://app.hubspot.com
and should begin with /
.external
: optionally, set to true
to navigate to the page in a new browser tab.EXTERNAL_URL
action navigates the user to a website page in a new tab.
Requires the following actionContext
:
href
: the URL, which must begin with http
or https
. When protocol is not specified, HubSpot will automatically prefix the URL with https
.