File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { env } from "~/env.server";
1414import { featuresForUrl } from "~/features.server" ;
1515import { createApiKeyForEnv , createPkApiKeyForEnv , envSlug } from "./api-key.server" ;
1616import { getDefaultEnvironmentConcurrencyLimit } from "~/services/platform.v3.server" ;
17+ import { enqueueAttioWorkspaceSync } from "~/services/attio.server" ;
1718export type { Organization } ;
1819
1920const nanoid = customAlphabet ( "1234567890abcdef" , 4 ) ;
@@ -82,6 +83,15 @@ export async function createOrganization(
8283 } ,
8384 } ) ;
8485
86+ // Fire-and-forget; never blocks org creation.
87+ void enqueueAttioWorkspaceSync ( {
88+ orgId : organization . id ,
89+ title : organization . title ,
90+ slug : organization . slug ,
91+ companySize : organization . companySize ,
92+ createdAt : organization . createdAt ,
93+ } ) ;
94+
8595 return { ...organization } ;
8696}
8797
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import type { Organization } from "~/models/organization.server";
55import type { Project } from "~/models/project.server" ;
66import type { User } from "~/models/user.server" ;
77import { singleton } from "~/utils/singleton" ;
8+ import { enqueueAttioUserSync } from "./attio.server" ;
89import { loopsClient } from "./loops.server" ;
910
1011type Options = {
@@ -74,6 +75,14 @@ class Telemetry {
7475 email : user . email ,
7576 name : user . name ,
7677 } ) ;
78+
79+ enqueueAttioUserSync ( {
80+ userId : user . id ,
81+ email : user . email ,
82+ referralSource : referralSource ?? user . referralSource ,
83+ marketingEmails : user . marketingEmails ,
84+ createdAt : user . createdAt ,
85+ } ) ;
7786 }
7887 } ,
7988 } ;
You can’t perform that action at this time.
0 commit comments