Skip to content

Commit 8759407

Browse files
feat: Updated the CRM Keys
1 parent d29c9c3 commit 8759407

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

apps/api/src/app/auth/usecases/onboard-user/onboard-user.usecase.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,15 @@ export class OnboardUser {
4343
externalId: updatedUser.email,
4444
};
4545
await this.paymentAPIService.createUser(userData);
46+
console.log('User created in payment API', userData);
4647
await this.leadService.createLead({
4748
'First Name': updatedUser.firstName,
4849
'Last Name': updatedUser.lastName,
4950
'Lead Email': updatedUser.email,
50-
'Lead Source': updatedUser.source,
51-
'Mentioned Role': updatedUser.role,
51+
'CRM Source': updatedUser.source,
52+
Role: updatedUser.role,
5253
'Signup Method': updatedUser.signupMethod as LEAD_SIGNUP_USING,
53-
'Company Size': updatedUser.companySize,
54+
'Est. Employees': updatedUser.companySize,
5455
});
5556
} catch (error) {
5657
captureException(error);

apps/api/src/app/shared/services/lead.service.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ interface ILeadInformation {
88
'Last Name': string;
99
'Lead Email': string;
1010
'Signup Method': LEAD_SIGNUP_USING;
11-
'Mentioned Role': string;
12-
'Lead Source': string;
13-
'Company Size': string;
11+
Role: string;
12+
'CRM Source': string;
13+
'Est. Employees': string;
1414
}
1515

1616
@Injectable()
@@ -53,6 +53,9 @@ export class LeadService {
5353
'First Name': data['First Name'],
5454
'Last Name': data['Last Name'],
5555
'Lead Email': data['Lead Email'],
56+
Role: data.Role,
57+
'Est. Employees': data['Est. Employees'],
58+
'CRM Source': data['CRM Source'],
5659
});
5760
// Add Lead to marketing automation
5861
// eslint-disable-next-line max-len
@@ -81,9 +84,9 @@ export class LeadService {
8184
lastName: data['Last Name'],
8285
email: data['Lead Email'],
8386
signupMethod: data['Signup Method'],
84-
mentionedRole: data['Mentioned Role'],
85-
leadSource: data['Lead Source'],
86-
companySize: data['Company Size'],
87+
mentionedRole: data.Role,
88+
leadSource: data['CRM Source'],
89+
companySize: data['Est. Employees'],
8790
createdAt: new Date(),
8891
});
8992
if (this.log) console.log('Lead data sent to Make.com webhook');

apps/api/src/app/team/usecase/accept-invitation/accept-invitation.usecase.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ export class AcceptInvitation {
108108
'First Name': user.firstName,
109109
'Last Name': user.lastName,
110110
'Lead Email': user.email,
111-
'Lead Source': 'Invitation',
112-
'Mentioned Role': user.role,
111+
'CRM Source': 'Invitation',
112+
Role: user.role,
113113
'Signup Method': LEAD_SIGNUP_USING.EMAIL,
114-
'Company Size': user.companySize,
114+
'Est. Employees': user.companySize,
115115
});
116116
} catch (error) {
117117
captureException(error);

apps/web/config/constants.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ export const HOW_HEARD_ABOUT_US = [
443443
{ value: 'Google Search', label: 'Google Search' },
444444
{ value: 'Bubble.io', label: 'Bubble.io' },
445445
{ value: 'Colleague', label: 'Colleague' },
446-
{ value: 'Linkdin', label: 'Linkdin' },
446+
{ value: 'Linkedin', label: 'Linkedin' },
447447
{ value: 'Invitation', label: 'Invitation' },
448448
{ value: 'AI (ChatGPT, Perplexity, Claude ...)', label: 'AI (ChatGPT, Perplexity, Claude ...)' },
449449
];

0 commit comments

Comments
 (0)