Feature/campaign performance#84
Open
fivetran-catfritz wants to merge 16 commits into
Open
Conversation
fivetran-catfritz
marked this pull request as ready for review
July 15, 2026 16:24
fivetran-savage
left a comment
There was a problem hiding this comment.
Looks great! Just a couple of suggestions before approval.
| | `salesforce__campaign_performance` | New model | — | One row per campaign | Requires the `campaign` source table. Conditionally joins `campaign_member` and `record_type`. | | ||
| | `salesforce__campaign_daily_history` | New model | — | One row per campaign per day | Disabled by default. Requires Salesforce History Mode and `salesforce__campaign_history_enabled: true`. | | ||
| | `salesforce__opportunity_enhanced` | New column | — | `opportunity_record_type_name` | Conditionally populated when `salesforce__record_type_enabled: true`. Joins `record_type` filtered to `sobject_type = 'Opportunity'`. | | ||
| | `stg_salesforce__campaign` | Column renamed | `record_type_id` | `campaign_member_record_type_id` | Reflects the Salesforce field `CampaignMemberRecordTypeId`, a campaign-level attribute. **Breaking for downstream models that reference `record_type_id` from this staging model.** | |
There was a problem hiding this comment.
Do you think we should list the downstream models by name that reference record_type_id or are there too many?
Contributor
Author
There was a problem hiding this comment.
Oh oops campaign is a net new model, so there is no breaking change. Removing this.
| | `stg_salesforce__campaign_member` | New columns | — | `account_id`, `created_by_id`, `has_opted_out_of_email`, `last_modified_by_id`, `lead_or_contact_id`, `lead_or_contact_owner_id` | Added identity and engagement fields for more complete member-level analysis. | | ||
|
|
||
| ## Feature Update | ||
| - `salesforce__campaign_performance` includes pipeline totals (`total_pipeline_amount`, `total_won_amount`), member volume (`campaign_member_count`, `responded_count`, `contact_count`, `lead_count`, `opted_out_of_email_count`), and ROI measures (`win_rate`, `cost_per_opportunity`, `cost_per_won_opportunity`, `roi`). |
There was a problem hiding this comment.
I don't think specific metrics are needed as a separate feature update for a net-new end model. The general categories are already in the model description in the readme, which is sufficient.
Contributor
Author
There was a problem hiding this comment.
Agreed. Updated.
Updated CHANGELOG.md to reflect new features and changes in dbt_salesforce v2.2.0, including enhancements to campaign performance metrics and new staging models.
Co-authored-by: Savage Fivetran <sarah.savage@fivetran.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Overview
Package version introduced in this PR:
This PR addresses the following Issue/Feature(s):
Summary of changes:
salesforce__campaign_performanceandsalesforce__campaign_daily_history.Submission Checklist
Changelog