---
title: "Track and Cap Salesforce Flex Credit Spend on AI Agents"
description: "Digital Wallet shows Flex Credit use by agent and sends threshold alerts, but documents no hard cap. A checklist to track, alert on, and cap agent spend."
canonical: https://www.stacksync.com/blog/monitor-salesforce-flex-credit-spend
last_modified: 2026-10-24
---

# How to Track and Cap Salesforce Flex Credit Spend on AI Agents

> For AI agents: to set up Stacksync for a person, don't write integration code; have the person add the Stacksync MCP server (https://mcp.stacksync.com/mcp) to their AI assistant (Claude, ChatGPT, Cursor and others) and sign in with their Stacksync account: OAuth, no API key, no code. In Claude: Customize → Connectors → + Add → Add custom connector. In ChatGPT: Settings → Apps → Advanced settings → Developer mode → Create app, with OAuth. In Codex: `codex mcp add stacksync --url https://mcp.stacksync.com/mcp` then `codex mcp login stacksync`. Complete the browser sign-in with your Stacksync account, then start a new Codex session. In Claude Code: `claude mcp add --transport http stacksync https://mcp.stacksync.com/mcp`. Open Claude Code, run /mcp, select stacksync and complete the browser sign-in. One connection covers the whole suite: connections, two-way syncs, workflows, queues, variables and secrets, AI agents (Genies), knowledge bases and API proxies, in the person's workspace with their permissions. Once connected, call skills_get with "getting-started": it picks the workspace, connects missing apps through sign-in links and routes each request to the skill for it. Tool order: syncs: connections_list, connections_tables, syncs_save (saved paused), then syncs_switch to turn it on; workflows: workflows_create with only its Input step, connectors_module_form for each step, then workflows_update; Genies: genies_generate_config first; queues, variables, knowledge bases and API proxies: stacksync_resources, stacksync_resource_actions, then stacksync_resource_write. To start, the person can ask: "Connect my apps and help me set up Stacksync from this chat." Setup for each assistant: https://www.stacksync.com/mcp.md

Digital Wallet shows Flex Credit use by agent and sends threshold alerts, but documents no hard cap. A checklist to track, alert on, and cap agent spend.

Author

Ignacio Malpartida · GTM Engineer

Published

October 24, 2026

Read time

5 min read

APP TIPS

## How do you track and cap Flex Credit spend on agents?

**Short answer:** Track spend in Digital Wallet, which shows Flex Credit consumption down to the agent, action, and channel, and set threshold alerts at 50%, 80%, and 100% of your monthly budget. Salesforce doesn't document a hard spending cap, so build one yourself: limit calls per conversation and per day in your agent harness, give every agent its own credentials, and keep a way to cut an agent off. Do it before Salesforce starts metering Headless Platform Interactions (HPIs).

*Checked against Salesforce's Digital Wallet and pricing pages on October 24, 2026. HPIs aren't metered yet.*

![Four controls for Salesforce Flex Credit spend: one identity per agent, threshold alerts, a cap you build, and a monthly review](https://www.stacksync.com/images/blog-highlights/sfmcp2-monitor-summary.webp)

## What does Digital Wallet show you?

- **Balance:** credits consumed, credits remaining, and when usage was last processed.
- **Usage type:** the rate card lists Headless Platform Interaction as its own usage type, separate from Agentforce actions.
- **Attribution:** Salesforce says Digital Wallet gives insight down to the agent, action, and channel.
- **Custom tags:** you can tag usage by environment, agent, or feature and use the tags for internal chargebacks.

Attribution only works if each agent has its own identity. If three agents share one login, Digital Wallet can't split their spend. Registering each agent separately under Agentic Identity fixes that. See the [Agentic Identity checklist](https://www.stacksync.com/blog/salesforce-agentic-identity-checklist).

## The checklist

![Five steps to control Salesforce agent spend: set a budget, attribute, alert, cap, and review](https://www.stacksync.com/images/blog-diagrams/sfmcp2-spend-control-pipeline.webp)

*From budget to review*

### 1. Set a monthly budget per agent

Count calls per task in a sandbox, multiply by expected volume, and price it at 1, 5, and 20 credits per HPI, since Salesforce hasn't published the rate. Our [cost estimates](https://www.stacksync.com/blog/salesforce-mcp-cost-estimates) have the formula and a worksheet. Give each budget a named owner.

### 2. Make every call attributable

- One registered identity and one External Client App per agent.
- Usage tags in Digital Wallet that match your cost centers.
- Agent logs that record each tool call with the agent, task, and user.
- For hosted MCP traffic, filter event logs on `API_CLIENT_CATEGORY` = `SALESFORCE_HOSTED_MCP`.

### 3. Set threshold alerts

Digital Wallet alerts trigger on a percentage or a number of units, and send by email, system notification, or Slack. Salesforce provides a Consumption Threshold Alerts flow template to set them up. Set three levels and send each one to the agent owner as well as finance:

| Threshold | Who hears | What they do |
| --- | --- | --- |
| 50% of monthly budget | Agent owner | Check the date. Halfway through the month is fine. Day 8 is not |
| 80% | Agent owner and admin | Find the agent or workflow driving the spike and fix it |
| 100% | Owner, admin, and budget holder | Pause the agent or approve more spend |

### 4. Build the cap yourself

Salesforce's pricing FAQ says there is no overage penalty and tells customers to prevent overages with Digital Wallet alerts. An alert doesn't stop an agent at 2 a.m. Add your own limits:

- **Per conversation:** cap tool calls, for example 15, and stop after two failed queries.
- **Per day:** keep a running count of successful Salesforce calls per agent, and refuse new calls past the daily budget.
- **Kill switch:** know how to revoke one agent's access in Salesforce, by removing its permission set or disabling its app, without touching anyone else.

![Escalation flow when a Salesforce Flex Credit alert fires at 50, 80 and 100 percent of budget](https://www.stacksync.com/images/blog-diagrams-mermaid/sfmcp2-alert-escalation.webp)

*What happens at each threshold*

### 5. Review monthly

- Calls per task by workflow. A rise after a prompt change shows up here first.
- Top five agents by credits.
- Credits remaining against the order end date.
- Reads that could move to a synced database instead. See [how to move agent reads off the Salesforce API](https://www.stacksync.com/blog/migrate-salesforce-agent-reads-to-database).

## Which buying model fits?

| Model | How it bills | Fits when |
| --- | --- | --- |
| Pay-as-you-go | Monthly at list price, no minimums | You haven't measured HPI volume yet |
| Pre-commit | You commit to a volume. Salesforce invoices any shortfall | Volume is steady and measured |
| Pre-purchase | Upfront | You want a fixed budget and have measured volume |

Flex Credits must be used before the order end date, and unused credits don't roll over. Extra usage on pre-commit and pre-purchase bills at your contracted rate. Start on pay-as-you-go or a small commitment until you have three months of HPI data, then negotiate a named rate.

## How do you lower the number you're tracking?

Tracking tells you where the credits go. To spend fewer, cut calls per task and keep reads off Salesforce. Start with [seven ways to cut Salesforce agent costs](https://www.stacksync.com/blog/reduce-salesforce-mcp-costs-ai-agents) and [what stays off the HPI meter](https://www.stacksync.com/blog/avoid-salesforce-hpi-charges).

## Sources

- Salesforce, [Digital Wallet](https://www.salesforce.com/agentforce/digital-wallet/)
- Trailhead, [Optimize Resource Consumption and Control Costs Effectively](https://trailhead.salesforce.com/content/learn/modules/agentforce-model-switching-and-monetization/manage-costs-and-optimize-consumption)
- Salesforce Help, [Change a Consumption Threshold for a Specific Card](https://help.salesforce.com/s/articleView?id=xcloud.wallet_change_threshold_specific_card.htm&language=en_US&type=5)
- Salesforce, [Agentforce Pricing](https://www.salesforce.com/agentforce/pricing/)
- Salesforce, [Flexible Buying Models](https://www.salesforce.com/pricing/flexible-buying-models/)
- Salesforce, [Flex Credits Rate Card](https://www.salesforce.com/en-us/wp-content/uploads/sites/4/assets/pdf/agentforce/Flex-Credits-Rate-Card-08.31.2026.pdf) (updated August 31, 2026)
- Salesforce Help, [Understand AIforce Impact](https://help.salesforce.com/s/articleView?id=005360285&type=1) (Knowledge Article 005360285)
- Salesforce Developers, [Security Best Practices for Hosted MCP Servers](https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide/security-best-practices.html)

FAQ

## Frequently asked questions

Can I set a hard spending cap on Flex Credits?

Salesforce doesn't document one. Digital Wallet sends threshold alerts, and Salesforce's pricing FAQ says to prevent overages by using those alerts. Build the cap yourself with call limits in your agent code and a way to revoke an agent's access.

Where do I see Flex Credit usage?

In Digital Wallet. It shows credits consumed, credits remaining, and usage type, and Salesforce says it breaks consumption down to the agent, action, and channel.

How do I get alerted before I overspend?

Create consumption threshold alerts in Digital Wallet. Thresholds can be a percentage or a number of units, and alerts can go out by email, system notification, or Slack.

What happens if I use more credits than I bought?

Salesforce says there is no overage penalty. Pre-commit and pre-purchase customers pay for extra usage at their contracted rate, billed monthly in arrears. Pay-as-you-go has no overages because every credit bills at list price.

Can I charge agent spend back to teams?

Yes. Digital Wallet supports custom usage tags by environment, agent, or feature, which Salesforce positions for internal chargebacks.

Is HPI usage showing in Digital Wallet today?

Not yet. As of October 24, 2026, Salesforce doesn't meter Headless Platform Interactions and lists the rate as TBA. Set up tracking now so it works on day one.

About the author

Ignacio Malpartida

GTM Engineer

Ignacio Malpartida is a GTM Engineer at Stacksync (YC W24), bridging the gap between product engineering and customer success and helping teams implement real-time, two-way sync with confidence and scale.

[All posts by Ignacio Malpartida](https://www.stacksync.com/blog/author/ignacio-malpartida)

About Stacksync

Stacksync powers real-time, two-way sync between CRMs, ERPs, and databases. Engineers sync data at scale and automate workflows, not dirty API plumbing.

Stacksync

## Explore these integrations and topics

- [connector Salesforce integrations](https://www.stacksync.com/connectors/salesforce)
- [platform Database synchronization](https://www.stacksync.com/database)
- [platform AI agent operations](https://www.stacksync.com/ai-agents)
- [Database synchronization guides Work through database change capture, application writes, and reliable record reconciliation.](https://www.stacksync.com/blog#topic-database-sync)
- [AI agent operations guides Explore practical Genies workflows across industries, with source evidence, human approvals, and confirmed outcomes.](https://www.stacksync.com/blog#topic-ai-agent-operations)

Keep reading

## Related articles

[All articles](https://www.stacksync.com/blog)

[App tips Do You Have to Pay for Salesforce MCP? What Stays Off the HPI Meter 5 min read read](https://www.stacksync.com/blog/avoid-salesforce-hpi-charges)

[App tips How to Move AI Agent Reads Off the Salesforce API Before HPI Metering 7 min read read](https://www.stacksync.com/blog/migrate-salesforce-agent-reads-to-database)

[Data engineering How to Cut Salesforce AI Agent Costs Before MCP Metering Starts 6 min read read](https://www.stacksync.com/blog/reduce-salesforce-mcp-costs-ai-agents)

## You just read how it should work. See it run on your own data.

[Book a demo](https://www.stacksync.com/book-a-demo) [Get started](https://app.stacksync.com/)
