Skip to content

Commit

Permalink
Brevo: on signup, add Siae user to Brevo contact list
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed May 13, 2024
1 parent 1aa7b99 commit 4648c9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 2 additions & 0 deletions lemarche/utils/emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4648c9e

Please sign in to comment.