Facebook Channel

The Facebook channel can handle multiple accounts and will create tickets on new posts on your Facebook page and messages to the page.

Contents

Activate or Deactivate Channel

The Facebook channel is disabled by default and needs to be activated before use. To do this, go to Settings -> Tickets -> Channels and click the "Activate" link on the Facebook channel row. The channel can be deactivated in the same way, instead this time by clicking the "Deactivate" link on the same row.

Creating an Account

Prerequisites

Before proceeding any further with this guide, please ensure you meet the following prerequisites:

As noted above, the Facebook App Review process requires an operator login so that they can test the step-by-step instructions and verify the contents of the video (see https://developers.facebook.com/docs/apps/review/faqs#faq_166560497060278). In order to prevent Facebook from accessing more required, we recommend the following configuration:

  1. Create a new Operator Role with the following permissions:
    Core
    Manage Scheduled Tasks
    Ticket
    View Tickets, Open Tickets, Update Tickets, Move Tickets to Trash
  2. Create a new Operator Group and assign it to all brands, and the role created above.
  3. Create a new Operator with the below details and assign it to the above group, do not set any departments.
    • Email: facebook-user@demo.com
    • Password: facebook123
  4. Create a new Department, assign it to all brands, turn off the Public setting, and assign the operator group created above.

Facebook Setup

The integration requires a Facebook page and Facebook developer application to function. Below guides you through the process to set this up.

  1. Login to Facebook.
  2. Browse to your Facebook page, click the "About" link in the sidebar, and scroll down to the "Page ID" row.
    Facebook Page ID
  3. Visit the applications page on the Facebook developers website and click the "Add a New App" button.
  4. Type in a name for the application, the name is not important, and click the "Create App ID" button.
  5. The screen will load with your new app. Click the "Settings" > "Basic" option in the sidebar, scroll to the bottom of the page and click the large "+ Add Platform" button. Click the "Website" option.
    Facebook App Platform
  6. Enter the main domain for the help desk under "Site URL", and enter the same URL in the "App Domains" field above.
    Enter App Details
  7. Click "Save Changes".
  8. Under "Products" in the sidebar click the "+" button. Look for "Facebook Login" and click on the "Set Up" button.
  9. Click "Settings" in the sidebar under the "Facebook Login".
  10. Under the "Valid OAuth Redirect URIs" section, enter the SupportPal callback URL. The URL can be found in your SupportPal interface by browsing to Settings > Tickets > Channels > Facebook > Settings > Add Account.
    SupportPal OAuth Redirect URI
    Facebook OAuth Redirect URI Setting
  11. Click "Save Changes".

SupportPal Setup

Now we've created a Facebook page and Facebook developer application, we need to link them to the helpdesk.
  1. Visit Settings -> Tickets -> Channels in SupportPal and click on the "Settings" link on the Facebook channel row. If you're creating a new account click "Add Account", or if you're updating an existing account, search for it and click the edit (pencil) icon on the right side of the table row.
  2. Complete the input fields:
    1. Page Name - Enter the page name.
    2. Active - If the account is active and should be included when polling for new posts and messages.
    3. Page ID - The page ID found on the "About" tab on the Facebook page.
    4. Application ID - The app ID found on the application page.
    5. Application Secret - The app secret found on the application page.
    6. Import From - Lets the ticket importing start from a specified date, for example set to today's date to avoid any old posts and messages being imported. This option is only available for new accounts.
    7. Import Posts - If it should convert wall posts or comments made to your Facebook page into tickets.
    8. Import Messages - If it should convert messages sent to your Facebook page into tickets.
    9. Default Department - Select the department in which messages sent to this account should be opened as tickets in.
    10. Default Priority - Select the priority with which tickets opened by this account are set as.
  3. Once all the details have been entered, click the "Get Access Token" button and you will be redirected to Facebook. Follow through all the popups that are shown, which will just be making sure that you are allowing the application to post on the page's behalf. You will not have to change any of the permissions, simply press "OK" on each popup window as seen in the screenshots below. Facebook Access Token Step 1 Facebook Access Token Step 2 Facebook Access Token Step 3
    Finally you will return back to the help desk with an access token.
  4. Click the "Submit" button to finish.

Facebook App Review

The app review must be done in two parts, the first to get permissions for posts sent to the page and the second for messages sent to the page. Both parts are needed to successfully use the channel.

Part 1: Posts

  1. Click "App Review" in the sidebar and then "Permissions and Features".
  2. Search for and request the following permissions: publish_pages and manage_pages and then click "Continue the Request".
Complete App Verification - Provide verification details
  1. Is a Facebook reviewer able to access or login to your app to verify you're using permissions or features according to Facebook Platform Policy?
    Yes
  2. Platform Settings
    Leave "Website" ticked and the "Site URL" as it is.
    Under "Provide detailed step-by-step instructions on how a reviewer can test your integration and how you are using the requested permissions or features. Include any testing credentials required to access your integration." enter:
    
                URL: https://demo.supportpal.com/en/admin/login
                Email: facebook-user@demo.com
                Password: facebook123
            
  3. Click "Save".
Requested Permissions and Features - Tell us how you'll use manage_pages
  1. Please provide a detailed description of how your app uses the permission or feature requested, how it adds value for a person using your app, and why it's necessary for app functionality.
    
                Definitions:
                1. OPERATOR - company staff, must be authenticated via SupportPal login.
    
                The SupportPal application uses a periodic cron task to fetch page visitor posts. After someone creates a visitor post to the Facebook page, the message will appear in the SupportPal OPERATOR interface as a new ticket.
    
                1. Post to the Facebook page as a Facebook user.
                2. Login to OPERATOR interface:
                    a. URL: https://demo.supportpal.com/en/admin/login
                    b. Email: facebook-user@demo.com
                    c. Password: facebook123
                3. Browse to Settings > Scheduled Tasks and click the arrows on the Check Facebook accounts task to force it to run.
                4. Browse to Manage Tickets and see the user's message has been converted to a ticket (visible in the table).
                5. Click on the ticket subject, and the authenticated OPERATOR can reply to the ticket which will be added as a comment on behalf of the Facebook page to the visitor post.
    
                The imported Facebook post is ONLY visible to authenticated OPERATORs via the OPERATOR interface.
            
  2. Provide a detailed step-by-step video walkthrough of how your app will use this permission or feature so we can confirm it is used correctly and does not violate our policies.
    
                https://drive.google.com/file/d/1pZdn5vSN5KM8lbXVCtjwEGQ_0x6WYSkP/view?usp=sharing
            
  3. Click "Save".
Requested Permissions and Features - Tell us how you'll use publish_pages
  1. Create a post on your Facebook page from your personal account. You will need to click the '...' button just below the page cover photo and click 'View as Page Visitor' before you can post as your personal account.
  2. Login to the new facebook-user@demo.com account at the SupportPal operator panel.
  3. Browse to Settings -> Scheduled Tasks and click the arrows on the 'Check Facebook accounts' task to force it to run.
  4. Browse to Tickets -> Manage Tickets and check that one item is displayed in the table. The one item should be the Facebook post that you just created in step 1.
    If there's more than one item, you may need to change the wording of step 2 in the textarea below (on this page).
    If you cannot see any tickets, you may need to check your department settings.
  5. Please provide a detailed description of how your app uses the permission or feature requested, how it adds value for a person using your app, and why it's necessary for app functionality.
    
                Definitions:
                1. OPERATOR - company staff, must be authenticated via SupportPal login.
    
                The SupportPal application uses a periodic cron task to fetch page visitor posts. After someone creates a visitor post to the Facebook page, the message will appear in the SupportPal OPERATOR interface as a new ticket.
    
                1. Login to OPERATOR interface:
                    a. URL: https://demo.supportpal.com/en/admin/login
                    b. Email: facebook-user@demo.com
                    c. Password: facebook123
                2. In the navigation bar at the top, browse to Tickets > Manage Tickets. The table will display one item.
                3. Click on said item to view the ticket.
                4. In the text editor under "Add Reply", enter a message and click "Post Reply"
                5. Visit the facebook page and see a comment has been posted to https://www.facebook.com/pg/ACME-Limited-1234567890987654321/posts/2964940240187878
    
                It is only possible for authenticated OPERATORs to reply to existing posts made by other Facebook users.
                It is not possible to publish individual posts to Facebook.
            
  6. Provide a detailed step-by-step video walkthrough of how your app will use this permission or feature so we can confirm it is used correctly and does not violate our policies.
    
                https://drive.google.com/file/d/1pZdn5vSN5KM8lbXVCtjwEGQ_0x6WYSkP/view?usp=sharing
            
Complete App Settings - Review your app settings
  1. Scroll down to "Complete App Settings" and click "Review your app settings". Fill out the remaining fields and click "Save".
  2. Finally, click the "Submit for Review" button.

Part 2: Messages

  1. Under "Products" in the sidebar click "Add Product". Hover over the Messenger option and click the "Set Up" button that appears.
  2. Scroll down to "Access Tokens", click on the "Add or Remove Pages" link. Follow the process and select the correct Facebook page.
  3. Scroll down to "App Review for Messenger" and click the "Add to Submission" button for "pages_messaging"
  4. Under "Current Submission", click "Add details" and a popup will appear. Fill out the fields using the information provided below:
    1. Check I agree to Facebook's permission and feature usage guidelines.
    2. Tell us about the use case(s) for your app will use the permission for
      
                          Involved business integration to support live chat by humans.
                      
    3. Test and reproduce the functionality of your integration:
      Select the Facebook page and fill in the textarea with the following:
      
                          Definitions:
                          1. OPERATOR - company staff, must be authenticated via SupportPal login.
      
                          The SupportPal application uses a periodic cron task to fetch page messages. After someone sends a message to the Facebook page, the message will appear in the SupportPal OPERATOR interface as a new ticket.
      
                          1. Send a message to the Facebook page.
                          2. Login to OPERATOR interface:
                              a. URL: https://demo.supportpal.com/en/admin/login
                              b. Email: facebook-user@demo.com
                              c. Password: facebook123
                          3. Browse to Settings > Scheduled Tasks and click the arrows on the Check Facebook accounts task to force it to run.
                          4. Browse to Manage Tickets and see the user's message has been converted to a ticket (visible in the table).
                          5. Click on the ticket subject, and the authenticated OPERATOR can reply to the ticket which will be posted to the Facebook private messages conversation.
      
                          The imported Facebook post is ONLY visible to authenticated OPERATORs via the OPERATOR interface.
                      
    4. Show us how you're using this permission or feature
      
                          https://drive.google.com/file/d/1jLQVbCMII6sve85lW01Sk6SwkOL40Vkg/view?usp=sharing
                      
  5. Click "Submit For Review".

Business Verification

After you submit your app your review, Facebook also require business verification.

App Review Successful

Once your app has been accepted by the app review process, it is critically important that you switch the app from "development mode" to "public". This ensures that content published by the app is visible to other Facebook users.

  1. Click "App Review" and toggle the option to make the application public, follow the steps shown.
    Facebook App Review
  2. Ensure the application shows as status "Live"
    Facebook App is Live

Delete an Account

To delete an account, follow the below steps:

  1. Visit Settings -> Tickets -> Channels and click on the "Settings" link on the Facebook channel row.
  2. Search for the account you wish to delete.
  3. Click the delete (cross) icon located on the right of the table.
  4. Click on the left button, "Yes, I'm sure", that pops up confirming you would like to delete this account and it will then be deleted.

Modifying the Polling Time

The active accounts are polled automatically by a scheduled task (See Scheduled Tasks). Edit the scheduled task to change the polling frequency and you can manually run the task to verify it's working.