:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(customer-analytics): add announcements tab (#70377)
Christophe Eynius Tranberga888733e5a70
diff --git a/frontend/src/products.tsx b/frontend/src/products.tsxindex a4d17a965b8c..793ba6db8fb2 100644--- a/frontend/src/products.tsx+++ b/frontend/src/products.tsx@@ -101,6 +101,7 @@ export const productRoutes: Record<string, [string, string]> = {'/customer_analytics/accounts/:accountId': ['CustomerAnalytics', 'customerAnalyticsAccounts'],'/customer_analytics/accounts/:accountId/:tab': ['CustomerAnalytics', 'customerAnalyticsAccounts'],'/customer_analytics/notes': ['CustomerAnalytics', 'customerAnalyticsNotes'],+ '/customer_analytics/announcements': ['CustomerAnalytics', 'customerAnalyticsAnnouncements'],'/customer_analytics/journeys/new': ['CustomerJourneyBuilder', 'customerJourneyBuilder'],'/customer_analytics/journeys/templates': ['CustomerJourneyTemplates', 'customerJourneyTemplates'],'/customer_analytics/journeys/:id/edit': ['CustomerJourneyBuilder', 'customerJourneyEdit'],@@ -962,6 +963,7 @@ export const productUrls = {customerAnalyticsAccount: (accountId: string, tab?: string): string =>`/customer_analytics/accounts/${accountId}${tab ? `/${tab}` : ''}`,customerAnalyticsNotes: (): string => '/customer_analytics/notes',+ customerAnalyticsAnnouncements: (): string => '/customer_analytics/announcements',customerAnalyticsJourneys: (): string => '/customer_analytics/journeys',customerAnalyticsConfiguration: (): string => '/customer_analytics/configuration',customerJourneyBuilder: (): string => '/customer_analytics/journeys/new',diff --git a/products/customer_analytics/frontend/CustomerAnalyticsScene.tsx b/products/customer_analytics/frontend/CustomerAnalyticsScene.tsxindex 8e997b09b97b..d3b1291ff480 100644--- a/products/customer_analytics/frontend/CustomerAnalyticsScene.tsx+++ b/products/customer_analytics/frontend/CustomerAnalyticsScene.tsx@@ -30,6 +30,7 @@ import { SessionInsights } from 'products/customer_analytics/frontend/componentsimport { AccountNotesTabContent } from './components/AccountNotes/AccountNotesTabContent'import { AccountsTabContent } from './components/Accounts/AccountsTabContent'+import { AnnouncementsTabContent } from './components/Announcements/AnnouncementsTabContent'import { CustomerJourneys } from './components/CustomerJourneys/CustomerJourneys'import { CustomerJourneySelect } from './components/CustomerJourneys/CustomerJourneySelect'import { customerJourneysLogic } from './components/CustomerJourneys/customerJourneysLogic'@@ -78,9 +79,12 @@ function CustomerAnalyticsSceneContent(): JSX.Element {reportCustomerAnalyticsViewed()})- // Accounts and Notes are gated by CUSTOMER_ANALYTICS_CSP; without it the tabs do not- // exist, so guessed `/customer_analytics/accounts` / `/customer_analytics/notes` URLs are 404s.- if ((activeTab === 'accounts' || activeTab === 'notes') && !featureFlags[FEATURE_FLAGS.CUSTOMER_ANALYTICS_CSP]) {+ // Accounts, Notes and Announcements are gated by CUSTOMER_ANALYTICS_CSP; without it the tabs do+ // not exist, so guessed `/customer_analytics/{accounts,notes,announcements}` URLs are 404s.+ if (+ (activeTab === 'accounts' || activeTab === 'notes' || activeTab === 'announcements') &&+ !featureFlags[FEATURE_FLAGS.CUSTOMER_ANALYTICS_CSP]+ ) {return <NotFound object="page" />}@@ -116,6 +120,12 @@ function CustomerAnalyticsSceneContent(): JSX.Element {content: <AccountNotesTabContent />,link: combineUrl(urls.customerAnalyticsNotes(), searchParams).url,})+ tabs.push({+ key: 'announcements',+ label: 'Announcements',+ content: <AnnouncementsTabContent />,+ link: combineUrl(urls.customerAnalyticsAnnouncements(), searchParams).url,+ })}tabs.push({diff --git a/products/customer_analytics/frontend/components/Announcements/AnnouncementsTabContent.tsx b/products/customer_analytics/frontend/components/Announcements/AnnouncementsTabContent.tsxnew file mode 100644index 000000000000..3740472455da--- /dev/null+++ b/products/customer_analytics/frontend/components/Announcements/AnnouncementsTabContent.tsx@@ -0,0 +1,200 @@+import { useActions, useValues } from 'kea'++import {+ LemonBanner,+ LemonButton,+ LemonInputSelect,+ LemonTable,+ LemonTableColumns,+ LemonTag,+ LemonTextArea,+ Link,+} from '@posthog/lemon-ui'++import { TZLabel } from 'lib/components/TZLabel'+import { urls } from 'scenes/urls'++import type { AnnouncementApi, AnnouncementDeliveryApi } from '../../generated/api.schemas'+import { announcementsLogic } from './announcementsLogic'++type TagType = 'success' | 'primary' | 'warning' | 'danger' | 'default'++function announcementStatusTag(status: AnnouncementApi['status']): { type: TagType; label: string } {+ switch (status) {+ case 'sent':+ return { type: 'success', label: 'Sent' }+ case 'sending':+ return { type: 'primary', label: 'Sending' }+ case 'partially_failed':+ return { type: 'warning', label: 'Partially failed' }+ case 'failed':+ return { type: 'danger', label: 'Failed' }+ default:+ return { type: 'default', label: 'Pending' }+ }+}++function AnnouncementComposer(): JSX.Element {+ const {+ messageDraft,+ selectedChannelIds,+ channelOptions,+ memberChannelsLoading,+ submitting,+ submitDisabledReason,+ } = useValues(announcementsLogic)+ const { setMessage, setSelectedChannelIds, submitAnnouncement, loadMemberChannels } = useActions(announcementsLogic)++ return (+ <div className="flex flex-col gap-2 max-w-[800px]">+ <LemonTextArea+ value={messageDraft}+ onChange={setMessage}+ placeholder="Write a message to send to the selected customer channels…"+ minRows={4}+ />+ <div className="flex gap-2 items-center">+ <LemonInputSelect+ mode="multiple"+ value={selectedChannelIds}+ options={channelOptions}+ onChange={setSelectedChannelIds}+ loading={memberChannelsLoading}+ placeholder="Select customer channels"+ className="flex-1"+ />+ <LemonButton+ type="secondary"+ size="small"+ onClick={loadMemberChannels}+ disabledReason={memberChannelsLoading ? 'Loading channels…' : undefined}+ >+ Refresh+ </LemonButton>+ </div>+ <div>+ <LemonButton+ type="primary"+ onClick={submitAnnouncement}+ loading={submitting}+ disabledReason={submitDisabledReason}+ data-attr="send-announcement"+ >+ Send announcement+ </LemonButton>+ </div>+ </div>+ )+}++function DeliveriesTable({ deliveries }: { deliveries: readonly AnnouncementDeliveryApi[] }): JSX.Element {+ const columns: LemonTableColumns<AnnouncementDeliveryApi> = [+ {+ title: 'Channel',+ key: 'channel',+ render: (_, delivery) =>+ delivery.slack_channel_name ? `#${delivery.slack_channel_name}` : delivery.slack_channel_id,+ },+ {+ title: 'Status',+ key: 'status',+ render: (_, delivery) => (+ <LemonTag+ type={delivery.status === 'sent' ? 'success' : delivery.status === 'failed' ? 'danger' : 'default'}+ >+ {delivery.status}+ </LemonTag>+ ),+ },+ {+ title: 'Error',+ key: 'error',+ render: (_, delivery) =>+ delivery.error ? <span className="text-danger text-xs">{delivery.error}</span> : '—',+ },+ ]+ return <LemonTable embedded dataSource={[...deliveries]} rowKey="id" columns={columns} />+}++function AnnouncementHistory(): JSX.Element {+ const { announcements, announcementsLoading } = useValues(announcementsLogic)+ const { loadAnnouncements } = useActions(announcementsLogic)++ const columns: LemonTableColumns<AnnouncementApi> = [+ {+ title: 'Message',+ key: 'message',+ render: (_, announcement) => <span className="truncate max-w-md inline-block">{announcement.message}</span>,+ },+ {+ title: 'Status',+ key: 'status',+ render: (_, announcement) => {+ const tag = announcementStatusTag(announcement.status)+ return <LemonTag type={tag.type}>{tag.label}</LemonTag>+ },+ },+ {+ title: 'Delivered',+ key: 'sent_count',+ render: (_, announcement) => `${announcement.sent_count}/${announcement.total_channels}`,+ },+ {+ title: 'Failed',+ key: 'failed_count',+ render: (_, announcement) => announcement.failed_count || '—',+ },+ {+ title: 'Created',+ key: 'created_at',+ render: (_, announcement) => <TZLabel time={announcement.created_at} />,+ },+ {+ title: 'By',+ key: 'created_by',+ render: (_, announcement) => announcement.created_by?.first_name || announcement.created_by?.email || '—',+ },+ ]++ return (+ <div className="flex flex-col gap-2">+ <div className="flex items-center justify-between">+ <h3 className="m-0">Sent announcements</h3>+ <LemonButton type="secondary" size="small" onClick={loadAnnouncements} loading={announcementsLoading}>+ Refresh+ </LemonButton>+ </div>+ <LemonTable<AnnouncementApi>+ dataSource={announcements}+ loading={announcementsLoading}+ rowKey="id"+ columns={columns}+ expandable={{+ expandedRowRender: (announcement) => <DeliveriesTable deliveries={announcement.deliveries} />,+ rowExpandable: (announcement) => announcement.deliveries.length > 0,+ }}+ emptyState="No announcements sent yet"+ />+ </div>+ )+}++export function AnnouncementsTabContent(): JSX.Element {+ const { slackConnected } = useValues(announcementsLogic)++ if (!slackConnected) {+ return (+ <LemonBanner type="warning">+ Connect the SupportHog Slack bot in <Link to={urls.supportSettings()}>Support settings</Link> to send+ announcements to customer channels.+ </LemonBanner>+ )+ }++ return (+ <div className="flex flex-col gap-6">+ <AnnouncementComposer />+ <AnnouncementHistory />+ </div>+ )+}diff --git a/products/customer_analytics/frontend/components/Announcements/announcementsLogic.test.ts b/products/customer_analytics/frontend/components/Announcements/announcementsLogic.test.tsnew file mode 100644index 000000000000..1f5f04820232--- /dev/null+++ b/products/customer_analytics/frontend/components/Announcements/announcementsLogic.test.ts@@ -0,0 +1,99 @@+import { MOCK_DEFAULT_TEAM } from 'lib/api.mock'++import { expectLogic } from 'kea-test-utils'++import { useMocks } from '~/mocks/jest'+import { initKeaTests } from '~/test/init'++import { announcementsLogic } from './announcementsLogic'++describe('announcementsLogic', () => {+ let logic: ReturnType<typeof announcementsLogic.build>++ beforeEach(() => {+ useMocks({+ get: {+ '/api/projects/:team_id/announcements/': { results: [], count: 0 },+ '/api/projects/:team_id/announcements/channels/': [+ { id: 'C1', name: 'acme', is_member: true, customer_name: 'Acme' },+ ],+ },+ post: {+ '/api/projects/:team_id/announcements/': {+ id: '1',+ short_id: 'abc123',+ message: 'Offsite this week',+ status: 'pending',+ total_channels: 1,+ sent_count: 0,+ failed_count: 0,+ sent_at: null,+ created_at: '2026-01-01T00:00:00Z',+ created_by: null,+ deliveries: [],+ },+ },+ })+ initKeaTests(true, { ...MOCK_DEFAULT_TEAM, conversations_settings: { slack_enabled: true } })+ })++ afterEach(() => {+ logic?.unmount()+ })++ it('loads customer-labeled member channels on mount when Slack is connected', async () => {+ logic = announcementsLogic()+ logic.mount()+ await expectLogic(logic)+ .toDispatchActions(['loadMemberChannels', 'loadMemberChannelsSuccess'])+ .toMatchValues({+ memberChannels: [{ id: 'C1', name: 'acme', is_member: true, customer_name: 'Acme' }],+ channelOptions: [{ key: 'C1', label: 'Acme (#acme)' }],+ })+ })++ it('blocks submit with an empty message', async () => {+ logic = announcementsLogic()+ logic.mount()+ await expectLogic(logic).toMatchValues({ submitDisabledReason: 'Enter a message' })+ })++ it('blocks submit when no channels are selected', async () => {+ logic = announcementsLogic()+ logic.mount()+ logic.actions.setMessage('Offsite this week')+ await expectLogic(logic).toMatchValues({ submitDisabledReason: 'Select at least one channel' })+ })++ it('submits, clears the draft, and reloads history', async () => {+ logic = announcementsLogic()+ logic.mount()+ logic.actions.setMessage('Offsite this week')+ logic.actions.setSelectedChannelIds(['C1'])++ await expectLogic(logic, () => {+ logic.actions.submitAnnouncement()+ })+ .toDispatchActions(['submitAnnouncement', 'loadAnnouncements'])+ .toFinishAllListeners()++ expect(logic.values.messageDraft).toBe('')+ expect(logic.values.selectedChannelIds).toEqual([])+ expect(logic.values.submitting).toBe(false)+ })++ it('does not submit while a send is already in flight', async () => {+ logic = announcementsLogic()+ logic.mount()+ logic.actions.setMessage('Offsite this week')+ logic.actions.setSelectedChannelIds(['C1'])+ logic.actions.setSubmitting(true)++ await expectLogic(logic, () => {+ logic.actions.submitAnnouncement()+ }).toFinishAllListeners()++ expect(logic.values.messageDraft).toBe('Offsite this week')+ expect(logic.values.selectedChannelIds).toEqual(['C1'])+ })+})diff --git a/products/customer_analytics/frontend/components/Announcements/announcementsLogic.ts b/products/customer_analytics/frontend/components/Announcements/announcementsLogic.tsnew file mode 100644index 000000000000..292923ee3059--- /dev/null+++ b/products/customer_analytics/frontend/components/Announcements/announcementsLogic.ts@@ -0,0 +1,197 @@+import { MakeLogicType, actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'+import { loaders } from 'kea-loaders'++import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'+import { teamLogic } from 'scenes/teamLogic'++import type { TeamPublicType, TeamType } from '../../../../../frontend/src/types'+import { announcementsChannelsList, announcementsCreate, announcementsList } from '../../generated/api'+import type { AnnouncementApi, AnnouncementChannelApi } from '../../generated/api.schemas'++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface announcementsLogicValues {+ currentTeam: TeamPublicType | TeamType | null // teamLogic+ announcements: AnnouncementApi[]+ announcementsLoading: boolean+ channelOptions: {+ key: string+ label: string+ }[]+ memberChannels: AnnouncementChannelApi[]+ memberChannelsLoading: boolean+ messageDraft: string+ selectedChannelIds: string[]+ slackConnected: boolean+ submitDisabledReason: string | undefined+ submitting: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface announcementsLogicActions {+ loadAnnouncements: () => any+ loadAnnouncementsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadAnnouncementsSuccess: (+ announcements: AnnouncementApi[],+ payload?: any+ ) => {+ announcements: AnnouncementApi[]+ payload?: any+ }+ loadMemberChannels: () => any+ loadMemberChannelsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadMemberChannelsSuccess: (+ memberChannels: AnnouncementChannelApi[],+ payload?: any+ ) => {+ memberChannels: AnnouncementChannelApi[]+ payload?: any+ }+ setMessage: (message: string) => {+ message: string+ }+ setSelectedChannelIds: (channelIds: string[]) => {+ channelIds: string[]+ }+ setSubmitting: (submitting: boolean) => {+ submitting: boolean+ }+ submitAnnouncement: () => {+ value: true+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface announcementsLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ slackConnected: (currentTeam: TeamPublicType | TeamType | null) => boolean+ channelOptions: (memberChannels: AnnouncementChannelApi[]) => {+ key: string+ label: string+ }[]+ submitDisabledReason: (+ messageDraft: string,+ selectedChannelIds: string[],+ submitting: boolean+ ) => string | undefined+ }+}++export type announcementsLogicType = MakeLogicType<+ announcementsLogicValues,+ announcementsLogicActions,+ Record<string, any>,+ announcementsLogicMeta+>++export const announcementsLogic = kea<announcementsLogicType>([+ path(['products', 'customer_analytics', 'frontend', 'components', 'Announcements', 'announcementsLogic']),+ connect(() => ({+ values: [teamLogic, ['currentTeam']],+ })),+ actions({+ setMessage: (message: string) => ({ message }),+ setSelectedChannelIds: (channelIds: string[]) => ({ channelIds }),+ submitAnnouncement: true,+ setSubmitting: (submitting: boolean) => ({ submitting }),+ }),+ loaders(({ values }) => ({+ announcements: [+ [] as AnnouncementApi[],+ {+ loadAnnouncements: async () => {+ const response = await announcementsList(String(values.currentTeam?.id), { limit: 100 })+ return response.results ?? []+ },+ },+ ],+ memberChannels: [+ [] as AnnouncementChannelApi[],+ {+ loadMemberChannels: async () => {+ try {+ return await announcementsChannelsList(String(values.currentTeam?.id))+ } catch {+ lemonToast.error('Failed to load Slack channels')+ return values.memberChannels+ }+ },+ },+ ],+ })),+ reducers({+ messageDraft: ['', { setMessage: (_state, { message }) => message }],+ selectedChannelIds: [[] as string[], { setSelectedChannelIds: (_state, { channelIds }) => channelIds }],+ submitting: [false, { setSubmitting: (_state, { submitting }) => submitting }],+ }),+ selectors({+ slackConnected: [+ (s) => [s.currentTeam],+ (currentTeam: TeamPublicType | TeamType | null): boolean =>+ !!currentTeam?.conversations_settings?.slack_enabled,+ ],+ channelOptions: [+ (s) => [s.memberChannels],+ (memberChannels: AnnouncementChannelApi[]): { key: string; label: string }[] =>+ memberChannels.map((channel) => ({+ key: channel.id,+ label: channel.customer_name ? `${channel.customer_name} (#${channel.name})` : `#${channel.name}`,+ })),+ ],+ submitDisabledReason: [+ (s) => [s.messageDraft, s.selectedChannelIds, s.submitting],+ (messageDraft: string, selectedChannelIds: string[], submitting: boolean): string | undefined => {+ if (submitting) {+ return 'Sending…'+ }+ if (!messageDraft.trim()) {+ return 'Enter a message'+ }+ if (selectedChannelIds.length === 0) {+ return 'Select at least one channel'+ }+ return undefined+ },+ ],+ }),+ listeners(({ values, actions }) => ({+ submitAnnouncement: async () => {+ // Guard against double-submission while a send is in flight.+ if (values.submitting || values.submitDisabledReason) {+ return+ }+ actions.setSubmitting(true)+ try {+ await announcementsCreate(String(values.currentTeam?.id), {+ message: values.messageDraft.trim(),+ channels: values.selectedChannelIds,+ })+ lemonToast.success('Announcement sent')+ actions.setMessage('')+ actions.setSelectedChannelIds([])+ actions.loadAnnouncements()+ } catch {+ lemonToast.error('Failed to send announcement')+ } finally {+ actions.setSubmitting(false)+ }+ },+ })),+ afterMount(({ values, actions }) => {+ actions.loadAnnouncements()+ if (values.slackConnected) {+ actions.loadMemberChannels()+ }+ }),+])diff --git a/products/customer_analytics/frontend/customerAnalyticsSceneLogic.ts b/products/customer_analytics/frontend/customerAnalyticsSceneLogic.tsindex f405307923a7..53f5d24b4070 100644--- a/products/customer_analytics/frontend/customerAnalyticsSceneLogic.ts+++ b/products/customer_analytics/frontend/customerAnalyticsSceneLogic.ts@@ -43,6 +43,15 @@ import { customerAnalyticsConfigLogic } from './customerAnalyticsConfigLogic'export type BusinessType = 'b2c' | 'b2b'+type ActiveTab = 'dashboard' | 'journeys' | 'accounts' | 'notes' | 'announcements'++const SCENE_KEY_TO_TAB: Record<string, ActiveTab> = {+ customerAnalyticsJourneys: 'journeys',+ customerAnalyticsAccounts: 'accounts',+ customerAnalyticsNotes: 'notes',+ customerAnalyticsAnnouncements: 'announcements',+}+export interface InsightDefinition {name: stringdescription?: string@@ -91,7 +100,7 @@ export interface customerAnalyticsSceneLogicValues {groupTypesRaw: Array<GroupType> // groupsModelgroupsEnabled: boolean // groupsModelsceneKey: string | null // sceneLogic- activeTab: 'accounts' | 'dashboard' | 'journeys' | 'notes'+ activeTab: ActiveTabactiveUsersInsights: InsightDefinition[]breadcrumbs: Breadcrumb[]businessType: BusinessType@@ -152,9 +161,9 @@ export interface customerAnalyticsSceneLogicActions {// Generated by kea-typegen. Update if you're an agent, ignore if you're human.export interface customerAnalyticsSceneLogicMeta {__keaTypeGenInternalSelectorTypes: {- activeTab: (sceneKey: string | null) => 'accounts' | 'dashboard' | 'journeys' | 'notes'+ activeTab: (sceneKey: string | null) => ActiveTabcustomerLabel: (- aggregationLabel: (groupTypeIndex: number | null | undefined, deferToUserWording?: boolean) => Noun,+ aggregationLabel: (groupTypeIndex: number | null | undefined, deferToUserWording?: boolean) => Noun, // groupsModelbusinessType: BusinessType,selectedGroupType: number) => {@@ -326,18 +335,7 @@ export const customerAnalyticsSceneLogic = kea<customerAnalyticsSceneLogicType>(selectors({activeTab: [(s) => [s.sceneKey],- (sceneKey: string | null): 'dashboard' | 'journeys' | 'accounts' | 'notes' => {- if (sceneKey === 'customerAnalyticsJourneys') {- return 'journeys'- }- if (sceneKey === 'customerAnalyticsAccounts') {- return 'accounts'- }- if (sceneKey === 'customerAnalyticsNotes') {- return 'notes'- }- return 'dashboard'- },+ (sceneKey: string | null): ActiveTab => (sceneKey && SCENE_KEY_TO_TAB[sceneKey]) || 'dashboard',],breadcrumbs: [() => [],diff --git a/products/customer_analytics/manifest.tsx b/products/customer_analytics/manifest.tsxindex 07976b89cb19..913475ae27e9 100644--- a/products/customer_analytics/manifest.tsx+++ b/products/customer_analytics/manifest.tsx@@ -42,6 +42,7 @@ export const manifest: ProductManifest = {'/customer_analytics/accounts/:accountId': ['CustomerAnalytics', 'customerAnalyticsAccounts'],'/customer_analytics/accounts/:accountId/:tab': ['CustomerAnalytics', 'customerAnalyticsAccounts'],'/customer_analytics/notes': ['CustomerAnalytics', 'customerAnalyticsNotes'],+ '/customer_analytics/announcements': ['CustomerAnalytics', 'customerAnalyticsAnnouncements'],'/customer_analytics/journeys/new': ['CustomerJourneyBuilder', 'customerJourneyBuilder'],'/customer_analytics/journeys/templates': ['CustomerJourneyTemplates', 'customerJourneyTemplates'],'/customer_analytics/journeys/:id/edit': ['CustomerJourneyBuilder', 'customerJourneyEdit'],@@ -64,6 +65,7 @@ export const manifest: ProductManifest = {customerAnalyticsAccount: (accountId: string, tab?: string): string =>`/customer_analytics/accounts/${accountId}${tab ? `/${tab}` : ''}`,customerAnalyticsNotes: (): string => '/customer_analytics/notes',+ customerAnalyticsAnnouncements: (): string => '/customer_analytics/announcements',customerAnalyticsJourneys: (): string => '/customer_analytics/journeys',customerAnalyticsConfiguration: (): string => '/customer_analytics/configuration',customerJourneyBuilder: (): string => '/customer_analytics/journeys/new',