Conversions API for CRM: Integrate as a Platform

Partners may consider offering Conversions API for CRM events as a service. This allows your clients to upload lead events generated via their Facebook/Instagram lead ads (instant forms) from their respective CRM systems, and use the Conversion Leads optimization goal in ads which may yield higher quality leads that are more likely to convert.

Prerequisites

To plan your project, you may use the estimated timeline as a guideline. Note:

  1. Integration stage, or the actual development on the partner side, may take about 3-7 weeks. Post integration, for an advertiser to get onboarded till running fully optimized Conversions Lead Ads campaigns, it may take 1.5-2 months.
  2. The below timeline is based on historical data. The actual timeline may vary based on available resources, speed of issue resolution, etc.
StageStepEstimated Time (Duration)







Integration

Step 1. Prerequisites on setting up assets


Step 2. Authentication



Step 3. API integration




Total

Prerequisite


1 day-3 weeks depending on the authentication option


3-4 weeks.
Less time required if partner has already integrated with the Conversions API for web, offline, app or messaging events


~3-7 weeks










Post-integration


Step 1. Set up a dataset


Step 2. Connect to the partner system


Step 3. Wait for 7 days of CRM event


Step 4. Configure sales funnel


Step 5. Funnel analysis and learning phase


Step 6. Run fully optimized Conversions Lead Ads campaigns*


Total


0.25 hrs


1-2 hrs


1 week


0.5 hrs


1-2 months







~1-2 months

*Advertisers may run Conversions Lead Ads campaigns during the learning period, but will not benefit from the full performance lift until it is complete.

Integration Guide

Step 1: Prerequisites

If you have not yet been offering the Conversions API as a service for web, app, offline or business messaging events, please ensure that you have set up the below assets:

PermissionBusiness intentionWhat to include in submission



ads_read

The allowed usage for this permission is to provide API access to your ad performance data for use in custom dashboards and data analytics, or to send web events from your server directly to Meta.

Written: Explain that you will use this permission to send events via Conversions API from your server directly to Meta on behalf of your advertisers.

Video: Demonstrate how your platform sends an event via the Conversions API.






ads_management

The allowed usage for this feature is to enable an unlimited number of ad accounts and lower rate limiting. At a minimum, ads_read or ads_management permission is required to use Ads Management Standard Access.

Written: Explain that you will use this permission to send events via Conversions API from your server directly to Facebook on behalf of your advertisers, or programmatically create and manage campaigns on behalf of your business as a value-added feature for your platform.

Video: Demonstrate how your platform sends an event via the Conversions API or show a test user logging onto your platform to create or edit ad campaigns.





Ads Management Standard Access

The allowed usage for this feature is to enable an unlimited number of ad accounts and lower rate limiting. At a minimum, ads_read or ads_management permission is required to use Ads Management Standard Access.

To qualify for advanced access, your app must have successfully made at least 1,500 Marketing API calls with an error rate of less than 10% over a 15-day period.

It's important to avoid the common mistake of repeatedly calling the API after reaching the rate limit. Instead, pause the calls immediately upon receiving an error response.

System granted permission, submission is not required.





pages_read_engagement

This permission allows your app to read content (posts, photos, videos, events) posted by the Page, read followers data (including name, PSID), and profile picture, and read metadata and other insights about the Page.

Written: Explain that you will need this permission as a prerequisite to ads_management permission, which you will use to send events via the Conversions API from your server directly to Meta on behalf of your advertisers.

Video: Demonstrate how your platform sends an event via Conversions API.




pages_show_list (prerequisite for pages_read_engagement)

The allowed usage for this permission is to show a person the list of Pages they manage or verify that a person manages a Page.

Written: Explain that you will need this permission as a prerequisite to pages_read_engagement and ads_management permission, which you will use to send events via the Conversions API from your server directly to Meta on behalf of your advertisers.

Video: Demonstrate how your platform sends an event via the Conversions API.




business_management (prerequisite for all pages permissions)

The allowed usage for this permission is to send business-related activities (for example, purchase, add to cart, lead) on behalf of Pages owned by the people who use your app.

Written: Explain that you will need this permission as a prerequisite to pages_show_list, pages_read_engagement and ads_management permission, which you will use to send events via Conversions API from your server directly to Facebook on behalf of your advertisers.

Video: Demonstrate how your platform sends an event via Conversions API.


Step 2: Authentication

Partners have the following two authentication options for datasets not managed by you:

Option 1 - Meta Business Extension (MBE, preferred)

MBE provides an endpoint to retrieve system user access tokens created in the advertiser’s Business Manager. Complete all the requirements for implementing MBE.

Ensure that you:

  • obtain manage_business_extension for your app — This is a private permission that requires your Meta representative to add your app to the allow list
  • set the value of the channel parameter in setup configuration object as CONVERSIONS_API
  • are able to receive the webhook response at the completion of onboarding
  • use the access token returned via MBE and convert it into a System User Access Token by making an additional API call
  • save a copy of external_business_id, pixel_id (that is, the dataset ID), business_id and system user access token in your system
  • get approval for your MBE integration

Option 2 - Client System User Access Token

With this option, partners may have the advertisers:

  • manually create a system user access token via the Conversions API inside Settings in Meta Events Manager (EM)
  • share pixel_id (that is, the dataset ID), business_id and system user access token with the partner and save a copy of it

Step 3: API integration

Partners then call the Conversions API endpoint to send the event payload. Key steps to take note of:

Find Lead ID

