SAP Marketing Cloud: How to create a Facebook App for Campaign and Custom Audience Integration
SAP Marketing Cloud offers two integration scenarios with Facebook.
- Facebook Page Integration
- Facebook Campaign and Custom Audience Integration
This blog post focuses on the Facebook App creation to enable the second scenario, Facebook Campaign and Custom Audience Integration.
With the integration you have the possibility to use your SAP Marketing Cloud Target Groups (custom audience) on Facebook including Instagram and the Facebook Audience Network. With SAP Marketing Cloud you can plan, execute and analyze the performance of your Facebook campaigns.
Upfront I kindly refer to the application help and the SAP Marketing Cloud Integration Guide, which contains all important information and is updated regularly.
Disclaimer: SAP has no impact on the Facebook App review or the app review process itself. Facebook has always the right to reject Facebook Apps without any reason.
The goal of this blog is to create a Facebook App which can be used for the SAP Marketing Cloud – Facebook Campaign and Custom Audience Integration.
For productive usage of the Facebook App, your app must be live, and the following permissions must be approved:
Ads_management (Standard Access)
For further details see the SAP Marketing Cloud Integration Guide
To get started, get a rough understanding of the Facebook App, Facebook App review, Facebook App Access Levels and the Marketing API sample submission.
Facebook App Creation for SAP Marketing Cloud – Facebook Campaign
- Be aware that the App creation process is a snapshot taken in March 2019. Facebook can always change the process.
- The SAP Marketing Cloud integration is a Server-to-Server App: https://developers.facebook.com/docs/apps/review/server-to-server-apps/
- A Business Verification is necessary to get the ads management standard access
- The best source on a how to configure SAP Marketing Cloud is the SAP Marketing Cloud Integration Guide
In the example the SAP Marketing Cloud URL is used. Replace it with your personal SAP Marketing Cloud URL.
Example SAP Marketing Cloud URL: http://my300011.s4hana.ondemand.com/
The following artifacts are needed for the Facebook App:
- Company logo
- Data Privacy URL
- SAP Marketing Cloud URL
- Redirect URI of SAP Marketing Cloud URL (see Integration Guide)
Step 1 – Create a new Facebook App:
Go to https://developers.facebook.com/apps/ and create a new Facebook App by pressing”Add a New App”.
Image 1: Add a new Facebook App
Select “Implement Marketing API”, this will add the “Marketing API” and automatically the “Facebook Login” products to your app.
Image 2: Implement Marketing API
The Facebook Login and Marketing API products are added to your app.
Remark: Grey check marks means these Facebook APIs are not yet approved. A green check mark means approved.
Image 3: Facebook App Settings (Basic and Advanced)
Step 2 – Do Basic and Advanced App Settings:
A) Basic Settings
- Add app icon
- Add privacy URL
- Add app domains: use the hostname of your SAP Marketing Cloud Tenant (without https://)
- Select business use: Choose “support my own business”
- Select category: Choose “Business and Pages”
- Add contact email address
Remark: The App ID and App secret is needed to configure the Facebook Integration in SAP Marketing Cloud
Image 4: Basic Settings including App ID and App secret
B) Advanced Settings:
- Go to Settings section “Advanced Settings”
- Turn off “Social Discovery” (not needed)
- Add your Business Manager
- Add Marketing Cloud URL to the Domain Manager section
- Go to the Domain Manager section
- Add the URL your Marketing Cloud
- Click Add Domain: URL: http://my300011.s4hana.ondemand.com/
- Choose Exact Match
- Click Apply
Image 5: Advanced Settings, turn off “Social Discovery”
Image 6: Domain Manager, add your SAP Marketing Cloud as a Domain
Image 7: SAP Marketing Cloud Domain Settings
Step 3 – Set up Facebook Login
- Go to Facebook Login section “Settings” and choose:
- Client OAuth Login: Yes
- Web OAuth Login: Yes
- Enforce HTTPS: Yes (default)
- Force Web OAuth Reauthentication: No
- Embedded Browser OAuth Login: No
- Use strict Mode for Redirect URIs: Yes
- In the section “Valid OAuth Redirect URIs” enter the redirect URI of your SAP Marketing Cloud as described in the SAP Marketing Cloud Integration Guide
- Go to Facebook Login section “Quickstart”
- Choose “Web” as platform
- Enter your companies site URL
- Save your changes
- Check the settings in the screenshot below – your settings should match
Image 8: Facebook Login Settings
Image 9: Facebook Login Quickstart, choose Web as Platform and add Site URL
Step 4 – Set Up Marketing API:
- Go to Marketing API section “Settings”
- Choose your Business Manager
- Add “Ads Management Standard Access” to your app review submission
Remark: You can already set up the Communication Arrangement in SAP Marketing Cloud and test with the Facebook user and ad account associated with the app.
Image 10: Marketing API Settings
Step 5 – Set Up Communication Arrangement in SAP Marketing Cloud:
For the next steps you need a working integration, for example, to create a video.
For details see the SAP Marketing Cloud Integration Guide
Step 6 – Produce a video:
You must provide a video for the Facebook Login permission and a video for the Ads_management (Standard Access) permission.
Facebook provides an example video on the Marketing API sample submission page.
For the Facebook Login permission video, you can show the creation of a Facebook campaign and then trigger the user authentication flow to Facebook by pressing the “authenticate button” in the campaign designer UI.
For the login video it is important to show that the login uses your Facebook App.
For the Ads_management permission video, you can show the campaign creation, performance tab with analytics, including charts and various drilldowns. You can use the CSV upload to add data to your Facebook campaign in case you do not have a real example of a Facebook campaign yet.
Remark: Be aware that SAP can’t produce such videos for you because the video must show your new app.
Step 7 – Test the App
Test your app to increase the successful calls of the app to the Facebook API – for example, create campaigns
Step 8 – App Live Mode
Turn on live mode. For further details see the Facebook documentation on switching on live mode.
Remark: Once the app is set to live, the unapproved permissions for Ads_management and login will disappear. This means the app can’t be used to create a campaign (ad account retrieval will fail). Also, in the graph API console this access is missing.
Once APIs are approved, everything will work again.
Step 9 – Submit your app for review
Sumbmit the App for review.
Remark: To use your App productively you need the following permissions approved:
- Facebook Login
- Ads_management (Standard Access)
You can use the following text for your app submission:
Hello Facebook, we are using SAP Marketing Cloud and would like to create Facebook campaigns and transfer custom audiences with SAP Marketing Cloud to Facebook. Campaigns and custom audiences are used for advertising. Details: https://help.sap.com/viewer/b88f770e4b7c4ecead5477e7a6c7b8f7/LATEST/en-US/7d6b9556027ed75fe10000000a441470.html SAP Marketing Cloud is a marketing suite offered by SAP and is a server-to-server app: https://developers.facebook.com/docs/apps/review/server-to-server-apps/ The Facebook login is necessary to fetch a user access token to access the Marketing API (Ads_management permission). Thank you for your approval. With best regards --- Your Name Here --- 1) Logon to SAP Marketing Cloud 2) Open SAP Marketing Cloud Campaigns app 3) Create a new campaign 4) Click Authenticate 5) OAuth 2.0 login flow starts with Facebook For details see uploaded screencast.
Image 11: Facebook review submission
Image 12: Submit Facebook App for review
Remark: The Business Verification is a prerequisite of the Ads Management Standard Access.
Image 13: Business Verification
Remark: It might be that Facebook Login or Marketing API permissions get approved independently. See intermediate result below: Facebook Login permission is approved (green check mark), ads management permission is still pending (grey check mark)
Image 14: Intermediate result, Facebook Login approved, Marketing API pending
Submit approval for Marketing API: Ads Management Standard Access
Image 15: Ads Management Standard Access submission
Image 15: Ads Management Standard Access submission approval form
Final Result – Approved Facebook App
Once both APIs are approved your app should look like this:
Image 16: Facebook Login and Marketing API approved
Step 10 – Test the integration
Test your app with business users.
This blog showed how to create a Facebook App including approval for SAP Marketing Cloud.
Did you have any issues with the integration?
Have a look at the Facebook troubleshooting consulting note.
- SAP Marketing Cloud Integration Guide
- Facebook Marketing API sample submission
- Facebook App, Facebook App review
- Facebook App Access Levels
- Facebook troubleshooting consulting note
Thanks for the extensive Blog, this is very helpful.
A question from my side. We have integrated Facebook with the Marketing Cloud (scenario 1 and 2) for our project. we noticed that for scenario 2 if we keep the Facebook app in development mode all the different functionalities are working (sending campaigns from MKT to Facebook, sending audiences, acquiring performance data from Facebook campaigns). What is the extra benefit of going through the approval process as the app seems to be working without it?
Also, is there going to be a blog for scenario 1? As I noticed this process is also difficult.
thanks a lot for the great question.
I kindly refer to the Facebook help: Facebook App Access Levels
Just a few benefits to mention for Ads Management standard Access:
Usually the rate limits can be a quite big issue depending on how much business you are doing with Facebook.
Nice Blog and explanation.! We are trying to do a one way communication from the Facebook to yMKT.
In Facebook, we have Adforms and anybody fills out the information that data would like to extract it to Marketing cloud. We would like to bring in the new profiles from Facebook to yMKT.
Does this possible with the Facebook integration?. I wasn't able to find any Iflows which is supporting in yMKT.
this is not possible with the Marketing Cloud - Facebook Ads integration. This is an "outbound integration" like stated in the Integration Guide.
For sure both processes make a very nice closed loop scenario with full support of data privacy and data protection (GDPR).
For your use case I recommend to take a look on the contact and interaction API of Marketing Cloud:
We configure the scenario in our system. Our customer needs to load an additional field into the Facebook performance campaing. It could be possible to extend a field in the CSV file for Success Campaign Data import for Facebook an Google Ads?
yes you can extend the CSV file for campaign performance with custom measures and dimensions.
You can find the details in the SAP Marketing Cloud Documentation
Focus on the usage “CSV upload for campaign performance”
Be aware that the of the Facebook integration scenario is a out of the box integration (beside the Facebook App). Extensibility is not necessary.
Hi Michael, thanks for your answer.
I try to access the lik bur it shows me that i need permissions. I follow the steps on the following link
but, it just function to add the field in the CSV for External Campaigns performance.
It could be possible for you to send me detailed info fo extend the CSV for Google and Facebook Ads?
I am trying to follow the steps, but in Step 4 I am stacked in Marketing API section – I cannot Add “Ads Management Standard Access” to your app review submission as there is no such an option (see the print screen).
Can you advise me how to proceed further?
Thank you in advance,
Thanks for your message.
Facebook has done some changes recently to their app review steps as you can see from the info message on top of your app. Now Requested and available permissions are available under App review.
Go to App Review section “Current request” (or) Go to App Review section “Permissions and Features”
Request “Ads Management Standard Access” to your app review submission
We will update the documentation accordingly. Thanks.
HEADS UP: Facebook has released new Marketing api version v4.0 recently. In addition to ads_management permission, now it is required to have 'business_management' permission. If you have an already exisiting Facebook App or creating a new App, Please request this new permission too in your submission to Facebook.
Thanks & Regards,
Thank for this very extensive blog. It is very useful!
I'm having one small challenge and I can't seem to solve it:
In the Basic Settings of the Facebook App I wrote the yMKT Tenant Hostname (as recommended by this tutorial). For the Website URL I wrote the corresponding URL of our customer. But then I received the error notification: (using localhost as example for my yMKT Hostname)
How could I solve this?
Domain and your website site url domain should match.
Website -siteurl : http://my300011.s4hana.ondemand.com/
I already set up the App in Facebook Developers account and the Communication Arrangement in Marketing Cloud in order to connect both systems.
The authentication is successful when I create a new Facebook campaign from SAP Marketing.
But the Advertiser and the Conversion Fields in Parameters for Facebook Ads section from Marketing cloud are empty, it isn't bringing the information from Facebook, although I have an admin account in the Facebook page.
Remarks: In Facebook Actually I have the app in Developer mode and i haven't done the video because first of all i want to do a test.
It's ok to keep a development app for testing purpose. You need to add users as a developer or admin of app. Do you have adaccounts and is it available in Business manager?
Did you maintain the right 'Valid Oauth redirect uri'? Domain and Website url?
Once all tested and the integration is working fine, then you can move the app to Live mode and to get approved from Facebook for productive usage.
Hi Strevi, Thank you for your response.
As you said, I've already set up users as developer and ad account in Business manager.
It seems that the issue origin is when both systems are linked, the following error message is showing in Marketing Cloud
“There was an issue with request parameters: Code 400, message 'Bad Request'.
“(#2635) You are calling a deprecated version of the Ads API. Please update to the latest version: v5.0. (Code:2635).”
As a result of this issue, in the FACEBOOK CAMPAIGN set up the Advertiser field isn't showing
Thank you in advance,
Same issue here. It was working fine but now i got the same error message.
Did you manage to sort out the issue?
Updates for Facebook version v5.0 is will be available in your cloud 2002 systems on Feb 15th weekend. Please follow up with your incident,
Unfortunately newer apps which was created after V5.0 will be affected until the fix is applied. Apps in V4.0 and below will not get affected until the next timeline as mentioned in Facebook changelogs.
I'm encountering the same issue now with V8.0. Any idea when this version will become available in SAP Marketing Cloud?
Is there anything else I can do at this point to solve this issue?
Did you eventually find a fix to the issue you outlined above?
Thanks for your time.
are there any updates regarding the ability to capture leads from Facebook and create them in Marketing Cloud without any developments? I know that other platforms do offer this connectivity.
Assaf Peer I have seen there is an integration that does add contacts from Facebook however it says only from interactions such as comments and posts. I am not sure whether this would add leads from lead ad campaigns as the documentation is not clear.
it states "Incoming posts are processed by SAP Marketing Cloud and stored as interactions. If an interaction contact does not already exist in the system, a new one is created."
Please see here: https://help.sap.com/viewer/0f9408e4921e4ba3bb4a7a1f75f837a7/2005.500/en-US/531e3c90d64044e9a15f1d5a03f194f6.html?q=facebook%20marketing%20cloud
Interested to know your thoughts as well
Sridevi Ramachandran & Michael Knoespel
Great blog thank you.
Have there been any updates to the integration to allow a two way sync of data between SAP and Facebook to allow lead gen form information to flow to SAP automatically as new contacts?
If not do you know of a way to create such a sync that does not first require the facebook data to be sent to another external data storage and then pushed into SAP via API. It seems very complex comparative to other marketing platforms integrations.
Really nice blog, thank you!
One comment that I have noticed - recently I did submission for Ads Management Standard Access & ads_management. But looks like Facebook change something in the meanwhile with these 2 permissions you also should have pages_read_engagement & pages_show_list?
Does somebody have info on why additional two new permissions are required?