Skip to content

Single hubspot account - #3781

Open
cp-at-mit wants to merge 6 commits into
mainfrom
single-hubspot-account
Open

Single hubspot account#3781
cp-at-mit wants to merge 6 commits into
mainfrom
single-hubspot-account

Conversation

@cp-at-mit

Copy link
Copy Markdown
Contributor

What are the relevant tickets?

NA

Description (What does it do?)

Removes all of the code that was interfacing with the hubspot account defined by UAI_MITOL_HUBSPOT_API_PRIVATE_TOKEN. This hubspot account was previously receiving any user/course/enrollment/deal info associated with UAI courses and programs. This PR updates our hubspot code so that any course, regardless of whether it's a UAI course/program or not is synced with the hubspot account defined by MITOL_HUBSPOT_API_PRIVATE_TOKEN.

How can this be tested?

Use a new user and enroll and pay for a new UAI course and program. Verify that your contact, products, deal, line items, etc are all created in a single Hubspot account linked to MITOL_HUBSPOT_API_PRIVATE_TOKEN

Removes UAI-specific HubSpot token handling so both UAI and non-UAI flows always use `MITOL_HUBSPOT_API_PRIVATE_TOKEN`. Updates deal/cart sync logic, task helper token checks, and error messaging accordingly, and revises tests to reflect the single-account behavior. Also removes the unused `UAI_MITOL_HUBSPOT_API_PRIVATE_TOKEN` setting.
Consolidates deal syncing onto a single token-based `sync_deal_with_hubspot` path and removes the legacy/duplicate targeted function and task variants. It also simplifies cart-add/deal sync call sites by dropping explicit `is_uai` arguments, updates helper/function names to remove `target_`-specific prefixes, and aligns tests with the new API/task behavior (including no longer force-syncing a deal from line-item sync when an order HubSpot ID is missing).
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

OpenAPI Changes

Show/hide ## Changes for v0.yaml:
## Changes for v0.yaml:
No changes detected

## Changes for v1.yaml:
No changes detected

## Changes for v2.yaml:
No changes detected

Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

@cp-at-mit
cp-at-mit marked this pull request as ready for review July 23, 2026 14:02
@pdpinch

pdpinch commented Jul 24, 2026

Copy link
Copy Markdown
Member

Not sure how we would test this, but I think we also want to make sure that directing everything to one account doesn't leave us with overlapping or confusing contacts and deals in Hubspot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants