# Maplith for marketing

How the AI agent a marketing team already uses stops paying for what cannot be sold and sees where the discount settings break the policy the business wrote down — each workflow a before and after, shown on fictional companies’ exports.

Marketing spends in one system on the strength of facts that live in others: the stock is in the shop, the policy is in a document, the spend is in the ad platform. When they disagree, nobody sees it until the money has gone. Your agent can catch it — if it knows where each fact lives, what changed and whether it may act. Maplith gives it exactly that; your agent acts in your systems with your credentials.

Acme Commerce is a fictional web shop built for our demo: the company, its people, its customers, the device brands, the suppliers and the competing chains are all invented, and nothing in the data comes from any customer.

Fjeldrev Outdoor ApS is a fictional web shop built as a test company: the company, its people and its customers are all invented, and nothing in the data comes from any customer.

## Between the systems

Two disagreements between systems that no single system shows.

- **Spend on what cannot be sold.** The ad platform keeps paying for clicks on a product the shop has sold out. In the worked example one campaign kept spending for sixteen days on a sold-out case, with no conversion. (Acme Commerce · in its exported data.)
- **Discount settings that break the written policy.** In the worked example the policy says codes may not be combined and caps the discount at 20 %. Two codes were set as combinable, and four orders stacked them to 25 %. A scan of the exports raised it as a finding, citing the policy, the settings and the orders. (Fjeldrev Outdoor ApS · raised by a scan of its exports.)

## Workflows

The workflow below is told in full on the e-commerce page, where its worked example lives. Its last step uses live rules, which are in early access and being built now; the rest ships today.

### Sold out, and the ads keep running

Stock reaches zero in the shop; the ad platform keeps paying for clicks on it.

**Without Maplith.** Stock sits in the shop and the reporting database, spend sits in the ad platform, and nobody owns the space between. In the worked example a leather case was out of stock from 2026-07-14 to 2026-07-29, and one campaign spent DKK 5,630 on it across those sixteen days — 1,599 clicks, not one conversion — while the shop’s own marketing rules say to pause ads the day stock reaches zero. An agent without a map has to find both exports, guess how the ad platform’s rows join the stock (the catalogue spells seven re-listed products differently), read a year of daily rows to notice, and start over tomorrow.

**With Maplith:**

1. **Your rules** — An admin writes the rule once, from the map’s own names: **stock on hand is zero and ad spend over the last day is above zero — per product.** A product is reached only through joins Maplith tested against the rows. The rule is judged when a scan finishes and, for a connected system, daily or weekly between scans; its first judging is its baseline, so a product already sold out then raises nothing, and a product fires when it starts matching.
2. **Signals** — `list_signals` returns a `rule_fired` signal for that product, with the figure behind each condition.
3. **Task context** — `get_task_context` returns the product, the verified route from ad spend to stock, the marketing rules if the shop keeps them as a playbook, what was done the last time, and the operation the rule suggests — pause the ad set — with the key’s policy for it.
4. **The action gate** — `request_action` to pause that ad set: allowed, pending a person, or denied. An allowed answer can carry a grant good once for that ad set; the agent pauses it in the ad platform with the shop’s own credentials.
5. **Record and value** — `record_action` records what was done — with the spend the ad platform says it stopped, when the agent has that figure — so the next judging does not raise it as though nobody had looked, and **What you got** counts it.
6. **Live rules (early access)** — Instead of waiting for the next judging, the shop’s own automation — the kind a shop platform already runs when stock changes — reports only the observation that a product reached zero, and Maplith turns it into the same signal and task context within minutes.

Worked example: [Acme Commerce](/industries#acme) — told in full on [Maplith for e-commerce](/industries/e-commerce#sold-out-while-ads-run).

## The pieces

| Piece | Tool | What it gives the agent | Status |
|---|---|---|---|
| Your rules | — | Conditions the business writes from the map’s own names, judged for each product, order or other group it chooses. | live |
| Signals | `list_signals` | What needs doing, as typed events to poll instead of re-reading the map. | live |
| Task context | `get_task_context` | A single call with everything a signal needs, including the playbooks and what the key may do. | live |
| The action gate | `request_action` | Allowed, pending a person, or denied — before the agent acts, with a grant good once. | live |
| Record and value | `record_action` | What was done, so the next judging does not raise it as though nobody had looked — and counted in “What you got”. | live |
| Live rules | — | Maplith compiles what to check live; the business’s own automation reports only what it observed; Maplith turns it into a signal within minutes. | early access |

## The worked examples

- **[Acme Commerce](/industries#acme)**, a web shop selling phone and tablet accessories. Its situations are in twelve months of exported data, checked against the files by a script with no model involved. These pages say what is in the data, and publish no score for what a scan of it finds. [Maplith for e-commerce](/industries/e-commerce).
- **[Fjeldrev Outdoor ApS](/industries#fjeldrev)**, a web shop selling outdoor gear. The findings quoted from it come from a recorded scan of its exports. There is no public map or key for it.

Every department: [Solutions](/solutions). The worked examples: [Worked examples](/industries).