lead_id is a predefined ID associated with leads that are generated from lead ads campaigns run on Facebook or Instagram. There are various ways to find lead ID from Meta. Partners are recommended to use Webhook or Graph API bulk read for finding lead ID.

Note that lead_id is a mandatory field used in the Conversions API for CRM integration which uploads events back to Meta to help optimize for higher quality leads


Add partner_agent string for attribution

Send a unique partner_agent string together with the payload. If applicable, work with your dedicated Meta representative to decide on a suitable agent string. Use the same agent string if you are already sending one via Conversions API for web, offline, app or business messaging events.

Example

If your platform identifier is datapartner, this would be a sample event payload sent on behalf of your client:

{
    "event_name": "my lead stage",
    "event_time": 1617693833,
    "user_data": {
        "lead_id": 1234567890123456
    },
    "action_source": "system_generated",
    "custom_data": {
        "lead_event_source": "Salesforce",
        "event_source": "crm"
    },
   "partner_agent": "datapartner"
}

Use the Correct Event Payload

For Conversions API for CRM integration, partners should use the above structure for event payload to ensure events can be successfully received. Note that this is different from Conversions API for web, offline, app or business messaging events.

Make sure that you use the correct value for action_source of Conversions API for CRM events , that is, action_source = system_generated

Send All Lead Stages, Including Initial Lead Stage

Make sure to send all stages of leads as they are updated. This means, there would be multiple events on the same lead_id as the lead moves in the lead funnel stage.

Ensure that you send the first lead stage (that is, raw lead event) as it will let the system know that the lead was received and processed.

You should send a minimum of two stages for events from your sales funnel, including the raw lead event. It is recommended to send three stages or more if possible.

Mapping to CRM Lead Stages

If your advertisers are using different CRM systems, make sure you are able to map the parameters from different data sources to lead_id, event_name and event_time respectively.

One possible solution is to incorporate an UI/UX feature on your advertiser-facing portal to allow advertisers to map parameters from different CRMs to lead_id, event_name and event_time themselves.

Other best practices include the below:

  1. Upload data at least once a day. Ideally upload data in real-time, but you may employ hourly or daily batching methods if a real-time integration is not feasible.
  2. Each batch can include up to 1,000 events. If there is an error in the batch, the whole batch will be discarded so we highly recommend employing small batches and adding logic for retrying attempts.
  3. You can backfill your data for up to 7 days in the past. The time difference is calculated between event_time and upload_time. Backfilling some data may speed up the training process.
  4. Ensure that your event_time values are after the lead generation timestamp, otherwise your events may be discarded.
  5. Log error messages from the CAPI call and create alerts if there are issues. Exception handling for these errors would also be a good idea.
  6. Store lead_id in your system together with other information such as the leads’ details, lead stage, etc.

Post Integration

After you have successfully completed the API integration, we recommend that you select some suitable advertisers to conduct tests first before opening your solution to all advertisers.

Select Suitable Advertisers

It is important that you select suitable advertisers to use the Conversions API for CRM. Below are some guidelines for such advertisers:

  • Use Facebook/Instagram Lead Ads (Instant Forms)
  • Generate at least 200 leads per month
  • The lead stage the advertiser wants to optimize for
    • occurs within 28 days of leads being generated
    • has a conversion rate between 1% - 40%
  • Care about lead quality

Guidelines for Your Advertisers

In order to onboard your advertisers successfully to Conversions API for CRM and serve them well post-onboarding, you are highly recommended to be well-versed with the advertiser journey in order to guide them through:

Step 1. Create a CRM dataset: To verify if the CRM dataset is set up correctly, go to Events Manager > Datasource > Settings and you will see a Conversion Leads Section if it is a CRM dataset.

Step 2. Send a CRM event: Allow your advertiser to connect to your system and start sending in CRM events. If the integration is stuck at ‘Send a CRM event’, it means that the advertiser or your system has not successfully sent any events yet.

Step 3. Wait for 7 days of CRM events: To pass Data Verification checks, the dataset must meet all of the requirements before proceeding to the next step. To confirm if this stage is successful, check in Events Manager if the status moves down to “Configure Sales Funnel”.

If an advertiser is not able to proceed beyond this step:

  • check for errors in the Events Manager Diagnostic tab for the CRM Dataset.

  • continually send at least seven days worth of data. This does not have to be seven days in a row because the advertiser might not generate leads on some days such as weekends.

  • check that enough events are being uploaded to match with leads generated on Facebook. For example, if the advertiser generates 100 leads in one day we would expect all 100 leads to have uploaded events to match to them.

  • check that a minimum of two stages for events from the advertiser’s sales funnel is being sent, including the first lead stage (that is, the raw lead event). However, we recommend at least three stages if possible. For example, only sending in the “Sale” event will not be enough; make sure the advertiser sends in previous stages as well.

  • make sure data has all the required parameters and in the correct format highlighted in this guide. Sending data in other formats will trigger an error.


Step 4. Configure sales funnel

Step 5. Funnel analysis and Learning Phase: To move beyond the “Funnel Analysis” status, an integration will need to meet the following criteria:

  • An optimization stage with a conversion rate between 1-40%

  • Conversion window of the optimization day is 28 days or less

After the integration is completed, there is a 1-2 months learning phase required where the model will need to use the data that is being sent back to optimize the model. To confirm if an integration has completed the Learning Phase, check to see if the status in Events Manager shows “Learning Phase Complete”

Step 6. Run fully optimized Conversions Lead Ads campaigns via Ads Manager using the CRM dataset from above.

Note: Remind the advertiser not to change datasets after they have completed the integration. Changing datasets will start a new integration and restart the learning process.