Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Commit

Permalink
chore: add tests for company and ticket task, add logo and update REA…
Browse files Browse the repository at this point in the history
…DME.mdx
  • Loading branch information
AmeliaCelline committed Jul 13, 2024
1 parent 5363932 commit 20a2dbb
Show file tree
Hide file tree
Showing 8 changed files with 611 additions and 164 deletions.
152 changes: 144 additions & 8 deletions application/hubspot/v0/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ It can carry out the following tasks:
- [Create Contact](#create-contact)
- [Get Deal](#get-deal)
- [Create Deal](#create-deal)
- [Get Company](#get-company)
- [Create Company](#create-company)
- [Get Ticket](#get-ticket)
- [Create Ticket](#create-ticket)
- [Get Thread](#get-thread)
- [Retrieve Association](#retrieve-association)

Expand Down Expand Up @@ -56,16 +60,16 @@ Get contact information using contact ID or Email

| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Owner ID (optional) | `owner-id` | string | Owner ID |
| Owner ID (optional) | `owner-id` | string | The user who is assigned to the object |
| Email Address (optional) | `email` | string | Email address |
| First Name (optional) | `first-name` | string | First name |
| Last Name (optional) | `last-name` | string | Last name |
| Phone Number (optional) | `phone-number` | string | Phone number. Preferably, format is in country code + phone number. Example: +886xxxxxxxxx |
| Company (optional) | `company` | string | Company |
| Job Title (optional) | `job-title` | string | Job title |
| Lifecycle Stage (optional) | `lifecycle-stage` | string | Lifecycle stage. Default format is in small letters, all words are combined. Example: salesqualifiedlead. However, remember to check internal value for custom fields. |
| Lead Status (optional) | `lead-status` | string | Lead status. Default format is in capital letters, with _ as space. Example: IN_PROGRESS. However, remember to check internal value for custom fields. |
| Contact ID | `contact-id` | string | Contact ID |
| Lead Status (optional) | `lead-status` | string | Lead status. Default format is in capital letters, with _ as space. Example: IN_PROGRESS. However, remember to check internal value for custom fields. |



Expand All @@ -80,7 +84,7 @@ Create new contact
| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_CREATE_CONTACT` |
| Owner ID | `owner-id` | string | Owner ID |
| Owner ID | `owner-id` | string | The user who is assigned to the object |
| Email Address (required) | `email` | string | Email address |
| First Name | `first-name` | string | First name |
| Last Name | `last-name` | string | Last name |
Expand Down Expand Up @@ -115,14 +119,15 @@ Get deal information using deal ID

| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Owner ID (optional) | `owner-id` | string | Owner ID |
| Owner ID (optional) | `owner-id` | string | The user who is assigned to the object |
| Deal Name | `deal-name` | string | Deal name |
| Pipeline | `pipeline` | string | Pipeline. HubSpot uses interval value rather than the name displayed in the view |
| Deal Stage | `deal-stage` | string | Deal stage. Default format is in small letters, all words are combined. Example: qualifiedtobuy. However, remember to check internal value for custom fields. |
| Amount (optional) | `amount` | string | Amount |
| Amount (optional) | `amount` | number | The total amount of the deal |
| Deal Type (optional) | `deal-type` | string | Deal type. Default format is in small letters, all words are combined. Example: newbusiness. However, remember to check internal value for custom fields. |
| Close Date (optional) | `close-date` | string | Close date. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z |
| Create Date (optional) | `create-date` | string | Create date. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z |
| Associated Contact IDs (optional) | `associated-contact-id` | array[string] | Contact IDs associated with the object |



Expand All @@ -131,17 +136,18 @@ Get deal information using deal ID

### Create Deal

Create new contact
Create new deal


| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_CREATE_DEAL` |
| Contact ID or Email | `contact-id-or-email` | string | Use to associate contact with deal. If the input has @, it will use email, otherwise, it will use contact id. |
| Owner ID | `owner-id` | string | The user who is assigned to the object |
| Deal Name (required) | `deal-name` | string | Deal name |
| Pipeline (required) | `pipeline` | string | Pipeline. HubSpot uses interval value rather than the name displayed in the view |
| Deal Stage (required) | `deal-stage` | string | Deal stage. Default format is in small letters, all words are combined. Example: qualifiedtobuy. However, remember to check internal value for custom fields. |
| Amount | `amount` | string | Amount |
| Amount | `amount` | number | The total amount of the deal |
| Deal Type | `deal-type` | string | Deal type. Default format is in small letters, all words are combined. Example: newbusiness. However, remember to check internal value for custom fields. |
| Close Date | `close-date` | string | Close date. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z |

Expand All @@ -156,6 +162,136 @@ Create new contact



### Get Company

Get company information using company ID


| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_GET_COMPANY` |
| Company ID (required) | `company-id` | string | Input company ID |



| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Owner ID (optional) | `owner-id` | string | The user who is assigned to the object |
| Company Name (optional) | `company-name` | string | Company name |
| Company Domain (optional) | `company-domain` | string | The domain name of the company |
| Description (optional) | `description` | string | Description of the company |
| Phone Number (optional) | `phone-number` | string | Phone number of the company |
| Industry (optional) | `industry` | string | The industry the company belongs to. Default format is in capital letters, with _ as space. Example: BROADCAST_MEDIA |
| Company Type (optional) | `company-type` | string | Type of company. Default format is capital letter. Example: RESELLER |
| City (optional) | `city` | string | City |
| State (optional) | `state` | string | State |
| Country (optional) | `country` | string | Country |
| Postal Code (optional) | `postal-code,` | string | Postal code |
| Time Zone (optional) | `time-zone` | string | Time zone |
| Annual Revenue (optional) | `annual-revenue` | number | Annual revenue |
| Total Revenue (optional) | `total-revenue` | number | Total revenue. Calculated automatically by HubSpot |
| Linkedin Page (optional) | `linkedin-page` | string | Linkedin page of the company |
| Associated Contact IDs (optional) | `associated-contact-id` | array[string] | Contact IDs associated with the object |






### Create Company

Create new company


| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_CREATE_COMPANY` |
| Contact ID or Email | `contact-id-or-email` | string | Use to associate contact with company. If the input has @, it will use email, otherwise, it will use contact id. |
| Owner ID | `owner-id` | string | The user who is assigned to the object |
| Company Name | `company-name` | string | Company name |
| Company Domain (required) | `company-domain` | string | The domain name of the company |
| Description | `description` | string | Description of the company |
| Phone Number | `phone-number` | string | Phone number of the company |
| Industry | `industry` | string | The industry the company belongs to. Default format is in capital letters, with _ as space. Example: BROADCAST_MEDIA |
| Company Type | `company-type` | string | Type of company. Default format is capital letter. Example: RESELLER |
| City | `city` | string | City |
| State | `state` | string | State |
| Country | `country` | string | Country |
| Postal Code | `postal-code,` | string | Postal code |
| Time Zone | `time-zone` | string | Time zone |
| Annual Revenue | `annual-revenue` | number | Annual revenue |
| Linkedin Page | `linkedin-page` | string | Linkedin page of the company |



| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Company ID | `company-id` | string | Company ID |






### Get Ticket

Get ticket information using ticket ID


| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_GET_TICKET` |
| Ticket ID (required) | `ticket-id` | string | Input ticket ID |



| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Owner ID (optional) | `owner-id` | string | The user who is assigned to the object |
| Ticket Name | `ticket-name` | string | Ticket name |
| Ticket Status | `ticket-status` | string | Ticket Status. Default format is number. Example: 0. However, remember to check internal value for custom fields. |
| Pipeline | `pipeline` | string | Pipeline. HubSpot uses interval value rather than the name displayed in the view |
| Category (optional) | `category` | array[string] | Category, main reason customer reached out for help. Default format is in capital letters. Example: BILLING_ISSUE. However, remember to check internal value for custom fields. |
| Priority (optional) | `priority` | string | The level of attention needed on the ticket. Default format is in capital letters. Example: MEDIUM. However, remember to check internal value for custom fields. |
| Source (optional) | `source` | string | Channel where ticket was originally submitted. Default format is in capital letters. Example: EMAIL |
| Record Source (optional) | `record-source` | string | How this record was created. |
| Create Date (optional) | `create-date` | string | Create date. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z |
| Last Modified Date (optional) | `last-modified-date` | string | Last modified date. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z |
| Associated Contact IDs (optional) | `associated-contact-id` | array[string] | Contact IDs associated with the object |






### Create Ticket

Create new ticket


| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_CREATE_TICKET` |
| Contact ID or Email | `contact-id-or-email` | string | Use to associate contact with ticket. If the input has @, it will use email, otherwise, it will use contact id. |
| Owner ID | `owner-id` | string | The user who is assigned to the object |
| Ticket Name (required) | `ticket-name` | string | Ticket name |
| Ticket Status (required) | `ticket-status` | string | Ticket Status. Default format is number. Example: 0. However, remember to check internal value for custom fields. |
| Pipeline (required) | `pipeline` | string | Pipeline. HubSpot uses interval value rather than the name displayed in the view |
| Category | `category` | array[string] | Category, main reason customer reached out for help. Default format is in capital letters. Example: BILLING_ISSUE. However, remember to check internal value for custom fields. |
| Priority | `priority` | string | The level of attention needed on the ticket. Default format is in capital letters. Example: MEDIUM. However, remember to check internal value for custom fields. |
| Source | `source` | string | Channel where ticket was originally submitted. Default format is in capital letters. Example: EMAIL |



| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Ticket ID | `ticket-id` | string | Ticket ID |






### Get Thread

Retrieve all the messages inside a thread (conversation inbox)
Expand All @@ -179,7 +315,7 @@ Retrieve all the messages inside a thread (conversation inbox)

### Retrieve Association

Get all the object IDs associated with contact ID
Get the object IDs associated with contact ID (contact->objects). If you are trying to do the opposite (object->contacts), it is possible using the other tasks. Example: Go to get deal task to obtain deal->contacts


| Input | ID | Type | Description |
Expand Down
3 changes: 3 additions & 0 deletions application/hubspot/v0/assets/HubSpot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions application/hubspot/v0/company.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func CompanyConvertToTaskFormat(company *CompanyInfoHSFormat) (*CompanyInfoTaskF
}

ret := &CompanyInfoTaskFormat{
OwnerId: company.OwnerId,
CompanyName: company.CompanyName,
CompanyDomain: company.CompanyDomain,
Description: company.Description,
Expand Down
2 changes: 1 addition & 1 deletion application/hubspot/v0/config/definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
],
"custom": false,
"documentationUrl": "https://www.instill.tech/docs/component/application/hubspot",
"icon": "assets/hubspot.svg",
"icon": "assets/HubSpot.svg",
"iconUrl": "",
"id": "hubspot",
"public": true,
Expand Down
4 changes: 2 additions & 2 deletions application/hubspot/v0/config/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@
"type": "string"
},
"phone-number": {
"description": "Description of the company",
"description": "Phone number of the company",
"instillUIOrder": 5,
"title": "Description",
"title": "Phone Number",
"type": "string"
},
"industry": {
Expand Down
Loading

0 comments on commit 20a2dbb

Please sign in to comment.