# Facebook Conversions Export Integration CLI You can use the Facebook Conversions BETA to send job results (in the form of event data) from Treasure Data directly to Facebook to measure how much your Facebook ads lead to real-world outcomes, such as purchases in your stores, phone orders, bookings, and more. This topic contains: ## Prerequisites - Basic Knowledge of Treasure Data. - Basic knowledge of Facebook Conversions and Facebook Event - To upload event data, you need access to one of the following on Facebook: - Business Manager admin - Admin system user who created the event set - Admin on the ad_account connected to the event set ## Creating Your Connection from the Command Line You can use the CLI to configure your connection. ```bash td query --database your_database --result configuration query ``` The following table identifies the configuration keys with descriptions. | **Config Key** | **Type** | **Required** | **Description** | | --- | --- | --- | --- | | type | string | yes | facebook_conversions | | access_token | string | Yes | A long-lived access token | | pixel_id | string | No | Facebook Pixel ID | | test_event_code | string | Yes | Facebook event set ID | | skip_invalid | boolean | No | Use to terminate job (without revert) when invalid records are encountered. For example: a record is missing the required columns e.g. event_name, event_time... | ## Example: Query and export results to an Event set ```bash td query --database my_db \ --result '{"type": "facebook_conversions","access_token": "xxx","pixel_id": "yyy","test_event_code": "361738844830373", "skip_invalid": true}'\ 'SELECT event_name, event_time, email as em from your_table' ``` Learn about supported [query column names](/int/migration-guide-to-facebook-conversion-connector#Query-field-names-mapping). ## Scheduling Execution Make sure to review: - [Scheduling a Data Connector Job Execution from the CLI](/int/scheduling-a-data-connector-job-execution-from-the-cli)