diff --git a/config/settings/base.py b/config/settings/base.py index 0d43659c9..84d6f77e2 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -364,9 +364,10 @@ ) -# -- Sendinblue (BREVO) +# -- Sendinblue (Brevo) BREVO_API_KEY = env.str("BREVO_API_KEY", "set-it") BREVO_CL_SIGNUP_BUYER_ID = env.int("BREVO_CL_SIGNUP_BUYER_ID", 10) +BREVO_CL_SIGNUP_SIAE_ID = env.int("BREVO_CL_SIGNUP_SIAE_ID", 27) BREVO_CL_BUYER_SEARCH_SIAE_LIST_ID = env.int("BREVO_CL_BUYER_SEARCH_SIAE_LIST_ID", 12) INBOUND_PARSING_DOMAIN_EMAIL = env.str("INBOUND_PARSING_DOMAIN_EMAIL", "reply.staging.lemarche.inclusion.beta.gouv.fr") diff --git a/lemarche/utils/emails.py b/lemarche/utils/emails.py index f0f6c6dec..f68972011 100644 --- a/lemarche/utils/emails.py +++ b/lemarche/utils/emails.py @@ -67,6 +67,8 @@ def add_to_contact_list(user, type: str, source: str = user_constants.SOURCE_SIG # TODO: we still use it ? api_hubspot.add_user_to_crm(user) api_brevo.create_contact(user=user, list_id=settings.BREVO_CL_SIGNUP_BUYER_ID) + elif user.kind == user.KIND_SIAE: + api_brevo.create_contact(user=user, list_id=settings.BREVO_CL_SIGNUP_SIAE_ID) elif type == "buyer_search": # contact_list_id = settings.MAILJET_NL_CL_BUYER_SEARCH_SIAE_LIST_ID api_brevo.create_contact(user=user, list_id=settings.BREVO_CL_BUYER_SEARCH_SIAE_LIST_ID)