Meta Ads destination connector package for RETL State/Event contracts.
Project description
RETL Meta Destination
condor-retl-meta is the active first-party Meta Ads destination connector
package for the State/Event architecture. It exposes retl/meta through the
retl.destinations entry point group.
Surfaces
custom_audiencesaccepts targeted State Operations and sends Meta Custom Audiences add/remove users requests. It acceptsemail,phone_e164, andmobile_advertising_idIdentifiers and requires at least one of those accepted types. The surface supports managed targets: when a State row emits a logical target that is not mapped or already present in the runtime Target Registry, the connector looks for an existing Customer File Custom Audience with that exact name and creates one when missing.eventsaccepts Event imports and sends Meta Conversions API event requests. It acceptsemail,phone_e164, andexternal_idIdentifiers and requires at least one of those accepted types. Event bindings requireaction_sourceand either a singlepixel_idor anevent_routesmapping from Event name to pixel id. Payload fieldsfbc,fbp,client_ip_address,client_user_agent,event_source_url, andopt_outare rendered into the Meta Conversions API request shape; remaining payload fields becomecustom_data. Optionaltest_event_codeis sent at the request body level.
Both surfaces use bearer-token auth with the access_token credential field.
Both surfaces declare delivery_outcome="succeeded" because successful Meta
responses provide definitive per-request success evidence. Dry runs plan
request batches and do not submit membership or event mutations. For managed
Custom Audiences, dry runs may issue read-only lookup requests to determine
whether a target would be reused or planned for creation.
The access token may be loaded with:
credential_namespace="destinations.meta"
which creates retl.secrets["destinations.meta.access_token"] without
resolving the token during binding construction.
Identifier Rendering
Meta hashed matching identifiers are rendered with RETL's shared destination
SHA-256 helpers. For Custom Audiences, email and phone_e164 values are
lowercased and hashed unless the input is already a 64-character hexadecimal
SHA-256 value, in which case it is trimmed, preserved, and lowercased.
mobile_advertising_id is trimmed and sent unhashed.
For Conversions API Events, email and phone_e164 use the same lowercase
hash-or-preserve behavior. external_id is also rendered as SHA-256, but it is
not lowercased before hashing; 64-character hexadecimal input is preserved as a
pre-hashed value. The connector does not add email, phone, or external-id format
validation beyond existing non-empty request-rendering checks.
Binding Config
Shared config:
ad_account_idis required and may be provided with or without theact_prefix.api_versiondefaults tov25.0and is normalized without leading or trailing slashes.transportmay be injected for offline tests. When omitted, non-dry-run submissions use the connector'srequeststransport.custom_audience_customer_file_sourcedefaults toUSER_PROVIDED_ONLYand may be set toPARTNER_PROVIDED_ONLYorBOTH_USER_AND_PARTNER_PROVIDEDwhen creating managed Customer File Custom Audiences.
The connector owns the production API origin https://graph.facebook.com in
package code. Tests use injected transports to capture requests without
changing that origin. base_url is not a Meta config field and should not
appear in Meta TOML examples, even as a commented placeholder.
ad_account_id, api_version, and custom_audience_customer_file_source are
namespace-loadable public config:
destination = retl.destinations.load(
"retl/meta",
binding_name="meta_primary",
credential_namespace="destinations.meta",
config_namespace="destinations.meta",
)
The namespace can provide DESTINATIONS__META__AD_ACCOUNT_ID,
DESTINATIONS__META__API_VERSION, and
DESTINATIONS__META__CUSTOM_AUDIENCE_CUSTOMER_FILE_SOURCE. Event routing values
such as pixel_id or event_routes remain explicit because route mappings are
not inferred from namespaces.
Managed Custom Audience lifecycle uses Meta's documented Customer File Custom
Audience flow: read from /customaudiences under the ad account, create an
empty audience with subtype=CUSTOM and customer_file_source, then submit
membership rows to /{audience_id}/users. Dry runs may perform the read needed
to identify existing audiences, but do not create audiences or write Target
Registry rows.
events config:
action_sourceis required.- Provide either
pixel_idfor a single route orevent_routesto map Event names to pixel ids. - Optional
test_event_codeis included in the request body for Meta test events.
Config parsing, URL joining, transport lookup, and diagnostic sanitization live
in retl_meta.common. Partner request translation, identifier rendering, and
target/event routing live in retl_meta.hooks.
Final submission applies runtime-resolved bearer auth headers when building each
HttpRequest. Request planning remains auth-free and secret-free, so dry-run
request plans stay deterministic and redacted.
Proof Level
Default tests provide:
- Contract proof for package loading, connector metadata, surfaces, auth, and evidence shape.
- Translation proof for Custom Audiences State Operations and Conversions API Event Imports without network access.
- Mocked transport proof for request rendering, target mapping, route selection, managed Custom Audience find/create, runtime-store-backed target registry lookup, resolved auth placement, response classification, redacted diagnostics, transport failure handling, selected request-plan reuse, and destination batch ledger behavior.
Sandbox
Live sandbox tests are opt-in:
source local/env/.env.meta-sandbox
make test-sandbox-meta
Default repository checks exclude live_sandbox tests and do not contact Meta.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file condor_retl_meta-0.1.0.tar.gz.
File metadata
- Download URL: condor_retl_meta-0.1.0.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6a5a880b0b0a67bde6f94486ffb80e69bc7486fc17b2c0625064b3aa6032827
|
|
| MD5 |
752014fcf34d4eb566caed5fc746d991
|
|
| BLAKE2b-256 |
e606918226b63b6ae193d2a9008f151aa83320bd71c8cd1be5ea8a3d4d46c94a
|
Provenance
The following attestation bundles were made for condor_retl_meta-0.1.0.tar.gz:
Publisher:
publish.yml on condorgraph/condor-retl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
condor_retl_meta-0.1.0.tar.gz -
Subject digest:
c6a5a880b0b0a67bde6f94486ffb80e69bc7486fc17b2c0625064b3aa6032827 - Sigstore transparency entry: 1565165709
- Sigstore integration time:
-
Permalink:
condorgraph/condor-retl@18e0a038f797cb3529b6a1d8662794d89958eddb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/condorgraph
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@18e0a038f797cb3529b6a1d8662794d89958eddb -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file condor_retl_meta-0.1.0-py3-none-any.whl.
File metadata
- Download URL: condor_retl_meta-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07086d69a40676617b277aa87aff2887f5e7eaf719b548bbe21473c13944a3d5
|
|
| MD5 |
7f4913d4819b0f33a67be717bd9ad9da
|
|
| BLAKE2b-256 |
c7416aa64a1f854ccbf1b5ca335749efcdc44408daf52910edff9d993fdb500f
|
Provenance
The following attestation bundles were made for condor_retl_meta-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on condorgraph/condor-retl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
condor_retl_meta-0.1.0-py3-none-any.whl -
Subject digest:
07086d69a40676617b277aa87aff2887f5e7eaf719b548bbe21473c13944a3d5 - Sigstore transparency entry: 1565165730
- Sigstore integration time:
-
Permalink:
condorgraph/condor-retl@18e0a038f797cb3529b6a1d8662794d89958eddb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/condorgraph
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@18e0a038f797cb3529b6a1d8662794d89958eddb -
Trigger Event:
workflow_dispatch
-
Statement type: