Magento 2 Facebook Store Integration

 

Magento 2 Facebook Store Integration extension synchronizes Magento 2 store products with the Facebook shop and facilitates to sell on Facebook.

 

Table of Content

  1. Extension Installation Guide
  2. Configuration
  3. Set Google Product Category
  4. Bulk Update Facebook Product Status
  5. Bulk Update Facebook Store Attributes
  6. Facebook Attribute Mapping
  7. Product Feed CSV File Generation & Log
  8. Add Shop Tab in Facebook Page
  9. Add a Sample Product in Facebook Manually
  10. Set Up the Catalog Feed in Facebook
  11. Facebook Product Feed Update and Replace Schedule
  12. Facebook Shop Live
  13. Turn on Instagram Shopping

 

  1. Extension Installation
    • For Magento Marketplace Customers
      • Create a folder structure in Magento root as app/code/Meetanshi/FaceBookShop
      • Download and extract the zip folder and upload our extension files to the app/code/Meetanshi/FaceBookShop via FTP.
      • Login to your SSH and run below commands step by step:
    • php bin/magento setup:upgrade
    • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
    • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
    • php bin/magento cache:flush

 

    • For Meetanshi Customers
  • Extract the zip folder and upload our extension to the root of your Magento 2 directory via FTP.
  • Login to your SSH and run below commands step by step:
    • php bin/magento setup:upgrade
    • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
    • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
    • php bin/magento cache:flush

 

  1. Configuration
    To configure the extension, login to Magento 2 backend, move to Stores à Configuration à Meetanshi à Facebook Store Integration where you can find various settings to configure the extension.
  • Generate CSV Manually: Click to generate CSV having the product feed data.
  • Add All Product(s) to CSV Generation: Adds all products to CSV generation and ignores the attribute selection of product.
  • Store Specific Generate CSV: Select “Yes” to generate CSV for specific store(s).
      • Store View: Choose store(s) for which you want to generate CSV file.
  • Schedule Periodic CSV Generation: Set “Yes” to schedule product feed CSV generation on a regular basis. This setting sets up the cron that keeps regenerating the product feed file (CSV) that Facebook fetches to update your Facebook shop.
  • Frequency: Sets frequency for CSV generation.
      • Monthly: generates CSV on monthly basis.
      • Weekly: generates CSV on weekly basis.
      • Daily: generates CSV on daily basis.
  • Start Time: Starting time of CSV generation that considers server time as a base time. Do not forget to schedule cron to periodically generate CSV.
  • Remove Out of Stock Product from CSV: Set “Yes” to remove out of stock products while creating product feed CSV and restrict those products display in the Facebook store.
  • Apply Catalog Rules on Product Price: Select “Yes” if you want the catalog rules to be reflected in the product prices shown in the Facebook shop.
  • Remove Pub/ from media url: Set “Yes” to remove “Pub” folder from media URL. It’s used for the URL starting with media folder only, like https://www.abc.com/media/catalog/product/a/b/ab.jpg
  • Add Product URL: It redirects from Facebook store to product page if set to “Yes” else it redirects to checkout cart URL.
  • Product Price with Tax/VAT: Select “Yes” to display product price with Tax/VAT in Facebook store.
  • Add Product Special Price: Select “Yes” to display product price with special prices in Facebook store.

 

  1. Set Google Product Category
    The extension requires to set Google Product Category (ID or Name) for your Magento categories based on Google Product Taxonomy.
    • For Magento Categories
      Go to Catalog > Categories, select the categories you want to show in Facebook store, find the tab “Facebook Shop Integration”, and set the ID or name of the Google product category listed here that best fits with your Magento category. This helps when you want to run dynamic ads.

 

    • For Magento Products
      Go to Catalog > Products, select the products you want to show in Facebook store, find the tab “Facebook Shop Integration”.
      • Facebook Shop Product: Enable the product to show in the Facebook store.
      • Product Condition: Select one of the product conditions to show in the Facebook store. The extension fills “New” by default.
      • Google Product Category: Set the ID or name of the Google product category listed here that best fits with your Magento product.

 

