Skip to content
Notifications
Clear all

Just completed a HubSpot to Salesforce migration - here's what I learned

1 Posts
1 Users
0 Reactions
4 Views
(@ci_cd_enthusiast)
Estimable Member
Joined: 5 months ago
Posts: 117
Topic starter   [#2210]

Hey everyone! Just wrapped up a six-week project migrating our marketing and sales pipelines from HubSpot to Salesforce. The goal was better integration with our enterprise systems and more granular reporting. It was a beast of a job, but our CI/CD mindset around scripting and incremental rollouts saved us. Here's the play-by-play.

**Data Migration Approach**
We treated data like a deployment pipeline. Instead of a "big bang" export/import, we built a series of Python scripts using the respective APIs. Each script handled a specific object type (Contacts, Companies, Deals, etc.) and included validation checks.

Key steps in our "pipeline":
1. **Extract & Transform:** Pull data from HubSpot, map fields to Salesforce equivalents, and clean inconsistencies (like date formats).
2. **Stage:** Write transformed data to a temporary CSV staging area. This gave us a point to audit before the final "deploy."
3. **Load:** Use the Salesforce Bulk API to upsert records from the staged files. We ran this in batches, monitoring for errors.

Here's a simplified snippet of our core transformation logic for Contacts:

```python
def transform_hubspot_to_sf_contact(hubspot_record):
sf_record = {}
sf_record['Email'] = hubspot_record.get('properties.email')
sf_record['FirstName'] = hubspot_record['properties.firstname']
sf_record['LastName'] = hubspot_record['properties.lastname']
# Map custom fields
sf_record['CustomField__c'] = hubspot_record['properties.some_custom_property']
return {k: v for k, v in sf_record.items() if v is not None}
```

**Cutover Plan (Phased Rollout)**
We didn't flip a switch. Our cutover was phased over a week:
* **Week 1 (Dry Run):** Ran the full migration scripts against a Salesforce sandbox. Verified all data integrity.
* **Week 2 (Read-Only Phase):** Cut over data collection *to* Salesforce (new forms, etc.), but kept HubSpot as the source of truth for active sales processes. Ran dual-writes for new data to both systems for comparison.
* **Week 3 (Cutover):** After verifying parity for a week, we redirected all sales and marketing workflows to Salesforce. HubSpot was set to read-only for historical reference.

**How Long It Actually Took**
* **Planning & Scripting:** 2 weeks
* **Dry Runs & Validation:** 1 week
* **Phased Cutover:** 3 weeks
**Total:** ~6 weeks for a mid-sized dataset (~50k Contacts, 5k Companies).

**Biggest Lesson:** Treating the migration like a CI/CD pipelineβ€”with stages, rollback points (our staged CSVs), and incremental validationβ€”was the key to avoiding a nightmare weekend cutover. The extra time spent on scripting paid off massively in reliability.

Anyone else tackled a similar migration? Curious about how you handled custom object mapping or deal stages!

-pipelinepilot


Pipeline Pilot


   
Quote