Skip to content

Commit ad99851

Browse files
committed
Add onboarding list assignment on signup
- Add contacts to Onboarding list (ID 12) alongside Product Updates when a new organization is created
1 parent 07d525b commit ad99851

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

backend/src/server/brevo/service.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ use uuid::Uuid;
2727
const BREVO_PRODUCT_UPDATES_LIST_ID: i64 = 9;
2828
/// Brevo list ID for "App Users - Marketing" (explicit opt-in only)
2929
const BREVO_MARKETING_LIST_ID: i64 = 10;
30+
/// Brevo list ID for "App Users - Onboarding" (all app signups)
31+
const BREVO_ONBOARDING_LIST_ID: i64 = 12;
3032

3133
/// Service for syncing data to Brevo CRM
3234
pub struct BrevoService {
@@ -302,14 +304,21 @@ impl BrevoService {
302304
.sync_contact_and_company(email.as_ref(), contact_attrs, org_name, company_attrs)
303305
.await?;
304306

305-
// Add to "Product Updates" list (all signups)
307+
// Add to "Product Updates" and "Onboarding" lists (all signups)
306308
if let Err(e) = self
307309
.client
308310
.add_contacts_to_list(BREVO_PRODUCT_UPDATES_LIST_ID, vec![email.to_string()])
309311
.await
310312
{
311313
tracing::warn!(error = %e, "Failed to add contact to Product Updates list");
312314
}
315+
if let Err(e) = self
316+
.client
317+
.add_contacts_to_list(BREVO_ONBOARDING_LIST_ID, vec![email.to_string()])
318+
.await
319+
{
320+
tracing::warn!(error = %e, "Failed to add contact to Onboarding list");
321+
}
313322

314323
// Add to "Marketing" list only if opted in
315324
if marketing_opt_in

0 commit comments

Comments
 (0)