Skip to content

Commit 7dfedac

Browse files
authored
feat(data-warehouse): wire Intercom and HubSpot into the self-driving inbox
Add Intercom and HubSpot as inbox source toggles. Both are OAuth sources, but that needs no bespoke UI: the generic DynamicSourceSetup renders their connect form's oauth field, and the generic integration flow starter (separate PR) launches the OAuth flow by kind. So this is the same one-registry-entry change as any credential source — two entries in EXTERNAL_INBOX_SOURCES plus the SourceProduct/analytics unions and icons.
1 parent b75b153 commit 7dfedac

4 files changed

Lines changed: 34 additions & 4 deletions

File tree

packages/api-client/src/posthog-client.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,9 @@ export interface SignalSourceConfig {
284284
| "retently"
285285
| "appfigures"
286286
| "appfollow"
287-
| "judgeme_reviews";
287+
| "judgeme_reviews"
288+
| "intercom"
289+
| "hubspot";
288290
source_type:
289291
| "session_analysis_cluster"
290292
| "evaluation"

packages/shared/src/analytics-events.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,9 @@ export interface SignalSourceConnectedProperties {
833833
| "retently"
834834
| "appfigures"
835835
| "appfollow"
836-
| "judgeme_reviews";
836+
| "judgeme_reviews"
837+
| "intercom"
838+
| "hubspot";
837839
/** True when this is a brand-new createSignalSourceConfig, false for re-enable of an existing config. */
838840
is_first_connection: boolean;
839841
/** True when the connection went through the DataSourceSetup wizard (warehouse OAuth path). */

packages/shared/src/inbox-types.ts

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ export type SourceProduct =
4646
| "retently"
4747
| "appfigures"
4848
| "appfollow"
49-
| "judgeme_reviews";
49+
| "judgeme_reviews"
50+
| "intercom"
51+
| "hubspot";
5052

5153
/**
5254
* Products that render as a toggle in the Self-driving sources modal: the three PostHog-data
@@ -91,7 +93,9 @@ export type ToggleableSourceProduct =
9193
| "retently"
9294
| "appfigures"
9395
| "appfollow"
94-
| "judgeme_reviews";
96+
| "judgeme_reviews"
97+
| "intercom"
98+
| "hubspot";
9599

96100
/** Signal record kind (backend `source_type`) for a warehouse-backed inbox source. */
97101
export type SignalRecordKind =
@@ -457,6 +461,26 @@ export const EXTERNAL_INBOX_SOURCES: ExternalInboxSource[] = [
457461
recordKind: "review",
458462
setup: "dynamic",
459463
},
464+
// OAuth-connected support sources (the connect form's oauth field is rendered generically by
465+
// DynamicSourceSetup — see the generic integration flow starter).
466+
{
467+
product: "intercom",
468+
label: "Intercom",
469+
description: CONVERSATION,
470+
dwSourceType: "Intercom",
471+
requiredTables: ["conversations"],
472+
recordKind: "ticket",
473+
setup: "dynamic",
474+
},
475+
{
476+
product: "hubspot",
477+
label: "HubSpot",
478+
description: TICKET,
479+
dwSourceType: "Hubspot",
480+
requiredTables: ["tickets"],
481+
recordKind: "ticket",
482+
setup: "dynamic",
483+
},
460484
];
461485

462486
/** Issue-like records mutate (status/votes change), so their table needs full-refresh sync. */

packages/ui/src/features/inbox/components/utils/source-product-icons.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,4 +170,6 @@ export const SOURCE_PRODUCT_META: Partial<
170170
color: "var(--amber-9)",
171171
label: "Judge.me",
172172
},
173+
intercom: { Icon: ChatsIcon, color: "var(--blue-9)", label: "Intercom" },
174+
hubspot: { Icon: LifebuoyIcon, color: "var(--orange-9)", label: "HubSpot" },
173175
};

0 commit comments

Comments
 (0)