Supported Actions
| Task | Description | Method |
|---|---|---|
| Create a Deal | Creates a new deal. | POST |
| Get Deal by Id | Retrieves deal details. | GET |
| Update a Deal | Updates deal details. | PATCH |
| List all Deals | Retrieves all deals. | GET |
| Search Deal by Keyword | Searches deals by keyword. | GET |
| Delete Deal | Deletes a deal. | DELETE |
| Create a Contact | Creates a new contact. | POST |
| Get Contact by Id | Retrieves contact details. | GET |
| List All Contacts | Retrieves all contacts. | GET |
| Update a Contact | Updates contact details. | PATCH |
| Search Contact by Keyword | Searches contacts by keyword. | GET |
| Delete a Contact | Deletes a contact. | DELETE |
Create a Deal
- Install the template from HubSpot Action Templates.
-
The Create a Deal dialog task is added with the following components:
- createDeal - User intent to create a deal.
- dealName, dealStage - Entity nodes for deal details.
-
createDealService - Bot action service to create a deal. Click + to expand and click Edit Request to modify parameters.
Sample Request:
Click +Add Response to add responses:
Sample Response:
-
getAccountService - Bot action service to get account details.
- createDealMessage - Message node to display responses.
- Click Train to complete dialog task training.
- Click Talk to Bot to test and debug.
-
Follow prompts to create a deal:
-
The new deal is created in HubSpot:
-
Click View Deal to see deal details in HubSpot:
Get a Deal by ID
- Install the template from HubSpot Action Templates.
-
The Get Deal by Id dialog task is added with the following components:
- getDeal by Id - User intent to get a deal by ID.
- dealID - Entity node for entering the deal ID.
-
getDealService - Bot action service to fetch deal. Click +Add Response:
Sample Response:
- getAccountService - Bot action service to get account details.
- getDealMessage - Message node to display responses.
-
Click Train, then Talk to Bot to test:
- Click View Deal to see deal details.
List All Deals
- Install the template from HubSpot Action Templates.
-
The List All Deals dialog task is added with the following components:
- List All Deals - User intent to list all deals.
-
listAllDealsService - Bot action script to view all deals. Click +Add Response:
Sample Response: (truncated for brevity)
- getAccountService - Bot action service to get account details.
- listAllDealsMessage - Message node to display responses.
- Click Train, then Talk to Bot to test and follow prompts.
Update a Deal
- Install the template from HubSpot Action Templates.
-
The Update a Deal dialog task is added with the following components:
- Update a Deal - User intent to update a deal.
- dealId, dealUpdate, dealName, dealStage - Entity nodes for updating deal details.
- updateDealScript - Bot action script to update a deal.
-
updateDealService - Bot action service to update a deal:
Sample Request:
Click +Add Response:
Sample Response:
- getAccountService, getDealService - Bot action services.
- updateDealMessage - Message node to display responses.
-
Click Train, then Talk to Bot to test:
-
Enter all deal details when prompted. The deal is updated in HubSpot:
- Click View Deal to see updated details.
Search Deal by Keyword
- Install the template from HubSpot Action Templates.
-
The Search Deal by Keyword dialog task is added with the following components:
- Search Deal - User intent to search a deal.
- Keyword - Entity node for search keywords.
-
searchDealService - Bot action script to search deals:
Sample Request:
Sample Response: (truncated) - getAccountService - Bot action service to get account details.
- searchDealMessage - Message node to display responses.
-
Click Train, then Talk to Bot to test:
Delete a Deal
- Install the template from HubSpot Action Templates.
-
The Delete Deal dialog task is added with the following components:
- Delete Deal - User intent to delete a deal.
- DealId - Entity node for the deal ID.
-
deleteDealService - Bot action script to delete a deal:
- getAccountService - Bot action service to get account details.
- deleteDealMessage - Message node to display responses.
-
Click Train, then Talk to Bot to test:
If you enter an incorrect ID, a 404 - No Record Found error is displayed.
Create a Contact
- Install the template from HubSpot Action Templates.
-
The Create a Contact dialog task is added with the following components:
- createContact - User intent to create a contact.
- Email, firstName, lastName, phone - Entity nodes for contact details.
-
createContactService - Bot action service to create a contact. Click Edit Request:
Sample Request:
Click +Add Response:
Sample Response:
- getAccountService - Bot action service to get account details.
- createContactMessage - Message node to display responses.
- Click Train, then Talk to Bot to test.
Get a Contact by ID
- Install the template from HubSpot Action Templates.
-
The Get Contact by Id dialog task is added with the following components:
- getContact by Id - User intent to get a contact by ID.
- contactID - Entity node for the contact ID.
-
getContactService - Bot action service to fetch contact. Click Edit Request:
-
Click +Add Response:
Sample Response:
- getAccountService - Bot action service to get account details.
- getContactMessage - Message node to display responses.
- Click Train, then Talk to Bot to test.
List All Contacts
- Install the template from HubSpot Action Templates.
-
The List All Contacts dialog task is added with the following components:
- List All Contacts - User intent to list all contacts.
-
listAllContactsService - Bot action script to view all contacts:
Sample Request:
Click +Add Response:
Sample Response: (truncated)
- getAccountService - Bot action service to get account details.
- listAllContactsMessage - Message node to display responses.
- Click Train, then Talk to Bot to test.
Update a Contact
- Install the template from HubSpot Action Templates.
-
The Update a Contact dialog task is added with the following components:
- UpdateContact - User intent to update a contact.
- contactId, contactUpdate, email, firstName, lastName, phone - Entity nodes.
- updateContactScript - Bot action script to update contact.
-
updateContactService - Bot action service to update contact:
Sample Request:
Click +Add Response:
Sample Response:
- getAccountService, getContactService - Bot action services.
- updateContactMessage - Message node to display responses.
- Click Train, then Talk to Bot to test.
Search Contact by Keyword
- Install the template from HubSpot Action Templates.
-
The Search Contact by Keyword dialog task is added with the following components:
- Search Contact - User intent to search a contact.
- Keyword - Entity node for search keywords.
-
searchContactService - Bot action script to search contacts:
Sample Request:
Sample Response: - getAccountService - Bot action service to get account details.
- searchContactMessage - Message node to display responses.
- Click Train, then Talk to Bot to test.
Delete a Contact
- Install the template from HubSpot Action Templates.
-
The Delete Contact dialog task is added with the following components:
- Delete Contact - User intent to delete a contact.
- ContactId - Entity node for the contact ID.
-
deleteContactService - Bot action script to delete a contact:
- getAccountService - Bot action service to get account details.
- deleteContactMessage - Message node to display responses.
- Click Train, then Talk to Bot to test.
If you enter an incorrect ID, a 404 - No Record Found error is displayed.