Connector Improvement: Feature request: Add "result" column for facebook ads connector
AnsweredWe need new column "result" from basic_all_levels.
-
Official comment
Hi Bimantara,
Thank you for this feature request. I have good news: the data you need to reconstruct the "Result" metric is already available through the Fivetran Facebook Ads connector. Let me walk you through how to access it.
Background: What is the "Result" metric?
The "Result" column you see in Facebook Ads Manager is a computed metric that selects the specific action count corresponding to your campaign's optimization objective. For example, if your campaign objective is "Link Clicks," the Result column shows the count of link_click actions; if your objective is "Leads," it shows leads.The Meta Marketing API provides a field called objective_results that replicates this same logic, returning the result scoped to your campaign's objective so you don't have to manually map objectives to action types. Fivetran can sync this field via a Custom Report. Here are two approaches depending on your needs.
Option 1: Create a Custom Report with objective + objective_results (recommended, simplest approach)
The most direct way to get the "Result" is to create a Custom Report in your Fivetran Facebook Ads connector that includes both the objective and objective_results fields. This will produce two tables:- A parent table (e.g., your_report_name) with a row per campaign/date and an objective column showing the campaign objective (e.g., LINK_CLICKS, OUTCOME_LEADS)
- A child table (e.g., your_report_name_objective_results) with columns:
- indicator: describes what the result is (e.g., actions:link_click, conversions:start_trial_website)
- attribution_window: the attribution window (e.g., default, 7d_click)
- value: the result count
The objective_results field returns exactly one result type per campaign/date, corresponding to your campaign's optimization objective. The value column on the default attribution window row is your "Result." You don't need to manually map objectives to action types; Meta's API does this for you.
To get the "Result" value, simply join the two tables on campaign_id and date, and filter for attribution_window = 'default':
SELECT
parent.campaign_id,
parent.date,
parent.objective,
child.indicator,
child.value AS result
FROM your_report_name parent
JOIN your_report_name_objective_results child
ON parent.campaign_id = child.campaign_id
AND parent.date = child.date
WHERE child.attribution_window = 'default'To set up a Custom Report, navigate to your Facebook Ads connector in the Fivetran dashboard, go to the Schema tab, and configure a new custom report with the fields you need.
Option 2: Using the basic_all_levels_actions child table
If you prefer to use the existing prebuilt basic_all_levels report, the "Result" data is also available in the basic_all_levels_actions child table. This table contains all action types for each ad/date:
- action_type: the type of action (e.g., link_click, purchase, post_engagement, video_view, etc.)
- value: the count of that action
To reconstruct the "Result," you would need to filter to the action_type that matches the campaign objective. This requires joining through to campaign_history (via ad_history and ad_set_history) to get the objective, then mapping the objective to the corresponding action type. For example:
- Campaign objective LINK_CLICKS or OUTCOME_TRAFFIC -> action_type = 'link_click'
- Campaign objective OUTCOME_LEADS -> depends on your conversion event (e.g., offsite_conversion.fb_pixel_lead)
This approach is more complex than Option 1 because the objective-to-action_type mapping is not always straightforward, particularly for conversion-based objectives where the specific action depends on how the campaign was configured. Similarly, the basic_all_levels_cost_per_action_type child table contains the equivalent of the "Cost per Result" metric, structured the same way.
Understanding child tables in Fivetran
If you are not familiar with Fivetran's child table concept, when a source API returns array or nested data within a record, Fivetran unpacks it into a separate "child" table with a foreign key relationship back to the parent table. This keeps your data normalized and queryable via standard SQL joins. The child tables follow the naming convention {parent_table}_{field_name}.
For more details on the Facebook Ads connector schema, available prebuilt reports, and custom report configuration, please see the Fivetran Facebook Ads connector documentation: https://fivetran.com/docs/connectors/applications/facebook-ads
I hope this helps you get the data you need. If you have any questions about the specific SQL joins or setting up a custom report, please do not hesitate to reach out.
Cheers,
Luke -
Hi Bimantara,
Luke from the Product team here! Thanks for submitting this feature request.
I'm not sure which field you are referring to. I don't see a "result" field in Meta's Ads API docs: https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights/. If you could provide a link from Meta's docs or release notes that explain where we can get this data we can add it to our backlog.
Also, the basic_all_levels table is a prebuilt report. Those tables are designed to be useful for all customers. If we add new fields we typically make them available only via custom reports. But you could recreate the basic_all_levels report as a custom report and include this new field as an additional column.
Thanks,
Luke
Please sign in to leave a comment.
Comments
2 comments