---
title: "set_mapping — AI Ability"
description: "Set field mapping — Set the payload field mapping for a webhook+trigger (rename / restructure / exclude / type-cast fields with dot-notation paths)."
url: "https://wpwebhooks.org/docs/ability-set-mapping/"
---

[WP Webhooks](/) / [Docs](/docs/) / set\_mapping

AI Ability since v2.0.0

# set\_mapping

Set field mapping — Set the payload field mapping for a webhook+trigger (rename / restructure / exclude / type-cast fields with dot-notation paths).

Set the payload field mapping for a webhook+trigger (rename / restructure / exclude / type-cast fields with dot-notation paths). Registered as the WordPress Ability `flowsystems-webhook-actions/set_mapping`, so external AI tools (Claude Code, Cursor) can call it over MCP or REST with a scoped API token.

/ Plan step shape

```
{ "ability": "set_mapping", "input": { "webhook_id": …, "trigger": …, "field_mapping": … } }
```

/ Scope & confirmation

Minimum API-token scope for external (MCP/REST) callers: `full`. Runs without a confirmation pause (the overall plan is still user-approved before execution starts).

/ Input fields

| Name | In | Type | Req | Description |
| --- | --- | --- | --- | --- |
| webhook\_id | param | integer | yes |  |
| trigger | param | string | yes |  |
| field\_mapping | param | object | yes | Mapping definition as used by the mapping UI. |

/ Examples

Plan step as the AI Builder proposes it

```
{
  "id": "step_1",
  "ability": "set_mapping",
  "summary": "…",
  "input": {
    "webhook_id": 12,
    "trigger": "wpcf7_mail_sent",
    "field_mapping": {
      "enabled": true,
      "rules": [
        {
          "source": "args.0.posted_data.your-email",
          "target": "email"
        }
      ]
    }
  }
}
```

/ Related

[get\_trigger\_schema](/docs/ability-get-trigger-schema/)[Payload Mapping](/docs/payload-mapping/)[REST API reference](/webhook-wordpress-plugin-api/)

/Ready

## Your next automation is  
one sentence away.

[Install Plugin→](https://wordpress.org/plugins/flowsystems-webhook-actions/) [See the Plugin →](/wordpress-webhook-plugin/)

$ wp plugin install flowsystems-webhook-actions --activate

## Structured data

```json
{"@context":"https://schema.org","@type":"TechArticle","name":"set_mapping — AI Ability — Webhook Actions Docs","description":"Set field mapping — Set the payload field mapping for a webhook+trigger (rename / restructure / exclude / type-cast fields with dot-notation paths).","url":"https://wpwebhooks.org/docs/ability-set-mapping/","isPartOf":{"@type":"WebSite","name":"WP Webhooks","url":"https://wpwebhooks.org"},"about":{"@type":"SoftwareApplication","name":"Webhook Actions","applicationCategory":"WordPress Plugin"}}
```
