2023-01-27 03:22:44 -08:00
|
|
|
import type { OptionsWithUri } from 'request';
|
2019-12-03 13:48:17 -08:00
|
|
|
|
2023-01-27 03:22:44 -08:00
|
|
|
import type {
|
2023-03-09 09:13:15 -08:00
|
|
|
ICredentialDataDecryptedObject,
|
|
|
|
ICredentialTestFunctions,
|
|
|
|
IDataObject,
|
2019-12-03 13:48:17 -08:00
|
|
|
IExecuteFunctions,
|
2020-04-17 14:42:41 -07:00
|
|
|
IExecuteSingleFunctions,
|
2019-12-03 13:48:17 -08:00
|
|
|
IHookFunctions,
|
|
|
|
ILoadOptionsFunctions,
|
2022-03-13 03:52:47 -07:00
|
|
|
JsonObject,
|
2019-12-03 13:48:17 -08:00
|
|
|
} from 'n8n-workflow';
|
2023-01-27 03:22:44 -08:00
|
|
|
import { NodeApiError } from 'n8n-workflow';
|
2019-12-03 13:48:17 -08:00
|
|
|
|
2022-04-08 14:32:08 -07:00
|
|
|
import moment from 'moment';
|
2021-12-29 14:36:25 -08:00
|
|
|
|
2022-08-17 08:50:24 -07:00
|
|
|
export async function hubspotApiRequest(
|
|
|
|
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
|
|
|
method: string,
|
|
|
|
endpoint: string,
|
2022-12-02 06:25:21 -08:00
|
|
|
|
2022-08-17 08:50:24 -07:00
|
|
|
body: any = {},
|
|
|
|
query: IDataObject = {},
|
|
|
|
uri?: string,
|
|
|
|
): Promise<any> {
|
2020-06-13 16:48:24 -07:00
|
|
|
let authenticationMethod = this.getNodeParameter('authentication', 0);
|
|
|
|
|
|
|
|
if (this.getNode().type.includes('Trigger')) {
|
|
|
|
authenticationMethod = 'developerApi';
|
|
|
|
}
|
2020-03-13 04:09:09 -07:00
|
|
|
|
2019-12-03 13:48:17 -08:00
|
|
|
const options: OptionsWithUri = {
|
|
|
|
method,
|
|
|
|
qs: query,
|
2022-03-13 03:49:15 -07:00
|
|
|
headers: {},
|
2023-01-19 04:37:19 -08:00
|
|
|
uri: uri || `https://api.hubapi.com${endpoint}`,
|
2019-12-03 13:48:17 -08:00
|
|
|
body,
|
2019-12-04 09:21:02 -08:00
|
|
|
json: true,
|
|
|
|
useQuerystring: true,
|
2019-12-03 13:48:17 -08:00
|
|
|
};
|
2020-06-08 05:40:23 -07:00
|
|
|
|
2019-12-03 13:48:17 -08:00
|
|
|
try {
|
2022-10-17 04:13:59 -07:00
|
|
|
if (authenticationMethod === 'apiKey' || authenticationMethod === 'appToken') {
|
|
|
|
const credentialType = authenticationMethod === 'apiKey' ? 'hubspotApi' : 'hubspotAppToken';
|
2022-12-02 12:54:28 -08:00
|
|
|
return await this.helpers.requestWithAuthentication.call(this, credentialType, options);
|
2020-06-13 16:48:24 -07:00
|
|
|
} else if (authenticationMethod === 'developerApi') {
|
2021-12-10 11:28:59 -08:00
|
|
|
if (endpoint.includes('webhooks')) {
|
|
|
|
const credentials = await this.getCredentials('hubspotDeveloperApi');
|
2022-04-14 23:00:47 -07:00
|
|
|
options.qs.hapikey = credentials.apiKey as string;
|
2022-12-23 10:09:52 -08:00
|
|
|
return await this.helpers.request(options);
|
2021-12-10 11:28:59 -08:00
|
|
|
} else {
|
2022-12-23 10:09:52 -08:00
|
|
|
return await this.helpers.requestOAuth2.call(this, 'hubspotDeveloperApi', options, {
|
2022-08-17 08:50:24 -07:00
|
|
|
tokenType: 'Bearer',
|
|
|
|
includeCredentialsOnRefreshOnBody: true,
|
|
|
|
});
|
2021-12-10 11:28:59 -08:00
|
|
|
}
|
2020-06-08 05:40:23 -07:00
|
|
|
} else {
|
2022-12-23 10:09:52 -08:00
|
|
|
return await this.helpers.requestOAuth2.call(this, 'hubspotOAuth2Api', options, {
|
2022-08-17 08:50:24 -07:00
|
|
|
tokenType: 'Bearer',
|
|
|
|
includeCredentialsOnRefreshOnBody: true,
|
|
|
|
});
|
2020-06-08 05:40:23 -07:00
|
|
|
}
|
2019-12-03 13:48:17 -08:00
|
|
|
} catch (error) {
|
2022-03-13 03:52:47 -07:00
|
|
|
throw new NodeApiError(this.getNode(), error as JsonObject);
|
2020-03-22 19:39:40 -07:00
|
|
|
}
|
|
|
|
}
|
2019-12-03 13:48:17 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Make an API request to paginated hubspot endpoint
|
|
|
|
* and return all results
|
|
|
|
*/
|
2022-08-17 08:50:24 -07:00
|
|
|
export async function hubspotApiRequestAllItems(
|
|
|
|
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
|
|
|
propertyName: string,
|
|
|
|
method: string,
|
|
|
|
endpoint: string,
|
2022-12-02 06:25:21 -08:00
|
|
|
|
2022-08-17 08:50:24 -07:00
|
|
|
body: any = {},
|
|
|
|
query: IDataObject = {},
|
|
|
|
): Promise<any> {
|
2019-12-03 13:48:17 -08:00
|
|
|
const returnData: IDataObject[] = [];
|
|
|
|
|
|
|
|
let responseData;
|
|
|
|
|
2023-01-19 04:37:19 -08:00
|
|
|
query.limit = query.limit || 250;
|
2019-12-03 13:48:17 -08:00
|
|
|
query.count = 100;
|
2020-04-17 14:42:41 -07:00
|
|
|
body.limit = body.limit || 100;
|
2019-12-03 13:48:17 -08:00
|
|
|
|
|
|
|
do {
|
|
|
|
responseData = await hubspotApiRequest.call(this, method, endpoint, body, query);
|
|
|
|
query.offset = responseData.offset;
|
2020-12-29 23:01:27 -08:00
|
|
|
query.vidOffset = responseData['vid-offset'];
|
2022-07-04 00:48:21 -07:00
|
|
|
//Used by Search endpoints
|
2022-12-02 12:54:28 -08:00
|
|
|
if (responseData.paging) {
|
|
|
|
body.after = responseData.paging.next.after;
|
2022-07-04 00:48:21 -07:00
|
|
|
}
|
2023-02-27 19:39:43 -08:00
|
|
|
returnData.push.apply(returnData, responseData[propertyName] as IDataObject[]);
|
2020-12-29 23:01:27 -08:00
|
|
|
//ticket:getAll endpoint does not support setting a limit, so return once the limit is reached
|
2023-03-30 04:59:59 -07:00
|
|
|
const limit = query.limit as number | undefined;
|
|
|
|
if (limit && limit <= returnData.length && endpoint.includes('/tickets/paged')) {
|
2020-04-07 21:35:50 -07:00
|
|
|
return returnData;
|
|
|
|
}
|
2022-12-02 12:54:28 -08:00
|
|
|
} while (responseData.hasMore || responseData['has-more'] || responseData.paging);
|
2019-12-03 13:48:17 -08:00
|
|
|
return returnData;
|
|
|
|
}
|
|
|
|
|
2022-08-17 08:50:24 -07:00
|
|
|
export function validateJSON(json: string | undefined): any {
|
2019-12-03 13:48:17 -08:00
|
|
|
let result;
|
|
|
|
try {
|
|
|
|
result = JSON.parse(json!);
|
|
|
|
} catch (exception) {
|
|
|
|
result = '';
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
2021-01-31 23:31:40 -08:00
|
|
|
|
2021-08-11 10:35:21 -07:00
|
|
|
export function clean(obj: any) {
|
|
|
|
for (const propName in obj) {
|
|
|
|
if (obj[propName] === null || obj[propName] === undefined || obj[propName] === '') {
|
|
|
|
delete obj[propName];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return obj;
|
|
|
|
}
|
|
|
|
|
2021-01-31 23:31:40 -08:00
|
|
|
export const propertyEvents = [
|
|
|
|
'contact.propertyChange',
|
|
|
|
'company.propertyChange',
|
|
|
|
'deal.propertyChange',
|
|
|
|
];
|
|
|
|
|
|
|
|
export const contactFields = [
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'company_size',
|
|
|
|
label: 'testingricardo',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'date',
|
|
|
|
label: 'Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'date_of_birth',
|
|
|
|
label: 'Date of birth',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'days_to_close',
|
|
|
|
label: 'Days To Close',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'degree',
|
|
|
|
label: 'Degree',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'field_of_study',
|
|
|
|
label: 'Field of study',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'first_conversion_date',
|
|
|
|
label: 'First Conversion Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'first_conversion_event_name',
|
|
|
|
label: 'First Conversion',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'first_deal_created_date',
|
|
|
|
label: 'First Deal Created Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'gender',
|
|
|
|
label: 'Gender',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'graduation_date',
|
|
|
|
label: 'Graduation date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_additional_emails',
|
|
|
|
label: 'Additional email addresses',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_all_contact_vids',
|
|
|
|
label: 'All vids for a contact',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_first_touch_converting_campaign',
|
|
|
|
label: 'First Touch Converting Campaign',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_last_touch_converting_campaign',
|
|
|
|
label: 'Last Touch Converting Campaign',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_avatar_filemanager_key',
|
|
|
|
label: 'Avatar FileManager key',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_buying_role',
|
|
|
|
label: 'Buying Role',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_calculated_form_submissions',
|
|
|
|
label: 'All form submissions for a contact',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_calculated_merged_vids',
|
|
|
|
label: 'Merged vids with timestamps of a contact',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_calculated_mobile_number',
|
|
|
|
label: 'Calculated Mobile Number in International Format',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_calculated_phone_number',
|
|
|
|
label: 'Calculated Phone Number in International Format',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_calculated_phone_number_area_code',
|
|
|
|
label: 'Calculated Phone Number Area Code',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_calculated_phone_number_country_code',
|
|
|
|
label: 'Calculated Phone Number Country Code',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_calculated_phone_number_region_code',
|
|
|
|
label: 'Calculated Phone Number Region',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_content_membership_email_confirmed',
|
|
|
|
label: 'Email Confirmed',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_content_membership_notes',
|
|
|
|
label: 'Membership Notes',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_content_membership_registered_at',
|
|
|
|
label: 'Registered At',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_content_membership_registration_domain_sent_to',
|
|
|
|
label: 'Domain to which registration email was sent',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_content_membership_registration_email_sent_at',
|
|
|
|
label: 'Time registration email was sent',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_content_membership_status',
|
|
|
|
label: 'Status',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_conversations_visitor_email',
|
|
|
|
label: 'Conversations visitor email',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_count_is_unworked',
|
|
|
|
label: 'Count of unengaged contacts',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_count_is_worked',
|
|
|
|
label: 'Count of engaged contacts',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_created_by_conversations',
|
|
|
|
label: 'Created By Conversations',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_created_by_user_id',
|
|
|
|
label: 'Created by user ID',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_createdate',
|
|
|
|
label: 'Object create date/time',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_document_last_revisited',
|
|
|
|
label: 'Recent Document Revisit Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_bad_address',
|
|
|
|
label: 'Invalid email address',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_customer_quarantined_reason',
|
|
|
|
label: 'Email address quarantine reason',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_domain',
|
|
|
|
label: 'Email Domain',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_hard_bounce_reason',
|
|
|
|
label: 'Email hard bounce reason',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_hard_bounce_reason_enum',
|
|
|
|
label: 'Email hard bounce reason',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_quarantined',
|
|
|
|
label: 'Email Address Quarantined',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_quarantined_reason',
|
|
|
|
label: 'Email address internal quarantine reason',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_recipient_fatigue_recovery_time',
|
|
|
|
label: 'Email Address Recipient Fatigue Next Available Sending Time',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_sends_since_last_engagement',
|
|
|
|
label: 'Sends Since Last Engagement',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_emailconfirmationstatus',
|
|
|
|
label: 'Marketing email confirmation status',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_facebook_ad_clicked',
|
|
|
|
label: 'Clicked Facebook ad',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_facebook_click_id',
|
|
|
|
label: 'Facebook click id',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_facebookid',
|
|
|
|
label: 'Facebook ID',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_feedback_last_nps_follow_up',
|
|
|
|
label: 'Last NPS survey comment',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_feedback_last_nps_rating',
|
|
|
|
label: 'Last NPS survey rating',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_feedback_last_survey_date',
|
|
|
|
label: 'Last NPS survey date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_feedback_show_nps_web_survey',
|
|
|
|
label: 'Should be shown an NPS web survey',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_first_engagement_object_id',
|
|
|
|
label: 'ID of first engagement',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_google_click_id',
|
|
|
|
label: 'Google ad click id',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_googleplusid',
|
|
|
|
label: 'googleplus ID',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_ip_timezone',
|
|
|
|
label: 'IP Timezone',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_is_contact',
|
|
|
|
label: 'Is a contact',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_is_unworked',
|
|
|
|
label: 'Contact unworked',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_last_sales_activity_date',
|
|
|
|
label: 'last sales activity date old',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_last_sales_activity_timestamp',
|
|
|
|
label: 'Last Engagement Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_lastmodifieddate',
|
|
|
|
label: 'Object last modified date/time',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_lead_status',
|
|
|
|
label: 'Lead Status',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_legal_basis',
|
|
|
|
label: "Legal basis for processing contact's data",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_linkedinid',
|
|
|
|
label: 'Linkedin ID',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_marketable_reason_id',
|
|
|
|
label: 'Marketing contact status source name',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_marketable_reason_type',
|
|
|
|
label: 'Marketing contact status source type',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_marketable_status',
|
|
|
|
label: 'Marketing contact status',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_marketable_until_renewal',
|
|
|
|
label: 'Marketing contact until next update',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_merged_object_ids',
|
|
|
|
label: 'Merged object IDs',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_object_id',
|
|
|
|
label: 'Contact ID',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_predictivecontactscore_v2',
|
|
|
|
label: 'Likelihood to close',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_predictivescoringtier',
|
|
|
|
label: 'Contact priority',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_sa_first_engagement_date',
|
|
|
|
label: 'Date of first engagement',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_sa_first_engagement_descr',
|
|
|
|
label: 'Description of first engagement',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_sa_first_engagement_object_type',
|
|
|
|
label: 'Type of first engagement',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_sales_email_last_clicked',
|
|
|
|
label: 'Recent Sales Email Clicked Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_sales_email_last_opened',
|
|
|
|
label: 'Recent Sales Email Opened Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_searchable_calculated_international_mobile_number',
|
|
|
|
label: 'Calculated Mobile Number with country code',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_searchable_calculated_international_phone_number',
|
|
|
|
label: 'Calculated Phone Number with country code',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_searchable_calculated_mobile_number',
|
|
|
|
label: 'Calculated Mobile Number without country code',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_searchable_calculated_phone_number',
|
|
|
|
label: 'Calculated Phone Number without country code',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_sequences_is_enrolled',
|
|
|
|
label: 'Currently in Sequence',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_testpurge',
|
|
|
|
label: 'testpurge',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_testrollback',
|
|
|
|
label: 'testrollback',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_time_between_contact_creation_and_deal_close',
|
|
|
|
label: 'Time between contact creation and deal close',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_time_between_contact_creation_and_deal_creation',
|
|
|
|
label: 'Time between contact creation and deal creation',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_time_to_first_engagement',
|
|
|
|
label: 'Lead response time',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_time_to_move_from_lead_to_customer',
|
|
|
|
label: 'Time to move from lead to customer',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_time_to_move_from_marketingqualifiedlead_to_customer',
|
|
|
|
label: 'Time to move from marketing qualified lead to customer',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_time_to_move_from_opportunity_to_customer',
|
|
|
|
label: 'Time to move from opportunity to customer',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_time_to_move_from_salesqualifiedlead_to_customer',
|
|
|
|
label: 'Time to move from sales qualified lead to customer',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_time_to_move_from_subscriber_to_customer',
|
|
|
|
label: 'Time to move from subscriber to customer',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_twitterid',
|
|
|
|
label: 'Twitter ID',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_updated_by_user_id',
|
|
|
|
label: 'Updated by user ID',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_user_ids_of_all_owners',
|
|
|
|
label: 'User IDs of all owners',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hubspot_owner_assigneddate',
|
|
|
|
label: 'Owner Assigned Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'ip_city',
|
|
|
|
label: 'IP City',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'ip_country',
|
|
|
|
label: 'IP Country',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'ip_country_code',
|
|
|
|
label: 'IP Country Code',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'ip_latlon',
|
|
|
|
label: 'IP Latitude & Longitude',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'ip_state',
|
|
|
|
label: 'IP State/Region',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'ip_state_code',
|
|
|
|
label: 'IP State Code/Region Code',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'ip_zipcode',
|
|
|
|
label: 'IP Zipcode',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'job_function',
|
|
|
|
label: 'Job function',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'lastmodifieddate',
|
|
|
|
label: 'Last Modified Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'marital_status',
|
|
|
|
label: 'Marital Status',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'military_status',
|
|
|
|
label: 'Military status',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'num_associated_deals',
|
|
|
|
label: 'Associated Deals',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'num_conversion_events',
|
|
|
|
label: 'Number of Form Submissions',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'num_unique_conversion_events',
|
|
|
|
label: 'Number of Unique Forms Submitted',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'recent_conversion_date',
|
|
|
|
label: 'Recent Conversion Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'recent_conversion_event_name',
|
|
|
|
label: 'Recent Conversion',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'recent_deal_amount',
|
|
|
|
label: 'Recent Deal Amount',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'recent_deal_close_date',
|
|
|
|
label: 'Recent Deal Close Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'relationship_status',
|
|
|
|
label: 'Relationship Status',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'school',
|
|
|
|
label: 'School',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'seniority',
|
|
|
|
label: 'Seniority',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'start_date',
|
|
|
|
label: 'Start date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'testing',
|
|
|
|
label: 'testing',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'total_revenue',
|
|
|
|
label: 'Total Revenue',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'work_email',
|
|
|
|
label: 'Work email',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'firstname',
|
|
|
|
label: 'First Name',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_first_url',
|
|
|
|
label: 'First Page Seen',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_delivered',
|
|
|
|
label: 'Marketing emails delivered',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_optout_6871816',
|
|
|
|
label: 'Opted out of email: Marketing Information',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_optout_8363428',
|
|
|
|
label: 'Opted out of email: One to One',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'twitterhandle',
|
|
|
|
label: 'Twitter Username',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'currentlyinworkflow',
|
|
|
|
label: 'Currently in workflow',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'followercount',
|
|
|
|
label: 'Follower Count',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_last_url',
|
|
|
|
label: 'Last Page Seen',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_open',
|
|
|
|
label: 'Marketing emails opened',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'lastname',
|
|
|
|
label: 'Last Name',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_num_page_views',
|
|
|
|
label: 'Number of Pageviews',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_click',
|
|
|
|
label: 'Marketing emails clicked',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'salutation',
|
|
|
|
label: 'Salutation',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'twitterprofilephoto',
|
|
|
|
label: 'Twitter Profile Photo',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'email',
|
|
|
|
label: 'Email',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_num_visits',
|
|
|
|
label: 'Number of Sessions',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_bounce',
|
|
|
|
label: 'Marketing emails bounced',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_persona',
|
|
|
|
label: 'Persona',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_social_last_engagement',
|
|
|
|
label: 'Most Recent Social Click',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_num_event_completions',
|
|
|
|
label: 'Number of event completions',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_optout',
|
|
|
|
label: 'Unsubscribed from all email',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_social_twitter_clicks',
|
|
|
|
label: 'Twitter Clicks',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'mobilephone',
|
|
|
|
label: 'Mobile Phone Number',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'phone',
|
|
|
|
label: 'Phone Number',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'fax',
|
|
|
|
label: 'Fax Number',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_first_timestamp',
|
|
|
|
label: 'Time First Seen',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_last_email_name',
|
|
|
|
label: 'Last marketing email name',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_last_send_date',
|
|
|
|
label: 'Last marketing email send date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_social_facebook_clicks',
|
|
|
|
label: 'Facebook Clicks',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'address',
|
|
|
|
label: 'Street Address',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'engagements_last_meeting_booked',
|
|
|
|
label: 'Date of last meeting booked in meetings tool',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'engagements_last_meeting_booked_campaign',
|
|
|
|
label: 'Campaign of last booking in meetings tool',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'engagements_last_meeting_booked_medium',
|
|
|
|
label: 'Medium of last booking in meetings tool',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'engagements_last_meeting_booked_source',
|
|
|
|
label: 'Source of last booking in meetings tool',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_first_visit_timestamp',
|
|
|
|
label: 'Time of First Session',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_last_open_date',
|
|
|
|
label: 'Last marketing email open date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_latest_meeting_activity',
|
|
|
|
label: 'Latest meeting activity',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_sales_email_last_replied',
|
|
|
|
label: 'Recent Sales Email Replied Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_social_linkedin_clicks',
|
|
|
|
label: 'LinkedIn Clicks',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hubspot_owner_id',
|
|
|
|
label: 'Contact owner',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'notes_last_contacted',
|
|
|
|
label: 'Last Contacted',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'notes_last_updated',
|
|
|
|
label: 'Last Activity Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'notes_next_activity_date',
|
|
|
|
label: 'Next Activity Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'num_contacted_notes',
|
|
|
|
label: 'Number of times contacted',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'num_notes',
|
|
|
|
label: 'Number of Sales Activities',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'owneremail',
|
|
|
|
label: 'HubSpot Owner Email (legacy)',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'ownername',
|
|
|
|
label: 'HubSpot Owner Name (legacy)',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'surveymonkeyeventlastupdated',
|
|
|
|
label: 'SurveyMonkey Event Last Updated',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'webinareventlastupdated',
|
|
|
|
label: 'Webinar Event Last Updated',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'city',
|
|
|
|
label: 'City',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_last_timestamp',
|
|
|
|
label: 'Time Last Seen',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_last_click_date',
|
|
|
|
label: 'Last marketing email click date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_social_google_plus_clicks',
|
|
|
|
label: 'Google Plus Clicks',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hubspot_team_id',
|
|
|
|
label: 'HubSpot Team',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'linkedinbio',
|
|
|
|
label: 'LinkedIn Bio',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'twitterbio',
|
|
|
|
label: 'Twitter Bio',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_all_owner_ids',
|
|
|
|
label: 'All owner ids',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_last_visit_timestamp',
|
|
|
|
label: 'Time of Last Session',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_first_send_date',
|
|
|
|
label: 'First marketing email send date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_social_num_broadcast_clicks',
|
|
|
|
label: 'Broadcast Clicks',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'state',
|
|
|
|
label: 'State/Region',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_all_team_ids',
|
|
|
|
label: 'All team ids',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_source',
|
|
|
|
label: 'Original Source',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_first_open_date',
|
|
|
|
label: 'First marketing email open date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'zip',
|
|
|
|
label: 'Postal Code',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'country',
|
|
|
|
label: 'Country/Region',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_all_accessible_team_ids',
|
|
|
|
label: 'All accessible team ids',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_source_data_1',
|
|
|
|
label: 'Original Source Drill-Down 1',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_first_click_date',
|
|
|
|
label: 'First marketing email click date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'linkedinconnections',
|
|
|
|
label: 'LinkedIn Connections',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_source_data_2',
|
|
|
|
label: 'Original Source Drill-Down 2',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_is_ineligible',
|
|
|
|
label: 'Is globally ineligible',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_language',
|
|
|
|
label: 'Preferred language',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'kloutscoregeneral',
|
|
|
|
label: 'Klout Score',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_first_referrer',
|
|
|
|
label: 'First Referring Site',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_first_reply_date',
|
|
|
|
label: 'First marketing email reply date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'jobtitle',
|
|
|
|
label: 'Job Title',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'photo',
|
|
|
|
label: 'Photo',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_last_referrer',
|
|
|
|
label: 'Last Referring Site',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_last_reply_date',
|
|
|
|
label: 'Last marketing email reply date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'message',
|
|
|
|
label: 'Message',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'closedate',
|
|
|
|
label: 'Close Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_average_page_views',
|
|
|
|
label: 'Average Pageviews',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_email_replied',
|
|
|
|
label: 'Marketing emails replied',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_revenue',
|
|
|
|
label: 'Event Revenue',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_lifecyclestage_lead_date',
|
|
|
|
label: 'Became a Lead Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_lifecyclestage_marketingqualifiedlead_date',
|
|
|
|
label: 'Became a Marketing Qualified Lead Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_lifecyclestage_opportunity_date',
|
|
|
|
label: 'Became an Opportunity Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'lifecyclestage',
|
|
|
|
label: 'Lifecycle Stage',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_lifecyclestage_salesqualifiedlead_date',
|
|
|
|
label: 'Became a Sales Qualified Lead Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'createdate',
|
|
|
|
label: 'Create Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_lifecyclestage_evangelist_date',
|
|
|
|
label: 'Became an Evangelist Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_lifecyclestage_customer_date',
|
|
|
|
label: 'Became a Customer Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hubspotscore',
|
|
|
|
label: 'HubSpot Score',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'company',
|
|
|
|
label: 'Company Name',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_lifecyclestage_subscriber_date',
|
|
|
|
label: 'Became a Subscriber Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_lifecyclestage_other_date',
|
|
|
|
label: 'Became an Other Lifecycle Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'website',
|
|
|
|
label: 'Website URL',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'numemployees',
|
|
|
|
label: 'Number of Employees',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'annualrevenue',
|
|
|
|
label: 'Annual Revenue',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'industry',
|
|
|
|
label: 'Industry',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'associatedcompanyid',
|
|
|
|
label: 'Associated Company ID',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'associatedcompanylastupdated',
|
|
|
|
label: 'Associated Company Last Updated',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_predictivecontactscorebucket',
|
|
|
|
label: 'Lead Rating',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_predictivecontactscore',
|
|
|
|
label: 'Predictive Lead Score',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export const companyFields = [
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'about_us',
|
|
|
|
label: 'About Us',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'closedate_timestamp_earliest_value_a2a17e6e',
|
|
|
|
label: 'closedate_timestamp_earliest_value_a2a17e6e',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'facebookfans',
|
|
|
|
label: 'Facebook Fans',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'first_contact_createdate_timestamp_earliest_value_78b50eea',
|
|
|
|
label: 'first_contact_createdate_timestamp_earliest_value_78b50eea',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'first_conversion_date',
|
|
|
|
label: 'First Conversion Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'first_conversion_date_timestamp_earliest_value_61f58f2c',
|
|
|
|
label: 'first_conversion_date_timestamp_earliest_value_61f58f2c',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'first_conversion_event_name',
|
|
|
|
label: 'First Conversion',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'first_conversion_event_name_timestamp_earliest_value_68ddae0a',
|
|
|
|
label: 'first_conversion_event_name_timestamp_earliest_value_68ddae0a',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'first_deal_created_date',
|
|
|
|
label: 'First Deal Created Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'founded_year',
|
|
|
|
label: 'Year Founded',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_additional_domains',
|
|
|
|
label: 'Additional Domains',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_first_timestamp',
|
|
|
|
label: 'Time First Seen',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_first_timestamp_timestamp_earliest_value_11e3a63a',
|
|
|
|
label: 'hs_analytics_first_timestamp_timestamp_earliest_value_11e3a63a',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_first_touch_converting_campaign',
|
|
|
|
label: 'First Touch Converting Campaign',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_first_touch_converting_campaign_timestamp_earliest_value_4757fe10',
|
|
|
|
label: 'hs_analytics_first_touch_converting_campaign_timestamp_earliest_value_4757fe10',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_first_visit_timestamp',
|
|
|
|
label: 'Time of First Session',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_first_visit_timestamp_timestamp_earliest_value_accc17ae',
|
|
|
|
label: 'hs_analytics_first_visit_timestamp_timestamp_earliest_value_accc17ae',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_last_timestamp',
|
|
|
|
label: 'Time Last Seen',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_last_timestamp_timestamp_latest_value_4e16365a',
|
|
|
|
label: 'hs_analytics_last_timestamp_timestamp_latest_value_4e16365a',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_last_touch_converting_campaign',
|
|
|
|
label: 'Last Touch Converting Campaign',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_last_touch_converting_campaign_timestamp_latest_value_81a64e30',
|
|
|
|
label: 'hs_analytics_last_touch_converting_campaign_timestamp_latest_value_81a64e30',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_last_visit_timestamp',
|
|
|
|
label: 'Time of Last Session',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_last_visit_timestamp_timestamp_latest_value_999a0fce',
|
|
|
|
label: 'hs_analytics_last_visit_timestamp_timestamp_latest_value_999a0fce',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_num_page_views',
|
|
|
|
label: 'Number of Pageviews',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_num_page_views_cardinality_sum_e46e85b0',
|
|
|
|
label: 'hs_analytics_num_page_views_cardinality_sum_e46e85b0',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_num_visits',
|
|
|
|
label: 'Number of Sessions',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_num_visits_cardinality_sum_53d952a6',
|
|
|
|
label: 'hs_analytics_num_visits_cardinality_sum_53d952a6',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_source',
|
|
|
|
label: 'Original Source Type',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_source_data_1',
|
|
|
|
label: 'Original Source Data 1',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_source_data_1_timestamp_earliest_value_9b2f1fa1',
|
|
|
|
label: 'hs_analytics_source_data_1_timestamp_earliest_value_9b2f1fa1',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_source_data_2',
|
|
|
|
label: 'Original Source Data 2',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_source_data_2_timestamp_earliest_value_9b2f9400',
|
|
|
|
label: 'hs_analytics_source_data_2_timestamp_earliest_value_9b2f9400',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_source_timestamp_earliest_value_25a3a52c',
|
|
|
|
label: 'hs_analytics_source_timestamp_earliest_value_25a3a52c',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_avatar_filemanager_key',
|
|
|
|
label: 'Avatar FileManager key',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_created_by_user_id',
|
|
|
|
label: 'Created by user ID',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_createdate',
|
|
|
|
label: 'Object create date/time',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_ideal_customer_profile',
|
|
|
|
label: 'Ideal Customer Profile Tier',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_is_target_account',
|
|
|
|
label: 'Target Account',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_last_booked_meeting_date',
|
|
|
|
label: 'Last Booked Meeting Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_last_logged_call_date',
|
|
|
|
label: 'Last Logged Call Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_last_open_task_date',
|
|
|
|
label: 'Last Open Task Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_last_sales_activity_date',
|
|
|
|
label: 'last sales activity date old',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_last_sales_activity_timestamp',
|
|
|
|
label: 'Last Engagement Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_lastmodifieddate',
|
|
|
|
label: 'Last Modified Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_merged_object_ids',
|
|
|
|
label: 'Merged object IDs',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_num_blockers',
|
|
|
|
label: 'Number of blockers',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_num_contacts_with_buying_roles',
|
|
|
|
label: 'Number of contacts with a buying role',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_num_decision_makers',
|
|
|
|
label: 'Number of decision makers',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_num_open_deals',
|
|
|
|
label: 'Number of open deals',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_object_id',
|
|
|
|
label: 'Company ID',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_predictivecontactscore_v2',
|
|
|
|
label: 'Likelihood to close',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_predictivecontactscore_v2_next_max_max_d4e58c1e',
|
|
|
|
label: 'hs_predictivecontactscore_v2_next_max_max_d4e58c1e',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_target_account',
|
|
|
|
label: 'Target Account',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_target_account_probability',
|
|
|
|
label: 'Target Account Probability',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_target_account_recommendation_snooze_time',
|
|
|
|
label: 'Target Account Recommendation Snooze Time',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_target_account_recommendation_state',
|
|
|
|
label: 'Target Account Recommendation State',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_total_deal_value',
|
|
|
|
label: 'Total open deal value',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_updated_by_user_id',
|
|
|
|
label: 'Updated by user ID',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_user_ids_of_all_owners',
|
|
|
|
label: 'User IDs of all owners',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hubspot_owner_assigneddate',
|
|
|
|
label: 'Owner Assigned Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'is_public',
|
|
|
|
label: 'Is Public',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'num_associated_contacts',
|
|
|
|
label: 'Associated Contacts',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'num_associated_deals',
|
|
|
|
label: 'Associated Deals',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'num_conversion_events',
|
|
|
|
label: 'Number of Form Submissions',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'num_conversion_events_cardinality_sum_d095f14b',
|
|
|
|
label: 'num_conversion_events_cardinality_sum_d095f14b',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'recent_conversion_date',
|
|
|
|
label: 'Recent Conversion Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'recent_conversion_date_timestamp_latest_value_72856da1',
|
|
|
|
label: 'recent_conversion_date_timestamp_latest_value_72856da1',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'recent_conversion_event_name',
|
|
|
|
label: 'Recent Conversion',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'recent_conversion_event_name_timestamp_latest_value_66c820bf',
|
|
|
|
label: 'recent_conversion_event_name_timestamp_latest_value_66c820bf',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'recent_deal_amount',
|
|
|
|
label: 'Recent Deal Amount',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'recent_deal_close_date',
|
|
|
|
label: 'Recent Deal Close Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'timezone',
|
|
|
|
label: 'Time Zone',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'total_money_raised',
|
|
|
|
label: 'Total Money Raised',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'total_revenue',
|
|
|
|
label: 'Total Revenue',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'name',
|
|
|
|
label: 'Name',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'owneremail',
|
|
|
|
label: 'HubSpot Owner Email',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'twitterhandle',
|
|
|
|
label: 'Twitter Handle',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'ownername',
|
|
|
|
label: 'HubSpot Owner Name',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'phone',
|
|
|
|
label: 'Phone Number',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'twitterbio',
|
|
|
|
label: 'Twitter Bio',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'twitterfollowers',
|
|
|
|
label: 'Twitter Followers',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'address',
|
|
|
|
label: 'Street Address',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'address2',
|
|
|
|
label: 'Street Address 2',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'facebook_company_page',
|
|
|
|
label: 'Facebook Company Page',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'city',
|
|
|
|
label: 'City',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'linkedin_company_page',
|
|
|
|
label: 'LinkedIn Company Page',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'linkedinbio',
|
|
|
|
label: 'LinkedIn Bio',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'state',
|
|
|
|
label: 'State/Region',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'googleplus_page',
|
|
|
|
label: 'Google Plus Page',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'engagements_last_meeting_booked',
|
|
|
|
label: 'Date of last meeting booked in meetings tool',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'engagements_last_meeting_booked_campaign',
|
|
|
|
label: 'Campaign of last booking in meetings tool',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'engagements_last_meeting_booked_medium',
|
|
|
|
label: 'Medium of last booking in meetings tool',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'engagements_last_meeting_booked_source',
|
|
|
|
label: 'Source of last booking in meetings tool',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_latest_meeting_activity',
|
|
|
|
label: 'Latest meeting activity',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_sales_email_last_replied',
|
|
|
|
label: 'Recent Sales Email Replied Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hubspot_owner_id',
|
|
|
|
label: 'Company owner',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'notes_last_contacted',
|
|
|
|
label: 'Last Contacted',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'notes_last_updated',
|
|
|
|
label: 'Last Activity Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'notes_next_activity_date',
|
|
|
|
label: 'Next Activity Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'num_contacted_notes',
|
|
|
|
label: 'Number of times contacted',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'num_notes',
|
|
|
|
label: 'Number of Sales Activities',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'zip',
|
|
|
|
label: 'Postal Code',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'country',
|
|
|
|
label: 'Country/Region',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hubspot_team_id',
|
|
|
|
label: 'HubSpot Team',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_all_owner_ids',
|
|
|
|
label: 'All owner ids',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'website',
|
|
|
|
label: 'Website URL',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'domain',
|
|
|
|
label: 'Company Domain Name',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_all_team_ids',
|
|
|
|
label: 'All team ids',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_all_accessible_team_ids',
|
|
|
|
label: 'All accessible team ids',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'numberofemployees',
|
|
|
|
label: 'Number of Employees',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'industry',
|
|
|
|
label: 'Industry',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'annualrevenue',
|
|
|
|
label: 'Annual Revenue',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'lifecyclestage',
|
|
|
|
label: 'Lifecycle Stage',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_lead_status',
|
|
|
|
label: 'Lead Status',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_parent_company_id',
|
|
|
|
label: 'Parent Company',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'type',
|
|
|
|
label: 'Type',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'description',
|
|
|
|
label: 'Description',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_num_child_companies',
|
|
|
|
label: 'Number of child companies',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hubspotscore',
|
|
|
|
label: 'HubSpot Score',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'createdate',
|
|
|
|
label: 'Create Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'closedate',
|
|
|
|
label: 'Close Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'first_contact_createdate',
|
|
|
|
label: 'First Contact Create Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'days_to_close',
|
|
|
|
label: 'Days to Close',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'web_technologies',
|
|
|
|
label: 'Web Technologies',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export const dealFields = [
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'amount_in_home_currency',
|
|
|
|
label: 'Amount in company currency',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'days_to_close',
|
|
|
|
label: 'Days to close',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'deal_currency_code',
|
|
|
|
label: 'Currency',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_acv',
|
|
|
|
label: 'Annual contract value',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_source',
|
|
|
|
label: 'Original Source Type',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_source_data_1',
|
|
|
|
label: 'Original Source Data 1',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_analytics_source_data_2',
|
|
|
|
label: 'Original Source Data 2',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_arr',
|
|
|
|
label: 'Annual recurring revenue',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_campaign',
|
|
|
|
label: 'HubSpot Campaign',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_closed_amount',
|
|
|
|
label: 'Closed Deal Amount',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_closed_amount_in_home_currency',
|
|
|
|
label: 'Closed Deal Amount In Home Currency',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_created_by_user_id',
|
|
|
|
label: 'Created by user ID',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_date_entered_appointmentscheduled',
|
|
|
|
label: "Date entered 'Appointment Scheduled (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_date_entered_closedlost',
|
|
|
|
label: "Date entered 'Closed Lost (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_date_entered_closedwon',
|
|
|
|
label: "Date entered 'Closed Won (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_date_entered_contractsent',
|
|
|
|
label: "Date entered 'Contract Sent (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_date_entered_decisionmakerboughtin',
|
|
|
|
label: "Date entered 'Decision Maker Bought-In (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_date_entered_presentationscheduled',
|
|
|
|
label: "Date entered 'Presentation Scheduled (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_date_entered_qualifiedtobuy',
|
|
|
|
label: "Date entered 'Qualified To Buy (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_date_exited_appointmentscheduled',
|
|
|
|
label: "Date exited 'Appointment Scheduled (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_date_exited_closedlost',
|
|
|
|
label: "Date exited 'Closed Lost (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_date_exited_closedwon',
|
|
|
|
label: "Date exited 'Closed Won (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_date_exited_contractsent',
|
|
|
|
label: "Date exited 'Contract Sent (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_date_exited_decisionmakerboughtin',
|
|
|
|
label: "Date exited 'Decision Maker Bought-In (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_date_exited_presentationscheduled',
|
|
|
|
label: "Date exited 'Presentation Scheduled (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_date_exited_qualifiedtobuy',
|
|
|
|
label: "Date exited 'Qualified To Buy (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_deal_amount_calculation_preference',
|
|
|
|
label: 'Deal amount calculation preference',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_deal_stage_probability',
|
|
|
|
label: 'Deal Stage Probability',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_forecast_amount',
|
|
|
|
label: 'Forecast Amount',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_forecast_probability',
|
|
|
|
label: 'Forecast Probability',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_is_closed',
|
|
|
|
label: 'Is Deal Closed?',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_lastmodifieddate',
|
|
|
|
label: 'Last Modified Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_likelihood_to_close',
|
|
|
|
label: 'Likelihood to close by the close date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_line_item_global_term_hs_discount_percentage',
|
|
|
|
label: 'Global Term Line Item Discount Percentage',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_line_item_global_term_hs_discount_percentage_enabled',
|
|
|
|
label: 'Global Term Line Item Discount Percentage Enabled',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_line_item_global_term_hs_recurring_billing_period',
|
|
|
|
label: 'Global Term Line Item Recurring Billing Period',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_line_item_global_term_hs_recurring_billing_period_enabled',
|
|
|
|
label: 'Global Term Line Item Recurring Billing Period Enabled',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_line_item_global_term_hs_recurring_billing_start_date',
|
|
|
|
label: 'Global Term Line Item Recurring Billing Start Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_line_item_global_term_hs_recurring_billing_start_date_enabled',
|
|
|
|
label: 'Global Term Line Item Recurring Billing Start Date Enabled',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_line_item_global_term_recurringbillingfrequency',
|
|
|
|
label: 'Global Term Line Item Recurring Billing Frequency',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_line_item_global_term_recurringbillingfrequency_enabled',
|
|
|
|
label: 'Global Term Line Item Recurring Billing Frequency Enabled',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_manual_forecast_category',
|
|
|
|
label: 'Forecast category',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_merged_object_ids',
|
|
|
|
label: 'Merged object IDs',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_mrr',
|
|
|
|
label: 'Monthly recurring revenue',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_next_step',
|
|
|
|
label: 'Next step',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_object_id',
|
|
|
|
label: 'Deal ID',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_predicted_amount',
|
|
|
|
label: 'The predicted deal amount',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_predicted_amount_in_home_currency',
|
|
|
|
label: "The predicted deal amount in your company's currency",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_projected_amount',
|
|
|
|
label: 'Projected Deal Amount',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_projected_amount_in_home_currency',
|
|
|
|
label: 'Projected Deal Amount in Home Currency',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_tcv',
|
|
|
|
label: 'Total contract value',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_time_in_appointmentscheduled',
|
|
|
|
label: "Time in 'Appointment Scheduled (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_time_in_closedlost',
|
|
|
|
label: "Time in 'Closed Lost (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_time_in_closedwon',
|
|
|
|
label: "Time in 'Closed Won (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_time_in_contractsent',
|
|
|
|
label: "Time in 'Contract Sent (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_time_in_decisionmakerboughtin',
|
|
|
|
label: "Time in 'Decision Maker Bought-In (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_time_in_presentationscheduled',
|
|
|
|
label: "Time in 'Presentation Scheduled (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_time_in_qualifiedtobuy',
|
|
|
|
label: "Time in 'Qualified To Buy (Sales Pipeline)'",
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_updated_by_user_id',
|
|
|
|
label: 'Updated by user ID',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_user_ids_of_all_owners',
|
|
|
|
label: 'User IDs of all owners',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hubspot_owner_assigneddate',
|
|
|
|
label: 'Owner Assigned Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'testing',
|
|
|
|
label: 'testing',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'dealname',
|
|
|
|
label: 'Deal Name',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'amount',
|
|
|
|
label: 'Amount',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'dealstage',
|
|
|
|
label: 'Deal Stage',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'pipeline',
|
|
|
|
label: 'Pipeline',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'closedate',
|
|
|
|
label: 'Close Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'createdate',
|
|
|
|
label: 'Create Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'engagements_last_meeting_booked',
|
|
|
|
label: 'Date of last meeting booked in meetings tool',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'engagements_last_meeting_booked_campaign',
|
|
|
|
label: 'Campaign of last booking in meetings tool',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'engagements_last_meeting_booked_medium',
|
|
|
|
label: 'Medium of last booking in meetings tool',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'engagements_last_meeting_booked_source',
|
|
|
|
label: 'Source of last booking in meetings tool',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_latest_meeting_activity',
|
|
|
|
label: 'Latest meeting activity',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_sales_email_last_replied',
|
|
|
|
label: 'Recent Sales Email Replied Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hubspot_owner_id',
|
|
|
|
label: 'Deal owner',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'notes_last_contacted',
|
|
|
|
label: 'Last Contacted',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'notes_last_updated',
|
|
|
|
label: 'Last Activity Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'notes_next_activity_date',
|
|
|
|
label: 'Next Activity Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'num_contacted_notes',
|
|
|
|
label: 'Number of times contacted',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'num_notes',
|
|
|
|
label: 'Number of Sales Activities',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_createdate',
|
|
|
|
label: 'HubSpot Create Date',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hubspot_team_id',
|
|
|
|
label: 'HubSpot Team',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'dealtype',
|
|
|
|
label: 'Deal Type',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_all_owner_ids',
|
|
|
|
label: 'All owner ids',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'description',
|
|
|
|
label: 'Deal Description',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_all_team_ids',
|
|
|
|
label: 'All team ids',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'hs_all_accessible_team_ids',
|
|
|
|
label: 'All accessible team ids',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'num_associated_contacts',
|
|
|
|
label: 'Number of Contacts',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'closed_lost_reason',
|
|
|
|
label: 'Closed Lost Reason',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
{
|
2022-08-17 08:50:24 -07:00
|
|
|
id: 'closed_won_reason',
|
|
|
|
label: 'Closed Won Reason',
|
2021-01-31 23:31:40 -08:00
|
|
|
},
|
|
|
|
];
|
2021-12-29 14:36:25 -08:00
|
|
|
|
|
|
|
const reduceMetadatFields = (data: string[]) => {
|
2022-08-17 08:50:24 -07:00
|
|
|
return data
|
|
|
|
.reduce((a, v) => {
|
|
|
|
//@ts-ignore
|
|
|
|
a.push(...v.split(','));
|
|
|
|
return a;
|
|
|
|
}, [])
|
|
|
|
.map((email) => ({ email }));
|
2021-12-29 14:36:25 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
export const getEmailMetadata = (meta: IDataObject) => {
|
|
|
|
return {
|
|
|
|
from: {
|
|
|
|
...(meta.fromEmail && { email: meta.fromEmail }),
|
|
|
|
...(meta.firstName && { firstName: meta.firstName }),
|
|
|
|
...(meta.lastName && { lastName: meta.lastName }),
|
|
|
|
},
|
2022-08-17 08:50:24 -07:00
|
|
|
cc: reduceMetadatFields((meta.cc as string[]) || []),
|
|
|
|
bcc: reduceMetadatFields((meta.bcc as string[]) || []),
|
2021-12-29 14:36:25 -08:00
|
|
|
...(meta.subject && { subject: meta.subject }),
|
|
|
|
...(meta.html && { html: meta.html }),
|
|
|
|
...(meta.text && { text: meta.text }),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export const getTaskMetadata = (meta: IDataObject) => {
|
|
|
|
return {
|
|
|
|
...(meta.body && { body: meta.body }),
|
|
|
|
...(meta.subject && { subject: meta.subject }),
|
|
|
|
...(meta.status && { status: meta.status }),
|
|
|
|
...(meta.forObjectType && { forObjectType: meta.forObjectType }),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export const getMeetingMetadata = (meta: IDataObject) => {
|
|
|
|
return {
|
|
|
|
...(meta.body && { body: meta.body }),
|
|
|
|
...(meta.startTime && { startTime: moment(meta.startTime as string).unix() }),
|
|
|
|
...(meta.endTime && { endTime: moment(meta.endTime as string).unix() }),
|
|
|
|
...(meta.title && { title: meta.title }),
|
|
|
|
...(meta.internalMeetingNotes && { internalMeetingNotes: meta.internalMeetingNotes }),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export const getCallMetadata = (meta: IDataObject) => {
|
|
|
|
return {
|
|
|
|
...(meta.toNumber && { toNumber: meta.toNumber }),
|
|
|
|
...(meta.fromNumber && { fromNumber: meta.fromNumber }),
|
|
|
|
...(meta.status && { status: meta.status }),
|
|
|
|
...(meta.durationMilliseconds && { durationMilliseconds: meta.durationMilliseconds }),
|
|
|
|
...(meta.recordingUrl && { recordingUrl: meta.recordingUrl }),
|
|
|
|
...(meta.body && { body: meta.body }),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export const getAssociations = (associations: {
|
2022-08-17 08:50:24 -07:00
|
|
|
companyIds: string;
|
|
|
|
dealIds: string;
|
|
|
|
ownerIds: string;
|
|
|
|
contactIds: string;
|
2021-12-29 14:36:25 -08:00
|
|
|
ticketIds: string;
|
|
|
|
}) => {
|
|
|
|
return {
|
|
|
|
...(associations.companyIds && { companyIds: associations.companyIds.toString().split(',') }),
|
|
|
|
...(associations.contactIds && { contactIds: associations.contactIds.toString().split(',') }),
|
|
|
|
...(associations.dealIds && { dealIds: associations.dealIds.toString().split(',') }),
|
|
|
|
...(associations.ownerIds && { ownerIds: associations.ownerIds.toString().split(',') }),
|
|
|
|
...(associations.ticketIds && { ticketIds: associations.ticketIds.toString().split(',') }),
|
|
|
|
};
|
|
|
|
};
|
2022-03-13 03:52:47 -07:00
|
|
|
|
|
|
|
export async function validateCredentials(
|
|
|
|
this: ICredentialTestFunctions,
|
|
|
|
decryptedCredentials: ICredentialDataDecryptedObject,
|
2022-08-17 08:50:24 -07:00
|
|
|
): Promise<any> {
|
2022-03-13 03:52:47 -07:00
|
|
|
const credentials = decryptedCredentials;
|
|
|
|
|
2022-08-17 08:50:24 -07:00
|
|
|
const { apiKey, appToken } = credentials as {
|
|
|
|
appToken: string;
|
|
|
|
apiKey: string;
|
2022-03-13 03:52:47 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
const options: OptionsWithUri = {
|
|
|
|
method: 'GET',
|
|
|
|
headers: {},
|
2022-12-29 03:20:43 -08:00
|
|
|
uri: 'https://api.hubapi.com/deals/v1/deal/paged',
|
2022-03-13 03:52:47 -07:00
|
|
|
json: true,
|
|
|
|
};
|
|
|
|
|
|
|
|
if (apiKey) {
|
|
|
|
options.qs = { hapikey: apiKey };
|
|
|
|
} else {
|
|
|
|
options.headers = { Authorization: `Bearer ${appToken}` };
|
|
|
|
}
|
|
|
|
|
2022-12-02 12:54:28 -08:00
|
|
|
return this.helpers.request(options);
|
2022-03-13 03:52:47 -07:00
|
|
|
}
|