← All articles

Prompt Builder or Agentforce agent: when to use which

Prompt Builder or Agentforce agent: a template is enough when one record goes in, one text comes out and a person reads it before anything happens. Service report texts, case summaries, dealer reply drafts and a nightly warranty summary fit that pattern. You need an agent when the system chooses its next step, answers a dealer without a person in between or writes records. A Standard prompt costs 4 Flex Credits per 2,000 tokens, an agent action 20 credits before any prompt. I start with the template and add the agent only where the dialogue pays for it.

What is the difference between a prompt template and an agent?

Prompt Builder1 creates reusable prompt templates. Trailhead lists four types: Sales Email, Field Generation, Record Summary and Flex for everything else. A template reads Salesforce data through merge fields, Flow, Data 360 or Apex, and the resolved prompt passes the Einstein Trust Layer, which masks sensitive data. A template is called from outside: an Einstein button next to a field on the record page, an invocable action in Flow, Apex or the Connect REST API2.

An agent decides for itself which action comes next. According to Trailhead on agent customisation3, an agent can read data but “can’t change records without a predefined agent action”. Actions are built on Flow, Apex or a prompt template. Salesforce calls Flow and Apex actions deterministic and says a prompt template action “involves a degree of randomness”.

So the real question is who decides the next step. With a template, your process decides: the technician presses the button, the Flow runs at 2 a.m. With an agent, the language model decides within limits you design, as described in Agent Script instead of LLM judgement.

After-sales tasks a template covers

Four typical tasks in after-sales service work well with a template:

  • Service report text. The technician’s notes and the parts used on the work order become a readable text for the customer. A Field Generation template writes into a long text field, and Trailhead4 notes that read-only fields are not supported. The technician corrects the text before the report goes out.
  • Case summary. A Record Summary template condenses a case with its emails and history when second level support or field service takes over. The reader is a colleague who knows the machine.
  • Dealer reply draft. A Sales Email or Flex template drafts the answer to a dealer’s question about a spare part or a delivery date. The service rep checks it and sends it.
  • Nightly summary of open warranty claims. Salesforce’s developer blog of October 20255 lists batch processing for Winter ’26: up to 1,000 prompts run asynchronously, started from Flow or through an AiJobRun record in Apex. The same post adds JSON output with syntax checks, so the result can go straight into fields. The warranty reviewer starts the morning with a short status per claim. The process behind it is in warranty claims from dealers.

The blog marks only Prompt Builder itself as GA, so check the release notes for your org before you plan the batch.

All four share one shape: a known input, one generation step and a person who reads the result. The text itself orders, books or credits nothing.

When do you need an agent with actions?

I would only build an agent when at least one of these conditions holds:

  1. Nobody reads the answer first. A dealer asks in the portal at 10 p.m. and the reply goes out directly, so you need guardrails, tests and an escalation path.
  2. The order of steps depends on the answer. Identify the dealer, check the entitlement, read the order status from SAP, offer an alternative part. A Flow can do that when the path is fixed; an agent is useful when the dealer’s question decides the path.
  3. Something has to be written. Creating a case, booking a field service appointment or placing a spare parts order is an action.
  4. The conversation has several turns. Follow-up questions such as “and the seal kit?” need context across messages.

If none of these applies, the agent adds cost and test effort without adding value. One SAP lookup plus one text is a Flow that calls a template.

What does a prompt cost compared with an agent action?

Salesforce meters prompts per call to the LLM gateway. According to the help article on billable usage types6, each prompt covers up to 2,000 tokens of input and output, rounded up, so 6,500 tokens count as four prompts. The rate card of 31 August 20267 prices them by model tier, and the model support page8 assigns the models:

Meter Credits Example models USD at list price
Basic prompt 2 GPT-5 Mini $0.01
Standard prompt 4 Claude Haiku 4.5, Claude Sonnet 4.6, Claude Sonnet 5, GPT-5 $0.02
Advanced prompt 16 Claude Opus 4.8, GPT 5.5 $0.08
Agent action 20 (sandbox 16) $0.10

The dollar values use the $500 per 100,000 credits from the Flex Credits announcement9. Prompts cost the same in the sandbox as in production.

A 5,000-token case summary on a Standard model is three prompts, 12 credits. On an Advanced model the same summary costs 48 credits, more than two agent actions. What makes a template cheap is the model tier you choose.

All other meters are in Flex Credits per action.

Worked example: templates first, then the dealer agent

Assume a machine builder with Service Cloud, Field Service, a dealer portal and SAP. All volumes are assumptions, priced on a Standard model:

Task per month Assumption Credits
Case summaries 2,000 × 5,000 tokens = 3 prompts × 4 24,000
Dealer reply drafts 1,500 × 3,000 tokens = 2 prompts × 4 12,000
Service report texts 600 × 4,000 tokens = 2 prompts × 4 4,800
Warranty batch 80 changed claims × 20 nights × 2 prompts × 4 12,800
Templates total 53,600, about $268

The head of service now wants dealers to get answers in the portal without a rep. Assume the agent runs four actions per conversation and calls the reply template once with two prompts. 1,500 conversations then cost 1,500 × (80 + 8) = 132,000 credits, about $660 a month. That is eleven times the $60 for the drafts.

