Set mapping rule
layerz_set_mappingCreate or update an import classification rule (upsert by pattern) in this model's single mapping set ("one model = one set"; created on first use). pattern is a case-insensitive glob where * matches anywhere (Apport* prefix, *PERPLEXITY* contains, *641 suffix, exact 601000) tested against the keyed source field; target is the item display name or uid it routes to — or the literal __ignore__ to deliberately route matching rows nowhere (they classify as ignored and stop counting as unmapped); sign (natural | negate | absolute) adjusts the amount. To reuse a catalog's rules instead, import it first (layerz_import_mapping_template). Re-sync (or layerz_manage_integration { op: "update" }) to apply. Not available for read-only API keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sign | No | Sign convention applied to the matched amount (default natural). | |
| target | Yes | Target item display name or uid; `uid::entryUid` pins ONE list entry of a list-mode item (every matched row lands on that entry, ignoring the dimension column); or `__ignore__` to route nowhere on purpose. | |
| pattern | Yes | Wildcard-prefix or exact pattern, e.g. "Apport*". | |
| summary | Yes | Required: short human-readable note (3–100 chars) summarising what this change does. Shown as the label in the model version history. Be specific (e.g. "Renamed Revenue to Net Revenue", "Imported 2024 OPEX from Excel"). | |
| model_id | No | Target model UUID. Required for user-scoped API keys; ignored (or validated against scope) for model-scoped keys. |