You can use the API and the Meta Business Suite's Business settings panel to migrate a business customer's WABA from one Multi-Partner Solution (the "source solution") to another (the "destination solution").
As part of this process, a new WhatsApp Business Account (WABA) will be created for the business customer, templates within the source WABA will be duplicated in the destination WABA, and access to the WABA and its assets will be granted to the destination solution's Solution Partner.
Note that both you and the destination solution's Solution Partner must perform one or more API requests to complete the process.
Your app (or apps, if you are using separate apps) used to create or accept each solution must be associated with the same business portfolio, and the destination solution must be in an active state.
Templates are automatically duplicated in the destination WABA and initially granted the same status as their source counterparts.
After duplication however, templates are re-checked to ensure they are correctly categorized according to our guidelines. This may result in some duplicated templates having their status
set to REJECTED
.
Only templates with both a status
of APPROVED
and quality_score
of GREEN
are eligible for duplication. If the destination WABA cannot accommodate all of the new templates, we will duplicate as many as we can until the destination WABA's template limit has been reached. Unduplicated templates must be re-created and submitted for approval if they are to be used by the destination WABA.
Note that template quality ratings are not duplicated. All duplicated templates will start with an UNKNOWN
rating. This rating will remain for the first 24 hours, after which a new rating will be generated if sufficient data is available.
Use the POST /<WHATSAPP_BUSINESS_ACCOUNT>/set_solution_migration_intent endpoint to tag the business customer's WABA for migration. This generates a migration intent, which indicates your intent to migrate the WABA to a destination solution.
curl 'https://graph.facebook.com/<API_VERSION>/<WABA_ID>/set_solution_migration_intent' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <BUSINESS_TOKEN>' \ -d ' { "solution_id": "<DESTINATION_MULTI-PARTNER_SOLUTION_ID>" }'
Upon success:
{ "id": "<MIGRATION_INTENT_ID>" }
Capture the migration intent ID.
Send the migration intent ID you just captured to the Solution Partner of your destination solution. They will need this ID to determine if the customer has accepted the migration request.
If you have access to the business customer's WABA in WhatsApp Manager, disable two-step verification on the business phone number associated with their WABA.
Alternatively, instruct the business customer to do this on their own. You can provide them with these instructions:
Instruct the customer to use the Meta Business Suite to review and accept the request. You can provide them with these instructions:
When the customer completes this step, an account_update webhook indicating that a customer has been onboarded will be triggered and sent to both you and the destination solution's Solution Partner.
Use the GET /<SOLUTION_ID>/access_token endpoint and request the business_id
parameter to get an onboarded business customer's business token.
curl 'https://graph.facebook.com/<API_VERSION>/<SOLUTION_ID>/access_token?business_id=<CUSTOMER_BUSINESS_PORTFOLIO_ID>' \ -H 'Authorization: Bearer <SYSTEM_TOKEN>'
The customer's business portfolio ID is included in the account_update webhook triggered when the customer accepts the migration intent.
Upon success:
{ "data": [ { "access_token": "<CUSTOMER_BUSINESS_TOKEN>" } ] }
Use the GET /<SOLUTION_MIGRATION_INTENT_ID> endpoint to get the status of the migration intent that the Tech Provider created. Your Tech Provider should provide you with this ID.
curl 'https://graph.facebook.com/<API_VERSION>/<MIGRATION_INTENT_ID>' \ -H 'Authorization: Bearer <BUSINESS_TOKEN>'
Upon success:
{ "solution": { "name": "<DESTINATION_SOLUTION_NAME>", "status": "<DESTINATION_SOLUTION_STATUS>", "status_for_pending_request": "<DESTINATION_SOLUTION_PENDING_REQUEST_STATUS>", "id": "<DESTINATION_SOLUTION_ID>" }, "status": "<MIGRATION_INTENT_STATUS>", "destination_waba": { "id": "<BUSINESS_CUSTOMER_WABA_ID>", "name": "<BUSINESS_CUSTOMER_WABA_NAME>", "currency": "<BUSINESS_CUSTOMER_WABA_CURRENCY>", "timezone_id": "<BUSINESS_CUSTOMER_WABA_TIMEZONE>", "business_type": "ent", "message_template_namespace": "<BUSINESS_CUSTOMER_WABA_TEMPLATE_NAMESPACE>" }, "id": "<MIGRATION_INTENT_ID>" }
If <MIGRATION_INTENT_STATUS>
is ACCEPTED
, it means the customer has reviewed and accepted the migration intent and you can proceed to the next step. If it's any other value, do not proceed.
Note that when a customer accepts the migration intent in the Meta Business Suite, an account_update webhook is triggered with status
set to PARTNER_ADDED
. Although the webhook won't tell if the customer onboarded via the Meta Business Suite, you may wish to perform this query when you get one of these webhooks.
Use the POST /<WABA_ID>/subscribed_apps endpoint to subscribe your app to webhooks on the business customer's WABA. If you want the customer's webhooks to be sent to a different callback URL than the one set on your app, you have multiple webhook override options.
Note that <WABA_ID>
should be the customer's destination WABA ID.
curl -X POST 'https://graph.facebook.com/<API_VERSION>/<WABA_ID>/subscribed_apps' \ -H 'Authorization: Bearer <BUSINESS_TOKEN>'
Upon success:
{ "success": true }
We are currently testing new steps for sharing your credit line with onboarded business customers. These steps will eventually replace this step, so if you wish to implement these steps now, see Alternate method for sharing your credit line.
Use the POST /<EXTENDED_CREDIT_LINE_ID>/whatsapp_credit_sharing_and_attach endpoint to share your credit line with an onboarded business customer.
curl -X POST 'https://graph.facebook.com/<API_VERSION>/<EXTENDED_CREDIT_LINE_ID>/whatsapp_credit_sharing_and_attach?waba_currency=<CUSTOMER_BUSINESS_CURRENCY>&waba_id=<CUSTOMER_WABA_ID>' \ -H 'Authorization: Bearer <SYSTEM_TOKEN>'
Note that <CUSTOMER_WABA_ID>
should be the customer's destination WABA ID.
Upon success:
{ "allocation_config_id": "<ALLOCATION_CONFIGURATION_ID>", "waba_id": "<CUSTOMER_WABA_ID>" }
Use the GET /<WABA_ID>/phone_numbers endpoint and request the status
field to get a list of business phone numbers on a WABA and their Cloud API registration statuses.
Note that <WABA_ID>
should be the customer's source WABA ID.
curl 'https://graph.facebook.com/<API_VERSION>/<WABA_ID>/phone_numbers?fields=status' \ -H 'Authorization: Bearer <BUSINESS_TOKEN>'
Upon success:
{ "data": [ { "status": "<STATUS>", "id": "<BUSINESS_PHONE_NUMBER_ID>" } ], "paging": { "cursors": { "before": "<PAGING_BEFORE_CURSOR>", "after": "<PAGE_AFTER_CURSOR>" } } }
A status
of CONNECTED
indicates that the customer's business phone number is registered and in use with Cloud API.
Use the POST /<WABA_ID>/phone_numbers endpoint to migrate the customer's business phone number to the destination WABA.
Note that <WABA_ID>
should be the customer's destination WABA ID.
curl 'https://graph.facebook.com/<API_VERSION>/<WABA_ID>/phone_numbers' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <BUSINESS_TOKEN>' \ -d ' { "migrate_phone_number": true, "cc": "<BUSINES_PHONE_NUMBER_COUNTRY_CALLING_CODE>", "phone_number": "<BUSINESS_PHONE_NUMBER>", "display_phone_number": "<BUSINESS_PHONE_NUMBER_DISPLAY_NUMBER>", "verified_name": "<BUSINESS_PHONE_NUMBER_VERIFIED_NAME>" }'
Upon success:
{ "id": "<BUSINESS_PHONE_NUMBER_ID>" }
Use the POST /<BUSINESS_PHONE_NUMBER_ID>/register endpoint to register the customer's business phone number for use with Cloud API.
curl 'https://graph.facebook.com/<API_VERSION>/<BUSINESS_PHONE_NUMBER_ID>/register' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <BUSINESS_TOKEN>' \ -d ' { "messaging_product": "whatsapp", "pin": "<DESIRED_PIN>" }'
Upon success:
{ "success": true }