MMetadata /docs
Docs/Tools/create_salesforce_contacts_audience

create_salesforce_contacts_audience

Create a Salesforce-contacts custom audience (platform customAudienceType SFDC_CONTACTS_STATIC or SFDC_CONTACTS_DYNAMIC) from a Salesforce mixed-criteria.

Writes audiences

Creates or changes something in the account. Put it behind whatever review your agent uses.

What it does

Create a Salesforce-contacts custom audience (platform customAudienceType SFDC_CONTACTS_STATIC or SFDC_CONTACTS_DYNAMIC) from a Salesforce mixed-criteria.

                This is one of the audience types eligible for Microsoft Ads (Customer Match). Use it when a user wants a Salesforce-sourced contacts audience, including for a Microsoft Ads campaign.

                PREREQUISITE:
                  • Salesforce integration MUST be connected — the tool checks this and, if not connected, creates nothing and returns { warning, connected: false }.
                  • A criteria_id from list_salesforce_mixed_criteria — do NOT invent one.

                VARIANT (mirrors the UI's static/dynamic choice):
                  • STATIC  → SFDC_CONTACTS_STATIC — snapshot at creation, does not refresh.
                  • DYNAMIC → SFDC_CONTACTS_DYNAMIC — refreshes as the Salesforce data changes.
                  • If the user did not say which, ASK; do not default silently.

                ASYNC: the platform creates the audience in the background and returns a flow id, NOT a ready audience id. The audience appears under the account's Salesforce audiences once the flow completes, and its contact count fills in then. Do not expect to associate it to a campaign in the same turn.

                PARAMETERS:
                  • name (required): audience display name.
                  • criteria_id (required): id from list_salesforce_mixed_criteria.
                  • variant (required): STATIC or DYNAMIC.

                RETURNS: { id, name, status, createdDate, audience_type, async: true } — `audience_type` is the SFDC_CONTACTS_* you created and `id` is a creation/flow id, not associable yet. If Salesforce is not connected: { warning, connected: false }, and nothing is created.

Arguments

ArgumentTypeNotes
name string required Audience display name.
criteria_id integer required The Salesforce mixed-criteria id from list_salesforce_mixed_criteria.
variant string required STATIC = snapshot (SFDC_CONTACTS_STATIC); DYNAMIC = refreshing (SFDC_CONTACTS_DYNAMIC). Ask the user if unspecified.
one of: STATIC, DYNAMIC

Request

curl
curl -s -X POST https://mcp-server.metadata.io/mcp \
  -H "Authorization: $METADATA_PAT" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "MCP-Protocol-Version: 2025-11-25" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"create_salesforce_contacts_audience","arguments":{"name":"<name>","criteria_id":0,"variant":"STATIC"}}}'

Response

No recorded response. This tool writes to the account, so it is never executed to build these docs. The request above is still the exact shape to send. Nothing on this page is invented.

Other audiences tools:

All 160 tools · machine-readable index