LogoLogo
ENGLISH
ENGLISH
  • Hey, you're here! Welcome to Heyday's Help Centre
  • ⬇️ Download the Heyday App!
  • 👥TEAMMATES
    • 👩‍💻My Profile
      • ✏️My Preferences
      • 🔔My Notifications
    • 🔐My Password
    • 📚Understanding the Inbox
      • Primary & Other
        • New Requests
        • Open Conversations
        • Assigned to Me
        • ⭐Starred
        • 🤖Chatbot Conversations
        • 🚪Closed Conversations
      • Filters
        • Status
        • Channel
        • Assignee
        • Department
      • Greyed Out Conversations
    • 💬In Chat
      • 🚪Close Conversation
      • ⭐Priority
      • ↔️Reassign to Another Teammate
      • 🏬Assign to Another Department
      • 🗒️Internal Notes
      • ⛔Conversation Blocking
      • 📜Templates
      • 🔎Products
      • 📲Start a call/Video chat
      • 😁Emojis
      • 📎Attach Files & Images
      • 🫂Customer Insights
  • 👤ADMINISTRATORS
    • 📊Analytics
      • Overview
        • Customer Overview
        • Conversation Overview
        • Chatbot Performance
      • Conversations
      • Team Performance
      • Advanced Reports
        • Conversations Report
          • Conversation Score
        • Department Report
        • Team's Report
        • Dialog Performance Report
        • Product Analytics Report
      • Flow Definitions
        • Campaign
        • Transfer
        • Sales
        • Support
        • Other
    • ⚙️Settings
      • General
        • Chat Display
        • Business Hours
      • Chatbot & Automation
        • FAQ Builder
        • Enterprise FAQ Editor
          • How to use CSV files
      • Team
      • Channels
      • Account
        • Notifications
      • Advanced
        • Secret Sharing
    • ✨Best practices
    • Assigning a conversation
    • How to Make a Teammate become an Administrator
    • Email - Teammate Performance Export
  • 🎛️ CHAT SETUP
    • Overview
    • Heyday Chat
    • The Code Snippet
      • Integration in the HTML code
      • Integration through a Google Tag
    • Customizing your Chat
      • Configurable Attributes
        • Client ID
        • Country
        • Flow Referral
        • Automatic Department Assigning
        • Widget State
        • Greeting Message
        • Delay Close
        • Minimizable
        • Set Cookie Rules
          • Cookie Expiry
          • Cookie Consent
        • Passing Client Data Post-initialization
        • Adapted script format for Google Tag Manager
      • Widget Position
      • Widget Appearance
    • Event Tracking
    • How to Integrate Heyday Webchat into a Native App
    • How to Integrate Facebook Chat if you Already Call the SDK
  • 🔗CHANNELS & FEATURES
    • Channels
      • Heyday Chat
      • Facebook Messenger
        • Creating a Facebook Pre-Production Business Page
        • Facebook Guest Mode
        • Flashing Messenger Chat Window
        • Facebook Self Onboarding
      • Google Business Messages
        • Non-Local Entry Points
        • Connecting your Google Account
      • Instagram
        • Creating an Instagram Business Account
        • How to Grant Access to Your Instagram Account
        • Instagram Self Onboarding
      • WhatsApp
        • Security Prerequisite
        • WhatsApp Channel Setup
      • Email
        • Automatic Forwarding
        • Testing the Email Channel
        • Email Signature
      • Video Chat
        • Technical Requirements
    • Features
      • E-comms
        • Shopify
          • How to Create and Configure a Custom App
          • How to configure needed permissions
          • Locate the information Heyday needs
        • Magento
          • Integration requirements
        • PrestaShop
        • Salesforce Commerce Cloud
          • SalesForce Service Cloud
      • FAQ Automation
      • Product Search
      • Sales Attribution
        • Activating your Sales Attribution
        • Sale Attribution Report
        • Limitations
      • Store Locator
        • Store Locator - Self Onboarding
      • Continuous Conversation
      • Marketing Campaigns
      • Email Marketing & Newsletter
      • Order/Shipment tracking
        • Keep Your Customer Informed
        • How To Set Up a Notification Link
      • CSAT Survey
        • Chatbot CSAT
        • Teammate CSAT
      • Wait Time Management
      • Appointment Booking
      • Loyalty Program
      • Back in Stock Notifications
      • Price Drop Notifications
      • Product Recommendation Quiz
Powered by GitBook
On this page
  • Overview
  • Steps to Take

Was this helpful?

  1. 🎛️ CHAT SETUP

How to Integrate Facebook Chat if you Already Call the SDK

PreviousHow to Integrate Heyday Webchat into a Native AppNextChannels

Last updated 3 years ago

Was this helpful?

Overview

To initiate the setup for the Messenger Chat widget Heyday performs a call to retrieve a Facebook SDK. However, if you already are making that call for another function of your website it’s important that both call from the same SDK, otherwise one or more of the scripts won’t be allowed to initiate.

Steps to Take

If you’re looking to integrate the Messenger Chat option into your website but you’re required to Call the Facebook SDK for another function on your web page, you can follow these steps to help you set both your website and the chat widget up for success:

  • Rather than asking you to load the SDK, Heyday will load the for you, which can be used for all SDK functions, this includes the chat function.

  • Specifically, don’t call <script src="//"></script> as this will not initiate the Customer Chat function.

  • Rather than define window.fbAsyncInit; we ask you to define window.hdAsyncInit instead (see example below) before loading Heyday, we will call this function once the chat is initialized

    • You can integrate your snippet to setup Heyday chat here

  • When hdAsyncInit is called, you can continue calling FB.init as you were prior to integrating the Heyday snippet

Example:

window.hdAsyncInit = clientAsyncInit;
<script>https://api.heyday.ai/v130/xxx/yyy/zz_ZZ/setupchat.js</script>
function clientAsyncInit() {
    FB.init({
         appId: appId,
         xfbml: true,
         version: 'v7.0',
         status: true // set to true to refresh status on every load
    });
    // continue calling Facebook
}
Customer Chat SDK
connect.facebook.net/en_US/all.js