# Changelog for Messenger API Updates for Europe and Japan



## October 17, 2023
The following functionalities have been restored:

- [Custom labels](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/custom-labels)

- [Persona API](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/personas)

## June 30 2022
### Restored Feature

-  Receive API (webhooks): [messaging_referrals](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events/messaging_referrals#ads) is restored for CTM ads.

#### Feature restoration TBD:

- [Messenger Extension SDK](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/messenger-extensions-sdk)

- [PSID/ASID matching](https://developers.facebook.com/docs/messenger-platform/identity/id-matching)

- [Persona API](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/personas)

- [Account linking](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/account-linking)

- [Custom labels](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/custom-labels)

- [Video on Media template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/template/media)

## April 19 2022
### Restored Feature

-  Receive API (webhooks): [message_deliveries, message_reactions, message_reads](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events)

#### Feature restoration TBD:

- [Messenger Extension SDK](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/messenger-extensions-sdk)

- [PSID/ASID matching](https://developers.facebook.com/docs/messenger-platform/identity/id-matching)

- [Persona API](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/personas)

- [Account linking](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/account-linking)

- [Custom labels](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/custom-labels)

- [Video on Media template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/template/media)

## Sept 14 2021
### Restored Feature

- [Customer Feedback Template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/templates/customer-feedback-template)

#### Feature restoration TBD:
- Receive API (webhooks): [message_deliveries, messaging_account_linking, message_reactions, message_reads](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events)
- [Messenger Extension SDK](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/messenger-extensions-sdk)
- [PSID/ASID matching](https://developers.facebook.com/docs/messenger-platform/identity/id-matching)
- [Persona API](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/personas)
- [Account linking](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/account-linking)
- [Custom labels](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/custom-labels)
- [Video on Media template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/template/media)

## Aug 10 2021

### Restored Feature

- [Receipt Template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/template/receipt)
- [One Time Notification](https://developers.facebook.com/docs/messenger-platform/send-messages/one-time-notification)
- [Sender actions](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/sender-actions)  
- [CTM HOP](https://developers.facebook.com/documentation/ads-commerce/marketing-api/ad-creative/messaging-ads/click-to-messenger)

##### Feature restoration TBD:
- Receive API (webhooks): [message_deliveries, messaging_account_linking, message_reactions, message_reads](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events)
- [Messenger Extension SDK](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/messenger-extensions-sdk)
- [PSID/ASID matching](https://developers.facebook.com/docs/messenger-platform/identity/id-matching)
- [Persona API](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/personas)
- [Account linking](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/account-linking)
- [Custom labels](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/custom-labels)

## Jun 21 2021
- `source` attribute in webhooks is not included for accounts affected by the regulations in Europe and Japan

## Apr 20 2021

- `messaging_optins` webhook is restored for Chat Plugin, Send to Messenger Plugin, and Checkbox Plugin. One Time Notification `messaging_optins` webhook will be restored in Q2 2021.
- `messaging_referrals` webhook is restored for m.me link and Chat Plugin. CTM ads `messaging_referrals` webhook restoration is TBD.

## Apr 15 2021
- Included CTM HOP details

## Apr 13 2021

#### Messenger API features restored as of 4/13/2021:

- Send API: [Media/attachment (audio, video, files)](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/send-api)
- Receive API (webhooks): [message with media/attachment](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events/messages), [message_echoes](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events/message-echoes)
- [Product template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/template/product)
- [Persistent menu](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/persistent-menu)
- [Chat Plugin guest mode upgrade](https://developers.facebook.com/documentation/business-messaging/messenger-platform/discovery)
- [Messenger feature review API](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/messaging-feature-review-api)
- Web Plugins [prior_message](https://developers.facebook.com/documentation/business-messaging/messenger-platform/discovery#implementation) block  
- Web Plugins ([Send to Messenger](https://developers.facebook.com/documentation/business-messaging/messenger-platform/discovery), [Checkbox Plugin](https://developers.facebook.com/documentation/business-messaging/messenger-platform/discovery))  
- Send API with [user_ref](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/send-api)
- [User Profile API](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/user-profile) `profile_pic` field

##### Targeting restoration in Q2 2021 (actual dates of restoration may vary):

- Receive API (webhooks): [message_deliveries, messaging_account_linking, messaging_optins, message_reactions, message_reads, messaging_referrals](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events)
- [Receipt Template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/template/receipt)
- [One Time Notification](https://developers.facebook.com/docs/messenger-platform/send-messages/one-time-notification)
- [Sender actions](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/sender-actions)
- [Persona API](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/personas)
- [Account linking](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/account-linking)

##### Feature restoration TBD:

- [Airline Template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/templates)
- [Custom labels](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/custom-labels)
- [Messenger Extension SDK](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/messenger-extensions-sdk)
- [PSID/ASID matching](https://developers.facebook.com/docs/messenger-platform/identity/id-matching)
- [CTM HOP](https://developers.facebook.com/documentation/ads-commerce/marketing-api/ad-creative/messaging-ads/click-to-messenger)

## Mar 30 2021
- Updated [context](https://developers.facebook.com/documentation/business-messaging/messenger-platform/europe-japan-updates#context) section below to address new privacy rules in Japan
- Timeline for all feature remediations we had targeted to restore by end of Q1 is now being moved to Q2. Actual dates of restoration may vary

## Feb 3rd 2021
#### Messenger
- [Generic Template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/template/generic), [Button Template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/template/button), [Media Template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/template/media) (images only), [URL Button](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/buttons/url), [Postback Button](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/buttons/postback), [Call Button](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/buttons/call) are supported on iOS, Android, and web.
- Updated restoration timeline for [affected features](https://developers.facebook.com/documentation/business-messaging/messenger-platform/europe-japan-updates#affected).

##### Targeting restoration in Q1 2021 (actual dates of restoration may vary):
- Send API: [Media/attachment (audio, video, files)](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/send-api)
- Receive API (webhooks): [message with media/attachment](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events/messages), [message_echoes](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events/message-echoes)
- [Product template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/template/product)
- [Persistent menu](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/persistent-menu)
- [PSID/ASID matching](https://developers.facebook.com/docs/messenger-platform/identity/id-matching)
- [Chat Plugin guest mode upgrade](https://developers.facebook.com/documentation/business-messaging/messenger-platform/discovery)
- [Messenger feature review API](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/messaging-feature-review-api)
- Web Plugins [prior_message](https://developers.facebook.com/documentation/business-messaging/messenger-platform/discovery#implementation) block  
- Web Plugins ([Send to Messenger](https://developers.facebook.com/documentation/business-messaging/messenger-platform/discovery), [Checkbox Plugin](https://developers.facebook.com/documentation/business-messaging/messenger-platform/discovery))  
- Send API with [user_ref](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/send-api)
- [User Profile API](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/user-profile) `profile_pic` field

##### Targeting restoration in Q2 2021 (actual dates of restoration may vary):

- Receive API (webhooks): [message_deliveries, messaging_account_linking, messaging_optins, message_reactions, message_reads, messaging_referrals](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events)
- [Receipt Template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/template/receipt)
- [One Time Notification](https://developers.facebook.com/docs/messenger-platform/send-messages/one-time-notification)
- [Sender actions](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/sender-actions)
- [Persona API](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/personas)
- [Account linking](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/account-linking)

##### Feature restoration TBD:

- [Airline Template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/templates)
- [Custom labels](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/custom-labels)
- [Messenger Extension SDK](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/messenger-extensions-sdk)

## Older changelog

Older changelog details can be found [here](https://developers.facebook.com/docs/messenger-platform/europe-updates/changelog).

## Context {#context}  
As part of our efforts to comply with new privacy rules in Europe and Japan, we're making updates that will impact some developers and businesses that use our Messenger API. Beginning December 16th, several Messenger APIs will be unavailable for developers and businesses in Europe and/or Japan, and for people in Europe and/or Japan who connect with businesses globally. These changes will impact some APIs and UI components ([listed in the next sections](#affected)) for the following audience:

* Pages in Europe and Japan
* Pages with admins in Europe and Japan
* People in Europe and Japan who message businesses globally

**Impacted countries:** All of the 30 European Economic Area (EEA) countries, which includes:

* All 27 European Union member states
* Norway
* Iceland
* Liechtenstein
* United Kingdom
* Japan

Given the impact listed previously, we recommend providing an alternate experience using quick replies, text and inline URLs for webviews for the impacted scenarios.
The two tables that follow provide:

* [Features and APIs with no changes](#operational)
* [Affected Features and APIs with Mitigations](#affected)

We are currently working to restore these features and will continue to update this document and the [changelog section](#older-changelog) with the details as they are available. You can also refer to the [FAQ section](https://developers.facebook.com/docs/messenger-platform/europe-updates/faq) for more details on frequently asked questions.

## Features and APIs with no changes {#operational}

Following is a list of features and APIs that are not affected by these changes. Any exceptions are listed in the Notes column.
| Area | Feature | Notes |
| --- | --- | --- |
| Receive API (Webhooks) | [`message` (text & image only)](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events/messages) | None |
| Receive API (Webhooks) | [`message` (with product details)](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events/messages) | None |
| Receive API (Webhooks) | [`messaging_postbacks`](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events/messaging_postbacks) | Only postback webhooks for get started button, icebreaker and supported templates will be operational. Other postback webhooks will be  affected |
| Receive API (Webhooks) | [`message_echoes` (text, image, generic template, button template, media template only)](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events/message-echoes), `messaging_handovers`, `standby`, `messaging_policy_enforcement` | None |
| Receive API (Webhooks) | [`message` (with media/attachment)](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events/messages)) | None |
| Receive API (Webhooks) | [`message_echoes`](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events/message-echoes) | None |
| Receive API (Webhooks) | [`messaging_optins`](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events) | None |
| Receive API (Webhooks) | [`messaging_referrals`](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events) | `messaging_referrals` webhook for m.me link and Chat Plugin will be operational. CTM ads `messaging_referrals` webhook restoration is TBD. |
| Send API | [Text](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/send-api) | None |
| Send API | [Media/attachment (image, audio, video, files)](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/send-api) | None |
| Send API | [Shops product template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/template/product) | None |
| Send API | [Send API with `user_ref`](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/send-api) | None |
| Send API | [Generic Template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/template/generic), [Button Template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/template/button), [Media Template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/template/media) | Video media type is not supported on Media Template. Restoration is TBD. |
| Send API | [URL Button](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/buttons/url),[Postback Button](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/buttons/postback),[Call Button](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/buttons/call) | None |
| Send API | [Quick replies](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/quick-replies) | None |
| Send API | [Message Tags](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/send-api) | None |
| Send API | [Receipt template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/templates) | None |
| Send API | [One Time Notification (OTN)](https://developers.facebook.com/docs/messenger-platform/send-messages/one-time-notification) | None |
| Send API | [Sender actions](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/sender-actions) | None |
| Entry Points | [m.me link](https://developers.facebook.com/documentation/business-messaging/messenger-platform/discovery/m-me-links) | None |
| Entry Points | [Message us plugin](https://developers.facebook.com/docs/messenger-platform/discovery/message-us-plugin) | None |
| Entry Points | [Private replies](https://developers.facebook.com/documentation/business-messaging/messenger-platform/discovery/private-replies) | None |
| Entry Points | [Chat Plugin](https://developers.facebook.com/documentation/business-messaging/messenger-platform/discovery) | `Source` attribute in webhooks originating from the Chat Plugin is not included for accounts affected by the regulations in Europe and Japan |
| Entry Points | [Chat Plugin Guest Mode](https://developers.facebook.com/documentation/business-messaging/messenger-platform/discovery) | `Source` attribute in webhooks originating from the Chat Plugin is not included for accounts affected by the regulations in Europe and Japan |
| Messenger Profile API | [Ice breakers](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/messenger-profile-api/ice-breakers), [Get started button](https://developers.facebook.com/documentation/business-messaging/messenger-platform/discovery/welcome-screen), [Welcome Page](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/messenger-profile-api/greeting), [Domain Allowlist](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/messenger-profile-api/domain-whitelisting), [Account Linking URL](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/messenger-profile-api/account-linking-url) | None |
| Conversation API | Conversation API | `sticker` field will return null. |
| Handover Protocol | [Handover Protocol](https://developers.facebook.com/docs/messenger-platform/handover-protocol) | None |
| Handover Protocol | [Handover Protocol for ads that click through to Messenger](https://developers.facebook.com/documentation/ads-commerce/marketing-api/ad-creative/messaging-ads/click-to-messenger) | None |
| User Profile API | [User Profile API](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/user-profile) | None |
| Messenger Profile API | [Persistent menu](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/persistent-menu) | None |
| Entry Points | [Chat Plugin Guest Mode Upgrade](https://developers.facebook.com/documentation/business-messaging/messenger-platform/discovery) | None |
| Entry Points | Web Plugins ([Send to Messenger](https://developers.facebook.com/documentation/business-messaging/messenger-platform/discovery), [Checkbox plugin](https://developers.facebook.com/documentation/business-messaging/messenger-platform/discovery)) | None |
| Entry Points | [Web Plugins (Checkbox plugin, Chat plugin) `prior_message` block when user responds to first message](https://developers.facebook.com/documentation/business-messaging/messenger-platform/discovery#implementation) | None |
| Messenger Feature Review API | [Messenger Feature Review API](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/messaging-feature-review-api) | None |
| Customer Feedback Template | [Customer Feedback Template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/templates/customer-feedback-template) | None |

## Affected features and APIs with mitigations {#affected}

The following actions can help you determine scenarios that are impacted by these changes:

* **Page Impact** - To determine go to your app dashboard and navigate to the **Messenger Settings** menu. Enter page IDs in the section titled **Will your page be affected by updates due to new privacy rules in Europe and Japan**. Note that your app must have 'pages_messaging' permission for the Pages you're querying. Developer can also leverage `subject_to_new_eu_privacy_rules ` flag on [Messenger Profile API](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/messenger-profile-api) to check for page impact.
* **User Thread Impact** - To determine, invoke the [User Level Menu API](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/persistent-menu#user_level_menu). If you get a valid response, there is no impact. If you get an [error message](#error-message) with code 10, subcode 2018336, the thread is impacted.
**NOTE**: This status can change over time. Use care if you are caching this data and update it regularly.
* Any API call which results in error code 10, subcode 2018336

The table that follows provides more details and recommendations for alternatives on heavily-used APIs.

| Area: Feature | User Impact | Developer Impact | Mitigation | Targeted Restoration |
| --- | --- | --- | --- | --- |
| Send API:  <br> [Airline template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/templates) | Templates won't render in the message thread because API calls will fail. Templates in existing messages will still be visible, but users won't be able to take any action on them | Returns an [error message](#error-message) | [Replace templates with a combination of text, quick replies and web views](#fallback-send-api-template) | TBD |
| Receive API (Webhooks) | No User Impact | `source` attribute in webhooks is not included for accounts affected by the regulations in Europe and Japan | N/A | TBD |
| Receive API (Webhooks): [`message_deliveries`, `messaging_account_linking`, `message_reactions`, `message_reads`](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks/webhook-events) | No User Impact | Webhook will not be delivered | N/A | Q2 2021 |
| Persona API: <br> [Persona](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/personas) | Persona details (name & profile pic) won't show in the thread. | Returns an [error message](#error-message) | Introduce another persona. See [Persona API fallback](#fallback-persona) | Q2 2021 |
| Account linking:  <br> [Account linking](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/account-linking) | None | Returns an [error message](#error-message) | N/A | Q2 2021 |
| ID Matching: <br>[PSID/ASID matching](https://developers.facebook.com/docs/messenger-platform/identity/id-matching) | N/A | Returns an [error message](#error-message) | N/A | TBD |
| Custom Labels:  <br> [Custom labels](https://developers.facebook.com/documentation/business-messaging/messenger-platform/identity/custom-labels) | N/A | Returns an [error message](#error-message) | N/A | TBD |
| Messenger Extensions SDK: <br> [Messenger Extensions SDK](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference/messenger-extensions-sdk) | N/A | Returns an error message | N/A | TBD |

### Error Response {#error-message}

The following error is returned for API calls that are not operational due to the new privacy rules in Europe. You should leverage the unique error code and error subcode that follows to identify errors and handle the fallback gracefully.

```
{
   "error":{
      "message":"(#10) This action was not submitted due to new privacy rules in Europe and Japan.
                 See developer documentation for more info",
      "type":"OAuthException",
      "code":10,
      "error_subcode":2018336,
      "fbtrace_id":"AUmkjfWVra1NAa-qEH5NcI8"
   }
}
```

### Other Fallback Experiences For Developers {#other}

#### Send API - Templates (Receipt, Airline) fallback {#fallback-send-api-template}

Instead of sending the information as a template, you can use a combination of plain text and quick replies instead. This enables users to have enough context/information to continue the conversation.

- Images can be sent as a plain text url. Users will then have to click on it and it wil open up Messenger In-app browser.
- Buttons can be replaced with quick replies because you will still receive the message payload when users click on it.
- Title and description can be sent as a separate messages.
- More complex templates such as the airline and receipt templates can be simplified by ignoring some fields or you can recreate a similar template hosted at a external URL and serve the template by providing the URL link.

##### Before

```
{
   "recipient":{
      "id":"{{PSID}}"
   },
   "message":{
      "attachment":{
         "type":"template",
         "payload":{
            "template_type":"{{SOME_UNSUPPORTED_TEMPLATE}}",
            "elements":[
               {
                  "title":"Welcome!",
                  "image_url":"https://petersfancybrownhats.com/company_image.png",
                  "subtitle":"We have the right hat for everyone.",
                  "buttons":[
                     {
                        "type":"web_url",
                        "url":"https://petersfancybrownhats.com",
                        "title":"View Website"
                     },
                     {
                        "type":"postback",
                        "title":"Start Chatting",
                        "payload":"DEVELOPER_DEFINED_PAYLOAD"
                     }
                  ]
               }
            ]
         }
      }
   }
}
```

##### After

```
{
   "recipient":{
      "id":"{{PSID}}"
   },
   "messaging_type":"response",
   "message":{
      "text":"Welcome! We have the right hat for everyone.",
      "quick_replies":[
         {
            "content_type":"text",
            "title":"View Website",
            "payload":"{{DEVELOPER_DEFINED_PAYLOAD}}"
         },
         {
            "content_type":"text",
            "title":"Green",
            "payload":"{{DEVELOPER_DEFINED_PAYLOAD}}"
         }
      ]
   }
}
```

#### Persona API fallback {#fallback-persona}
You can use a message to introduce a different persona in the conversation flow. This will let users know that a different agent is handling the conversation despite the profile picture being unchanged.

##### Before

```
{
  "recipient":{
    "id":"{{PSID}}"
  },
  "message":{
    "text":"How can I help you?"
  },
  "persona_id":"{{PERSONA_ID}}"
}
```

##### After

```
{
   "recipient":{
      "id":"{{PSID}}"
   },
   "messaging_type":"response",
   "message":{
      "text":"Hi, this is Joe from OCC, How can I help you?"
   }
}
```

## CTM HOP in Ads Manager
[CTM Ad](https://developers.facebook.com/documentation/ads-commerce/marketing-api/ad-creative/messaging-ads/click-to-messenger) campaigns that run for impacted pages or for audiences impacted regions will not be able to use CTM HOP. Campaigns that have the CTM HOP App Id JSON setting will run as if CTM HOP is not active (i.e. will be handled by the primary app for the page).

| Area: Feature | User Impact | Developer Impact | Mitigation | Targeted Restoration |
| --- | --- | --- | --- | --- |
| CTM HOP in Ads Manager: [CTM HOP](https://developers.facebook.com/documentation/ads-commerce/marketing-api/ad-creative/messaging-ads/click-to-messenger) | A user responding to a CTM Ad will have their thread routed always to the primary receiver on the page. | A user responding to a CTM Ad will have their thread routed always to the primary receiver on the page. | To re-create a similar behavior to [CTM HOP](https://developers.facebook.com/documentation/ads-commerce/marketing-api/ad-creative/messaging-ads/click-to-messenger), use the following fallback blueprint:<br><br>#### Welcome Message setup in Ads Manager<br>* Include a [Quick Reply](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/quick-replies) or [Generic Template](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/template/generic) where the button has a pre-defined payload<br>#### Primary Receiver app<br>* Perform a check for the given payload, and:<br>* Use [Handover Protocol](https://developers.facebook.com/documentation/business-messaging/messenger-platform/reference) to send the user to the app responsible for CTM Ad flow | TBD |

### Mitigation of Edge Cases

#### Cannot add such a condition to the primary app or don't have access to changing the primary app
##### Example
* If a brand using Provider A for regular messages, and Provider B as the secondary receiver for CTM messages, where Provider A is unable to set the hand-off to Provider B. This would require the Brand to do the routing with their own solution (essentially acting as provider C).  
##### Solution
* Create a custom app to be a "router app" and assign it as the new primary app for the page
* The router app will route all threads that receive the payload to the CTM ad flow app
* The router app will route al other threads to the default app fo the page (the previous Primary App)
#### User enters free text instead of clicking on the quick reply or generic template button
##### Solution #1
* Determine or estimate percentage of users entering free text. If the volume is within your operational limits, consider transferring them to a live agent.
##### Solution #2
* Leverage NLU (Natural Language Understanding) to extract an intent from the free text and determine if the user needs to be handover to the CTM Ad Flow
* The NLU processing can happen either in your Primary App (if the app/vendor/platform supports this) or programmed in the "router app" discussed earlier.
##### Solution #3
* Disable by default free text for the page by disabling the composer at the page level as described [here](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/persistent-menu)
* In the CTM Ad welcome message, add either a Quick Reply or Generic Template button to "Talk to an agent"
* In the page's default welcome message, add a similar option to add either a Quick Reply or Generic Template button to "Talk to an agent"
* Enable free text entry only for users who click the relevant Quick Reply or Generic Template button by enabling the user level persistent menu as described [here](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages/persistent-menu#user_level_menu)