CRM action components (BETA)
-
Sales Hub
- Enterprise
-
Service Hub
- Enterprise
CRM action components provide a built-in set of CRM-related actions, including adding notes to records, opening a one-to-one email composition window, creating new records, and more. Each component can perform the same set of actions, so which component to choose will depend on your needs and preferences.
Below, learn more about CRM action components and actions available to each.
CRM action components are imported from @hubspot/ui-extensions/crm
.
- CrmActionButton: renders a button.
- CrmActionLink: renders a clickable link.
- CrmCardActions: renders dropdown menu buttons in the top right of the extension.
Users can only take actions through these components when they have the proper permissions. For example, if a user doesn't have permission to create deal records, they won't be able to use a CRM action component to create a deal record. Instead, an error message will be generated and returned through an optional 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'sobjectTypeId
andobjectId
inactionContext
. See the available actions section for more information about what's required for each action.
The following actions are available for CRM action components:
The 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.
The 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.
The 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.
The 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.
The 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.
The 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 totrue
to navigate to the engagement in a new browser tab.
The 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 totrue
to navigate to the record in a new browser tab.includeEschref
: optionally, set totrue
to include a Back button in the top left corner of the opened CRM record to navigate the user back to the original record.
The 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 tohttps://app.hubspot.com
and should begin with/
.external
: optionally, set totrue
to navigate to the page in a new browser tab.
The EXTERNAL_URL
action navigates the user to a website page in a new tab.
Requires the following actionContext
:
href
: the URL, which must begin withhttp
orhttps
. When protocol is not specified, HubSpot will automatically prefix the URL withhttps
.
Thank you for your feedback, it means a lot to us.