Sub topic 12
Data Quality, Permissions and Common Pitfalls
Assume you understand the basic CRM model: a deal or opportunity represents potential revenue, while contacts and companies represent the people and organizations involved. Activities such as calls, meetings, notes, and tasks are linked to those records. You should also be comfortable reading a CRM screen and basic JSON.
A CRM report is only as reliable as the records behind it. Missing associations, inconsistent stage values, and unclear notes can make an active deal appear neglected or make a completed deal look open. Data quality means that records are complete, consistent, current, and connected to the correct records.
Check the record before you save it
Use a short validation checklist for every deal activity:
- Is the activity linked to the correct deal or opportunity?
- Is it linked to the correct contact and company?
- Does the activity type match what happened?
- Does the note state the outcome?
- Does it state the agreed next step and its owner?
- Is the due date or activity date correct?
- Does the deal stage, amount, and close date still reflect reality?
An activity without an association may be difficult to find later. An activity linked only to a contact may not appear in the deal’s activity timeline. In Salesforce, the WhoId usually identifies a person and the WhatId identifies a business record such as an opportunity. In HubSpot, associations connect an activity to a deal, contact, or company.
Permissions affect what you can record
A user may be able to view a deal but lack permission to edit it or create activities. Field-level permissions can also make a field read-only or invisible. Sharing rules may hide records owned by another team. These restrictions can look like application errors when they are access-policy decisions.
Check these areas when a save fails or data appears incomplete:
| Area | Typical symptom | What to check |
|---|---|---|
| Object permission | You cannot create or edit a record | Create, read, edit, and delete access |
| Field permission | A value cannot be entered or is missing | Field-level security or property permissions |
| Record sharing | A deal is not visible | Ownership, teams, roles, and sharing rules |
| Validation rule | Save is rejected | Required fields and allowed value formats |
| API permission | Request returns an authorization error | Token scopes and integration access |
Use the least privilege needed. An integration that only creates notes should not receive permission to delete deals. Store API tokens in environment variables or a secret manager, not in source code or activity text.
import os
required = ["HUBSPOT_TOKEN", "DEAL_ID"]
missing = [name for name in required if not os.getenv(name)]
if missing:
raise RuntimeError(f"Missing environment variables: {', '.join(missing)}")
print("Required configuration is available.")This check prevents a script from sending a request with an empty token or an undefined deal identifier. It does not prove that the token has the right scopes, so the API response still needs to be checked.
Common data quality failures
Duplicate contacts and companies split the history of a relationship across multiple records. Before creating a record, search by a stable identifier such as email address, company domain, or an external customer ID.
Free-text values also create reporting problems. For example, one seller may write “Demo complete,” another “demo held,” and another “product presentation.” Use controlled activity types and consistent outcome terms where the CRM supports them.
Stale deal fields are another frequent problem. A deal can remain in a proposal stage after the buyer has paused the project. Review stage, amount, close date, and next activity together. A close date without a future task is often a warning sign.
A practical quality workflow
After saving, reopen the deal and confirm that the activity appears in its timeline. For important integrations, query the record or inspect the API response. Compare the returned association IDs, activity type, timestamp, and text with the values you intended to send.
Troubleshooting order
When a report looks wrong, investigate from the record outward:
- Open the deal and inspect its stage, amount, close date, and timeline.
- Open the activity and confirm its associations.
- Check whether the user or integration can view the related records.
- Look for duplicates or conflicting updates.
- Compare the record with the source system, such as email or calendar.
- Correct the source record, then rerun the report.
Exercise
A completed call appears on a contact but not on the related deal. What should you check first?
Show answer
Check the activity’s deal association. In Salesforce, verify that the opportunity is in WhatId. In HubSpot, verify that the call is associated with the correct deal.