A test suite of 100 conversations with four actions at 16 credits and two prompts each costs 7,200 credits per run. Ten runs before go-live are 72,000 credits, about $360.

The agent is worth it if it saves more rep time than the extra $600 a month and the tests cost, for example when dealers in other time zones wait until the next morning today. If reps answer within the hour anyway, I would keep the drafts. The full calculation for an order status agent is in what a dealer service agent costs.

You test a template differently from an agent

A template has one input and one output, so you test it with real records. Salesforce announced at Dreamforce 202610 batch prompt testing, which runs a template against many real inputs in one pass, as a beta. Reference visibility is GA and shows every Flow and action that depends on a template before you change it. Templates are metadata of the type GenAiPromptTemplate11, so they belong in the repository and go through the pipeline like a Flow.

An agent needs more. Agent tests run only in sandboxes12, and Salesforce warns that “running tests consumes requests and credits and can modify data”. You test action choice and answers, define pass rates and decide which user the agent runs as, as described in testing Agentforce agents before go-live. For a draft that a rep corrects anyway, this effort is out of proportion.

A Flex template also works outside Salesforce. Hosted MCP servers13 publish it as an MCP prompt that a user picks in Claude or Cursor, with the user’s permissions and the same credit consumption as in the Salesforce UI. ChatGPT does not support MCP prompts, according to that page.

Begin with the text tasks in service and sales

  1. 01

    List the text tasks

    In service and sales, with volume and reader.

  2. 02

    Build templates

    For the tasks where a person reads the text. Start on a Standard model and switch only if tests show a quality gap.

  3. 03

    Measure the editing

    If the reps send most drafts unchanged, that is the argument for the next step.

  4. 04

    Add an agent

    Only where nobody should have to read first, where the path varies or where something must be written. Reuse the tested template as the agent's reference action.

Which tool fits which job across the Salesforce platform is in the masterclass chapter on Salesforce AI development tools. This kind of decision is part of my Salesforce architecture work.

Sources13
  1. 1Prompt Builder (opens in a new tab)trailhead.salesforce.com
  2. 2invocable action in Flow, Apex or the Connect REST API (opens in a new tab)developer.salesforce.com
  3. 3Trailhead on agent customisation (opens in a new tab)trailhead.salesforce.com
  4. 4Trailhead (opens in a new tab)trailhead.salesforce.com
  5. 5developer blog of October 2025 (opens in a new tab)developer.salesforce.com
  6. 6help article on billable usage types (opens in a new tab)help.salesforce.com
  7. 7rate card of 31 August 2026 (opens in a new tab)salesforce.com
  8. 8model support page (opens in a new tab)help.salesforce.com
  9. 9Flex Credits announcement (opens in a new tab)salesforce.com
  10. 10Dreamforce 2026 (opens in a new tab)salesforce.com
  11. 11GenAiPromptTemplate (opens in a new tab)developer.salesforce.com
  12. 12Agent tests run only in sandboxes (opens in a new tab)developer.salesforce.com
  13. 13Hosted MCP servers (opens in a new tab)developer.salesforce.com

Frequently asked questions

What is the difference between Prompt Builder and an Agentforce agent?

Prompt Builder creates reusable prompt templates that a button, a Flow, Apex or an agent calls for one generation step. An Agentforce agent decides at runtime which action to run, holds a conversation and changes records only through predefined actions.

Can an Agentforce agent use a prompt template?

Yes. A prompt template can be the reference action behind a custom agent action, next to Flow and Apex. Salesforce describes Flow and Apex actions as deterministic and prompt template actions as involving a degree of randomness.

What does a prompt template cost per call?

Salesforce meters prompts per call to the LLM gateway in units of up to 2,000 tokens, rounded up. A unit costs 2 credits on Basic, 4 on Standard and 16 on Advanced models. At $500 per 100,000 credits, a 5,000-token summary on a Standard model costs $0.06.

Is a prompt template billed again when an agent calls it?

The Salesforce help article on billable usage types does not say whether a prompt template called as an agent action counts as one action plus its prompts. I budget both and compare with the actual consumption in the pilot.

How do I test a prompt template compared with an agent?

Agent tests run only in sandboxes, consume credits and can modify data. For templates, Salesforce announced batch prompt testing at Dreamforce 2026 as a beta that runs one template against many real inputs in one pass.

Related serviceArchitecture & solution design →

Contact

Planning an AI agent on Salesforce?

In 30 minutes we check whether your use case holds up and what it costs to run.

What to bring

  • The use case: which request or task the agent should take over and how often it occurs
  • Where the data for it lives: in Salesforce, in the ERP or in documents
  • Your licence situation for Agentforce and Data 360, if known

What we clarify

  • Whether an agent is the right approach or a flow with fixed rules is enough
  • Which running costs per action you have to expect
  • Which data quality and which tests you need before go-live
Book a call (opens Microsoft Bookings in a new tab)

Pick a slot in my calendar via Microsoft Bookings. Prefer to write? Use the form and I’ll get back to you.

Rather talk right away? +49 221 98656758

Send a message

Your details are only used to answer your request. More in the privacy policy.