Note: The Google Product category will be prioritized in Product >> Category. If you have set Google Product category for the product, it will be shown, else the ID of the category in which the product resides will be shown.

 

  1. Bulk Update Facebook Product Status
    The extension facilitates to update the Facebook product status using the mass action. If you want to only show some of the products in Facebook store, set their product status to YES. Go to Catalog > Products, select the products to update their Facebook product status and select the “Facebook Product Status” mass action from the Actions dropdown and set the required status in bulk.

 

  1. Bulk Update Facebook Store Attributes
    You can bulk update Facebook store attributes. Go to Catalog > Products, select the products for which you want to update attributes, select “Update Attributes” mass action, set values for the options “Facebook Shop Product”, “Product Condition” and “Google Product Category”, and save to assign the values in bulk to selected products.

 

  1.  Facebook Attribute Mapping
    After the extension installation, the extension automatically creates default mapping between the product attributes and Facebook fields with the same name. You don’t need to create mappings for those fields. For example, product name, ID, availability, price, condition, etc.


 

  • Add New Mapping
    Some of the Facebook fields are required (Check the list of required and optional fields here: https://developers.facebook.com/docs/marketing-api/catalog-feed-setup#supported-fields). Therefore, if the extension can’t fill some of the required fields itself, it can’t do mapping for those fields with the Facebook and thus, it displays an error message in the feed generation panel. To solve this issue, you need to create an attribute for the required field and map it with the Facebook field. To add new attribute mapping, simply go to Facebook Store Integration > Facebook Attribute Mapping and Click Add New Mapping. Select the Facebook attribute code and a relevant Magento attribute to create the mapping.

Note: By default, the extension cannot create a mapping for the “Brand” field, make sure to create new Magento attribute for the “Brand” Facebook field and create the mapping for it, otherwise it will display error while generation feed. We can only proceed to the next step when all the required fields are mapped.

 

  1. Product Feed CSV File Generation & Log
    To synchronize Magento 2 store products with the Facebook store for the first time, you will not wait for the cron to generate the CSV on the scheduled time and thus, you need to generate a CSV using the manual method. All the manual and scheduled CSV file generation log is saved in a separate grid under Facebook Store Integration > Product Feed CSV Log. You can see the log added every time the product CSV gets generated, with the details like started and finished date and time, how the CSV generation took place (manually or using schedule), status and other details.

    The most importantly, download the CSV file from “Action” column of a grid to use it later in Facebook catalogue manager.

 

  1. Add Shop Tab in Facebook Page
    The products you integrate using the Facebook store will be shown under the “Shop” tab of your Facebook page. To add the “Shop” tab in your Facebook page, log in to your Facebook account using the credentials. Make sure you are admin of the page.  Go to your page and click “Settings”.

 

 

  • Click on the “Templates and Tabs” under “Page settings” and enable the “Shop” tab.

 

  • Now go to your Facebook page and click on “Shop” option from “More” tab to add the Shop tab in the menu.

 

  • The popup will be opened, tick the checkbox to agree to the Seller’s Terms and Policies and click Continue.

 

  • After agreeing, you can see another popup to select the checkout method for the Facebook store products. Select “Check Out on Another Website” in our case and click “Continue”.

 

  • Next, another popup shows up, asking to choose the shop currency. Select the currency in which you want to show the Facebook store products, and click “Save”.

 

  1. Add a Sample Product in Facebook Manually
    Add a manual product from “Add Product” button of the Shop tab for the “Manage your Catalogue” button to appear.

 

  • Enter Details required for sample product and click on “Add Product” button.

 

10. Set Up the Catalog Feed in Facebook

  • After adding the sample product, the “Manage your Catalogue” button now appears. Click on it to import bulk products using the CSV you downloaded from the Product Feed CSV log.

 

 

  • The “Catalogue Manager” section will display by clicking “Manage your Catalogue” button. Select “Data sources” from the Catalogue tab and click on “Add products” button to insert bulk products.

 

  • Add items to your catalogue” section will appear. Select “Use bulk upload” option in our case to upload bulk products and click on the “Next” button.

 

  • Select “File upload” from “Choose upload option” and click “Next” button.

 

  • Click on “Upload File” button and upload the CSV file that you’ve downloaded earlier from extension’s “Product Feed CSV Log” grid.

 

  • After successfully uploading the CSV file, Click on the “Next” button.

 

  • Under “Complete Settings”, name your data source to find it later and choose the “Default currency” for your product prices and click on “Upload” button after configuring every steps.

 

    • After uploading product CSV successfully, you can see tab with three options: Overview, Items and Settings.
    • You can see overview of the products under “Overview” tab.

 

  • You can see products added through CSV under “Items” tab of “Data sources” option.

 

11.Facebook Product Feed Update and Replace Schedule

To keep the product feed updated in the Facebook store, you need to setup update and replace schedule to keep on updating the product CSV generated in Magento 2 store with the Facebook store on a regular basis. Facebook, by default, provides setting up 2 different schedules to keep the Facebook store updated with the products.

  •  
  • Replace Schedule
    Every time the replace schedule is run; it processes all the products again from the product feed CSV URL added while scheduling. This might cause the disappearing of images and products from the Facebook store for a short while. Thus, it’s recommended to run the replace schedule once a week (if you don’t make frequent changes to store products) or once a day (if you make frequent changes to store products).

 

  •  
  • Update Schedule
    Every time the update schedule is run; it makes faster changes to selected products in your feed. This is the recommended way of sending price and availability updates. Thus, it’s recommended to run the update schedule on an hourly basis to keep the minor changes like product availability and pricing updated.

 

  • In the “Data sources” option of “Catalogue Manager”, you can see all the data feeds which have been uploaded, scheduled, replaced or updated.

 

 

  • When your data sources are updated on timely basis based on the schedule, an undesirable error may occur that can be analyzed using the “View report” button.

 

  • At the time of CSV updation, a newly updated data source gets generated whereas, an old data source is also there having the same products, and therefore, it denies modifying and generates an error. Just remove the old data source and continue the process.

 

    1. Facebook Shop Live
  • Now go to Facebook page, you can see products under the “Shop” tab.

 

  • Users can click on the product from the Facebook shop to see the product details. Click “Check out on Website” to add a product to the cart and check out directly on the website or move to the product page as per the configuration set under “Add Product URL” setting.

 

  • Once the user clicks “Check Out on Website” from the Facebook store product, he will be redirected to the website. He can continue and finish the order process hereafter.

 

  1. Turn on Instagram Shopping
    As you have the Facebook store live, you are automatically eligible for the Instagram Shopping feature. It allows you to tag your products with your Instagram posts, so when someone browses your Instagram posts can click the tagged products to get redirected to the website for purchase.

     
    • Open the Instagram app and go to settings




 

    • Click on Business. This option will only show up here if your account is a business account.




 

    • Click on shopping. This option will only be available if your account is approved for the Instagram Shopping. 




 

  • Select a product catalogue which in your case, would be the one you created in Facebook.

 

    • After selecting the Facebook catalogue, go to your account, add an image and click “Tag Products”.



 

    • Now select products from the catalogue or by searching, to tag with the image.

 

    • Once you have tagged a product with the image, it will show like this.

 

    • Once you have posted the Instagram image, customers can tap “View Products” to have a look at tagged products.

 

    • Customers can click to view the product details.

 

    • Customers can see product details and click on “Visit on Website” to purchase.