Onboarding to Shops is a necessary step to enable sellers to integrate into Meta Commerce. Seamless onboarding ensures that the seller’s products are up-to-date, order information is properly synchronized, easy to reconcile on a quarterly or annual basis, and banking and payout information are set up properly for timely payouts and reporting.
As a third-party platform/solutions provider:
You are required to integrate with the Facebook Business Extension (FBE) to meet our Shops integration quality bar by enabling sellers to:
The Facebook Business Extension (FBE) is a popup-based, Meta-owned interface that lives on third-party sites as a plugin and simplifies the overall integration process with Meta. FBE allows businesses to easily set up the Meta Pixel, Catalog, and Shops. It helps businesses connect their products and services with Facebook and Instagram channels on your platform. Once connected, you can help them utilize a large suite of powerful features.
In short, the separation of responsibilities in an FBE-based integration is as outlined below:
Once set up, any of your businesses can start an FBE onboarding flow either with existing assets or by having the option to create new ones, or a combination of both.
Create entry points to FBE where the user selects, manages, or creates their assets (e.g. business, catalog, shops, pixel, etc.). These entry points can take one of these forms:
https://facebook.com/dialog/oauth? client_id=<FB_APP_ID> &display=page &redirect_uri="https://partner-site.com/redirectlanding" &response_type=token &scope=manage_business_extension // additionally use catalog_management or ads_management // &scope=manage_business_extension,catalog_management,ads_management &extras={ "setup": { "external_business_id": "foo-123", "timezone": "America/Los_Angeles", "currency": "USD", "domain": "https://example-shop.partner-site.com/", "channel": "ECOMMERCE", "business_vertical": "ECOMMERCE" }, "business_config": { "business": { "name": "Foo Business" }, "catalog_feed_scheduled": { "enabled": true, "feed_url": "https://partner-site.com/feed-url" }, "page_cta": { "enabled": true, "cta_button_text": "Shop Now", "cta_button_url": "https://partner-site.com/foo-business", "below_button_text": "Powered by FBE Partner" }, "ig_cta": { "enabled": true, "cta_button_text": "Shop Now", "cta_button_url": "https://partner-site.com/foo-business" }, "messenger_menu": { "enabled": true, "cta_button_text": "Shop Now", "cta_button_url": "https://partner-site.com/foo-business" } }, "repeat": false }
Depending on your setup of choice, you can get business’ access token for later steps in multiple ways:
Webhooks are required for all partners which want to be listed in the App Store. If you don’t plan to have your app in the app store, then you can choose to ignore this section or revisit it later. Meta fires webhook events each time one of your businesses installs, modifies, or uninstalls FBE. Each time a webhook event is received, it’s expected that your app will consume this event and understand what assets the business has modified, added, or removed from their connection with your app. Your app’s behavior should update based on the most current connected assets. We highly recommend that you implement and test your subscription to our webhook.
To set up a webhook:
After setup, the fbe_install
webhook is automatically subscribed.
For more detailed steps, see Webhook.
Upon receiving a webhook notification of an install, you need to:
Upon receiving an update on an existing installation, you need to:
Upon receiving an uninstall notification, you need to:
You can get information about businesses connected to your platform through FBE via one (or both) of the two following methods:
fbe_installs
endpoint. Using a business’ access token and external business ID, you can call the FBE Installs API endpoint for detailed information about their setup.You must set up at least one of these methods. It’s needed to get a business’ asset IDs to properly configure the relevant features for the business.
curl -i -X GET \ "https://graph.facebook.com/<version>/fbe_business/fbe_installs?fbe_external_business_id=<external business id>&access_token=<access token sanitized>"
After a user installs FBE, the extension generates an employee system user on the client's Business Manager. Note that this system user is no longer visible in Business Manager, but exists on the backend. Naming for this new system user follows the schema {App Name} System User (FBE)
.
That system user token and API access is not associated with a single person. This is extremely useful in case employees leave companies or deactivate their profiles. If you receive a user access token through a webhook or the Business Login after a FBE install, you can use that same token to get the Business Manager's system user access token.
To do that, make the following API call:
curl -X POST \ -F 'app_id={app_id}' \ -F 'scope=ads_management,catalog_management,manage_business_extension' \ -F 'access_token={user_access_token}' \ -F 'fbe_external_business_id={fbe_external_business_id}' \ https://graph.facebook.com/<API_VERSION>/<client_business_manager_id>/access_token
For the scope
field, use the manage_business_extension
permission. Depending on your use case (see Step 5), the ads_management
, catalog_management
, pages_read_engagement
, business_management
, instagram_basic
, and manage_business_extension
permissions will likely also be needed.
ads_management
permission. With this permission, you have the ability to create ads campaigns, fetch ad metrics, build ad management tools, and more. catalog_management
permission. We recommend this permission for all apps. This enables your app to build commerce-related, dynamic ads, and inventory management solutions.To allow businesses to further configure features (beyond what was specified in installation), you can direct businesses to our FBE Feature Management View from your platform. You can use the JavaScript SDK or URL to add an entry point to launch the FBE Management View. Both methods need to display a button to click, which launches the FBE Management View window.
Your platform should add an entrypoint (e.g. button) for businesses to uninstall FBE. We recommend doing this by making a DELETE
request to the proper endpoint.
Example: Call to our Deletion Endpoint
curl -X DELETE \ "https://graph.facebook.com/v<API_VERSION>/fbe_business/fbe_installs?fbe_external_business_id=<FBE_EXTERNAL_BUSINESS_ID>&access_token=<ACCESS_TOKEN>"
If you have implemented an fbe_install
webhook, you will receive events when the user uninstalls FBE.