Overview
Configuration is provided for establishing connections with Facebook service. The configuration is used in the REST Connection Manager.
Setup
Press icon to get more information about the connection parameters.
Obtain data
Use REST Source component to get data from service resource.
Insert data
Use REST Destination component to insert data into service resource.
Quick Start
In this task, we will show you step-by-step how to create a connection to Facebook Business REST API using COZYROC's REST Connection Manager.
Step 6. Click "Test Connection" to test your connection.
Congratulations! You have now established a connection to your Facebook Business instance.
In this guide, we will show how to read data from the Facebook Business service resource using the COZYROC REST Source component.
In this guide, we will show how to write data to the Facebook Business service resource using the COZYROC REST Destination component.
Configuration
Base URL address: https://graph.facebook.com/v16.0
.
- OAuth 2
-
The authentication uses an authorized token. The token will be refreshed with the following expression:
{{=Date.now() + (response.expires_in - 300) * 1000}}
.The authentication has the following user-defined parameters:
- Scope: https://developers.facebook.com/docs/permissions/reference
The following request parameters will be automatically processed during the authentication process:
-
Authorization:
Bearer {{=token.Access}}
Documentation: https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/me/businesses
.Documentation: https://developers.facebook.com/docs/marketing-api/reference/business/agencies/.
- [Read single] action
-
Endpoint URL address:
/{{=FB.UI.BusinessEditor.getValue(parameters)}}
.
The result is extracted from:{{=utils.ensureArray(response)}}
.The action has the following user-defined parameters:
- id: Required. Specify the business-identifier.
Documentation: https://developers.facebook.com/docs/marketing-api/reference/business#Reading.
- [Create] action
-
Endpoint URL address:
/{{=item.offline_conversion_data_set_id}}/agencies
.Documentation: https://developers.facebook.com/docs/marketing-api/reference/business#Creating.
- [Update] action
-
Endpoint URL address:
{{=item.id}}
.Documentation: https://developers.facebook.com/docs/marketing-api/reference/business#Updating.
- [Delete] action
-
Endpoint URL address:
{{=item.id}}/agencies
.Documentation: https://developers.facebook.com/docs/marketing-api/reference/business#Deleting.
- business
Data type: DT_I8
- offline_conversion_data_set_id
Data type: DT_I8
- other_relationship
Template: ShortText.
- permitted_roles
Template: Composite.
- relationship_type
Template: Composite.
- [External]
-
The external fields list is extracted from:
{{=FB.getFields('/schema/business', 2)}}
.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/{{=FB.UI.BusinessEditor.getValue(parameters)}}/{{=parameters.edge}}
.The action has the following user-defined parameters:
- id: Required. Specify the Business identifier or select from the editor.
- edge: Required. Specify the Edge or select from the editor.
Documentation: "https://developers.facebook.com/docs/marketing-api/reference/business".
- [External]
-
The external fields list is extracted from:
{{=FB.getFields('/schema/business/' + parameters.edge, 2)}}
.
Based on resource template Base.
- [Read single] action
-
Endpoint URL address:
/{{=parameters.id}}
.
The result is extracted from:{{=utils.ensureArray(response)}}
.The action has the following user-defined parameters:
- id: Required. Specify the business user identifier.
Documentation: https://developers.facebook.com/docs/marketing-api/reference/business-user#Reading.
- [Create] action
-
Endpoint URL address:
/{{=item.business_id}}/business_users
.Documentation: https://developers.facebook.com/docs/marketing-api/reference/business-user#Creating.
- [Update] action
-
Endpoint URL address:
/{{=item.id}}
.Documentation: https://developers.facebook.com/docs/marketing-api/reference/business-user#Updating.
- [Delete] action
-
Endpoint URL address:
/{{=item.id}}
.Documentation: https://developers.facebook.com/docs/marketing-api/reference/business-user#Deleting.
- business_id
Data type: DT_R8
- [External]
-
The external fields list is extracted from:
{{=FB.getFields('/schema/businessuser', 2)}}
.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/{{=parameters.id}}/{{=parameters.edge}}
.The action has the following user-defined parameters:
- id: Required. Specify the business user identifier.
- edge: Required. Specify the Edge or select from the editor.
Documentation: "https://developers.facebook.com/docs/marketing-api/reference/business-user#overview".
- [External]
-
The external fields list is extracted from:
{{=FB.getFields('/schema/businessuser/' + parameters.edge)}}
.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/{{=parameters.id}}/{{=parameters.edge}}
.The action has the following user-defined parameters:
- id: Required. Specify the user identifier.
- edge: Required. Specify the Edge or select from the editor.
Documentation: "https://developers.facebook.com/docs/marketing-api/reference/user#overview".
- [External]
-
The external fields list is extracted from:
{{=FB.getFields('/schema/user/' + parameters.edge)}}
.
Based on resource template Base.
- [Read single] action
-
Endpoint URL address:
/{{=parameters.id}}
.
The result is extracted from:{{=utils.ensureArray(response)}}
.The action has the following user-defined parameters:
- id: Required. Specify the system user identifier.
Documentation: https://developers.facebook.com/docs/marketing-api/reference/system-user#Reading.
- [Create] action
-
Endpoint URL address:
/{{=item.business_id}}/system_users
.Documentation: https://developers.facebook.com/docs/marketing-api/reference/system-user#Creating.
- business_id
Data type: DT_R8
- [External]
-
The external fields list is extracted from:
{{=FB.getFields('/schema/systemuser', 2)}}
.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/{{=parameters.id}}/{{=parameters.edge}}
.The action has the following user-defined parameters:
- id: Required. Specify the system user identifier.
- edge: Required. Specify the Edge or select from the editor.
Documentation: "https://developers.facebook.com/docs/marketing-api/reference/system-user#overview".
- [External]
-
The external fields list is extracted from:
{{=FB.getFields('/schema/systemuser/' + parameters.edge)}}
.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/{{=parameters.id}}
.The action has the following user-defined parameters:
- id: Required. Specify business role request identifer
Documentation: https://developers.facebook.com/docs/marketing-api/reference/business-role-request.
- [Update] action
-
Endpoint URL address:
/{{=item.id}}
.Documentation: "https://developers.facebook.com/docs/marketing-api/reference/business-role-request#Updating".
- [Delete] action
-
Endpoint URL address:
/{{=item.id}}
.Documentation: "https://developers.facebook.com/docs/marketing-api/reference/business-role-request#Deleting".
- [External]
-
The external fields list is extracted from:
{{=FB.getFields('/schema/businessrolerequest')}}
.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/{{=parameters.objectId}}/insights
.
The result is extracted from:{{=response.data}}
.The action has the following user-defined parameters:
- objectId: Required. Specify the object identifier (adaccountId | campaignId | AdSetId | AdId)
- filtering: Specify in JSON format to filter the result. Optional.
Documentation: "https://developers.facebook.com/docs/marketing-api/reporting/".
- account_currency
Template: ShortText.
- account_id
Template: ShortText.
- account_name
Template: ShortText.
- ad_id
Template: ShortText.
- ad_name
Template: ShortText.
- adset_id
Template: ShortText.
- adset_name
Template: ShortText.
- attribution_setting
Template: ShortText.
- buying_type
Template: ShortText.
- campaign_id
Template: ShortText.
- campaign_name
Template: ShortText.
- canvas_avg_view_percent
Template: ShortText.
- canvas_avg_view_time
Template: ShortText.
- conversion_rate_ranking
Template: ShortText.
- cost_per_estimated_ad_recallers
Template: ShortText.
- cost_per_inline_link_click
Template: ShortText.
- cost_per_inline_post_engagement
Template: ShortText.
- cost_per_unique_click
Template: ShortText.
- cost_per_unique_inline_link_click
Template: ShortText.
- cpc
Template: ShortText.
- cpm
Template: ShortText.
- cpp
Template: ShortText.
- ctr
Template: ShortText.
- date_start
Template: ShortText.
- date_stop
Template: ShortText.
- engagement_rate_ranking
Template: ShortText.
- estimated_ad_recall_rate
Template: ShortText.
- estimated_ad_recallers
Template: ShortText.
- frequency
Template: ShortText.
- full_view_impressions
Template: ShortText.
- full_view_reach
Template: ShortText.
- impressions
Template: ShortText.
- inline_link_click_ctr
Template: ShortText.
- inline_link_clicks
Template: ShortText.
- inline_post_engagement
Template: ShortText.
- instant_experience_clicks_to_open
Template: ShortText.
- instant_experience_clicks_to_start
Template: ShortText.
- objective
Template: ShortText.
- optimization_goal
Template: ShortText.
- place_page_name
Template: ShortText.
- qualifying_question_qualify_answer_rate
Template: ShortText.
- quality_ranking
Template: ShortText.
- reach
Template: ShortText.
- social_spend
Template: ShortText.
- total_postbacks
Template: ShortText.
- video_play_curve_actions
Template: ScalarList.
- dda_results
Template: ScalarList.
- actions
Template: ReportingInsightT.
- catalog_segment_value
Template: ReportingInsightT.
- conversion_values
Template: ReportingInsightT.
- conversions
Template: ReportingInsightT.
- converted_product_quantity
Template: ReportingInsightT.
- converted_product_value
Template: ReportingInsightT.
- cost_per_action_type
Template: ReportingInsightT.
- cost_per_conversion
Template: ReportingInsightT.
- cost_per_outbound_click
Template: ReportingInsightT.
- cost_per_thruplay
Template: ReportingInsightT.
- cost_per_unique_action_type
Template: ReportingInsightT.
- cost_per_unique_outbound_click
Template: ReportingInsightT.
- instant_experience_outbound_clicks
Template: ReportingInsightT.
- mobile_app_purchase_roas
Template: ReportingInsightT.
- outbound_clicks
Template: ReportingInsightT.
- outbound_clicks_ctr
Template: ReportingInsightT.
- purchase_roas
Template: ReportingInsightT.
- video_30_sec_watched_actions
Template: ReportingInsightT.
- video_avg_time_watched_actions
Template: ReportingInsightT.
- video_p100_watched_actions
Template: ReportingInsightT.
- video_p25_watched_actions
Template: ReportingInsightT.
- video_p50_watched_actions
Template: ReportingInsightT.
- video_p75_watched_actions
Template: ReportingInsightT.
- video_p95_watched_actions
Template: ReportingInsightT.
- video_play_actions
Template: ReportingInsightT.
- website_ctr
Template: ReportingInsightT.
- website_purchase_roas
Template: ReportingInsightT.
Based on resource template Base.
- [Create] action
-
Endpoint URL address:
{{=item.business_manager_id}}/offline_conversion_data_sets
.Documentation: "https://developers.facebook.com/docs/marketing-api/offline-conversions".
- id
A key field. Template: ShortText.
- name
Template: ShortText.
- description
Template: ShortText.
- business_manager_id
Data type: DT_I8
Based on resource template Base.
- [Create] action
-
Endpoint URL address:
{{=item.offline_event_set_id}}/adaccounts
.Documentation: "https://developers.facebook.com/docs/marketing-api/offline-conversions".
- id
A key field. Template: ShortText.
- business
Data type: DT_I8
- account_id
Data type: DT_I8
- offline_event_set_id
Data type: DT_I8
Based on resource template Base.
- [Create] action
-
Endpoint URL address:
{{=item.ad_id}}/
.The following request parameters will be automatically processed:
-
application/json:
{{={tracking_specs : [item]} }}
Documentation: "https://developers.facebook.com/docs/marketing-api/offline-conversions".
-
application/json:
- id
A key field. Template: ShortText.
- action.type
Template: ShortText.
- dataset
Data type: DT_I8
- ad_id
Data type: DT_I8
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/{{=parameters.objectId}}/insights
.The action has the following user-defined parameters:
- objectId: Required. Specify Ad Account identifier
Documentation: "https://developers.facebook.com/docs/marketing-api/insights-api/ads-volume".
- ads_running_or_in_review_count
Data type: DT_I4
- current_account_ads_running_or_in_review_count
Data type: DT_I4
- actor_id
Template: ShortText.
- actor_name
Template: ShortText.
- ad_limit_scope_business
Template: ShortText.
- ad_limit_scope_business_manager_id
Template: ShortText.
- ad_limit_set_by_page_admin
Data type: DT_I4
- ads_running_or_in_review_count_subject_to_limit_set_by_page
Data type: DT_I4
- future_limit_activation_date
Template: Date.
- future_limit_on_ads_running_or_in_review
Data type: DT_I4
- limit_on_ads_running_or_in_review
Data type: DT_I4
- recommendations
Template: ShortText.
- [Read] action
-
The result is extracted from:{{=response.data}}
.
The result is paginated.The following request parameters will be automatically processed:
-
fields:
{{=_.filter(parameters.fields, function(field) { return field.indexOf('.') == -1; }).join(',')}}
-
limit:
{{=parameters.batchSize}}
-
after:
{{=parameters.iterator}}
-
_includeUserParameters:
{{=parameters}}
-
fields:
- [Create] action
-
The action uses POST method.The following request parameters will be automatically processed:
-
_includeUserParameters:
{{=parameters}}
-
application/json:
{{=item}}
-
_includeUserParameters:
- [Update] action
-
The action uses POST method.The following request parameters will be automatically processed:
-
_includeUserParameters:
{{=parameters}}
-
application/json:
{{=item}}
-
_includeUserParameters:
- [Delete] action
-
The action uses DELETE method.
- ShortText
Data type: DT_WSTR ( length 255 )
- LongText
Data type: DT_WSTR ( length 1000 )
- DateTime
Data type: DT_DBTIMESTAMP
- Date
Data type: DT_DBDATE
- Bool
Data type: DT_BOOL
- Int
Data type: DT_I4
- Number
Data type: DT_R8
- Image
Data type: DT_IMAGE
- BaseFieldsTemplate
Field components:
-
Uses template:
ShortText
. - Contains the following components: id, name.
-
Uses template:
- Composite
Template: LongText. A composite field.
- ScalarList
Template: Composite. The gathered value is processed with
{{=value && value.join(', ')}}
expression.- PageCategoryList
Field components:
- An array.
-
Uses template:
BaseFieldsTemplate
.
- KeyValueList
Field components:
- An array.
- Contains the following components: key, value.
- BusinessSystemUser
Template: BaseFieldsTemplate. Field components:
-
Uses template:
BaseFieldsTemplate
. - Contains the following components: business.
-
Uses template:
- ReportingInsightT
Field components:
- An array.
- Contains the following components: 1d_click, 1d_view, 28d_click, 28d_view, 7d_click, 7d_view, action_canvas_component_name, action_carousel_card_id, action_carousel_card_name, action_destination, action_device, action_reaction, action_target_id, action_type, action_video_sound, action_video_type, action_reaction, action_target_id, dda, inline, value.
Knowledge Base
What's New
- New: Introduced connection.
Related documentation
COZYROC SSIS+ Components Suite is free for testing in your development environment.
A licensed version can be deployed on-premises, on Azure-SSIS IR and on COZYROC Cloud.