Billing Considerations for Code Extension

Using code extension in Data 360 impacts the consumption of credits used for billing for orgs operating Data 360 under a Data Cloud license.

Use Digital Wallet to check which consumption cards are active in your org, find out how many credits are available on each card, and determine how many credits have been consumed in each usage type.

If you have certain licenses or editions, such as a Data 360 Profiles license or Agentforce 1 Edition, some types of usage aren’t metered. Check your licenses and review license documentation for more information.

Data 360 Usage

When you use Data 360 for data collection and processing, your org consumes credits from either the Data Services consumption card or the Flex Credits consumption card.

  • If your contract included Data Service Credits, those are consumed for all Data 360 usage.
  • If you run out of Data Service Credits, your org is billed at your Data Service Credit overage rate for the remainder of your term unless more credits are added.
  • If you have Flex Credits for Data 360, those credits are consumed instead.

Data Services and Flex Credits organize data services within different usage type groupings. For more information, see Data Services Billable Usage Types for Data 360 and Flex Credits Usage Types for Data 360. To check multipliers for each usage type, see the Multipliers for Data Services Rate Card or the Agentforce & Data 360 Flex Credits Rate Card. The cost of each credit is determined by your contract.

When a code extension function invokes predictive or generative models, billing is recorded in parallel across two meters: a compute meter for code execution and a model-usage meter (for example, Inferences for predictive model output).

Note
Note When a batch data transform created from a code extension is deployed and run within Data 360, usage is metered only under the Code Extension usage type, not under the Batch Data Transforms usage type.
Digital Wallet Card Usage Type Usage Type Description Notes
Data Services Code Extension Usage in this type is measured in Compute Units. The number of Compute Units consumed per hour depends on the compute size selected. The total number of Compute Units is calculated based on the hourly consumption rate and the total compute time your code consumes. See the sections later for details on compute size and hourly consumption rate.
Flex Credits Data 360 Code Extension Usage in this type is measured in Compute Units. The number of Compute Units consumed per hour depends on the compute size selected. The total number of Compute Units is calculated based on the hourly consumption rate and the total compute time your code consumes. Credits are only consumed in this usage type when your org doesn’t have any Data Services credits.
Data Services Inferences Usage is calculated based on the number of unique inferences produced by a predictive model. A single inference includes one prediction and, optionally, one or more prescriptions and one or more top predictors. Inferences are consumed for any predictive AI model used, whether internal (built in Einstein Studio AI) or external (Bring Your Own Model). This usage is considered when a code extension function invokes an Einstein Studio predictive model during execution. Billed in parallel with Code Extension compute usage.
Einstein Requests Starter Prompts

Usage is calculated based on two factors: the number of direct requests to the LLM via the LLM gateway, and whether the gateway uses a Bring Your Own Large Language Model (BYOLLM).

Each starter prompt includes the processing of up to 2,000 tokens. Prompt usage is counted in chunks of 2,000 tokens, rounded up. Prompts that exceed this limit will be metered as multiple prompts, with each additional 2,000-token chunk counting as a new prompt. For example, a prompt with a total of 6,500 input and output tokens will be metered as 4 prompts.

Tokens are units of data processed by the AI models.

This usage is considered when a code extension function invokes a generative model through LLM Gateway. Billed in parallel with Code Extension compute usage.
Einstein Requests

Standard Prompts

Basic Prompts

Advanced Prompts

Usage is calculated based on two factors: the number of direct requests to the LLM via the LLM gateway, and whether the gateway uses a Salesforce managed large language model. The specific category depends on the model that is used. See Large Language Model Support to find out which usage types apply.

All Standard, Basic, and Advanced prompts process up to 2,000 tokens per prompt. Token usage is rounded up in 2,000-token increments. All Standard, Basic, and Advanced prompts that exceed this limit will be metered as multiple prompts, with each additional 2,000-token chunk counting as a new prompt. For example, a prompt with a total of 6,500 input and output tokens will be metered as 4 prompts.

Tokens are units of data processed by the AI models.

Note
Note Advanced Prompts were launched with a designated multiplier listed in the Agentforce Flex Credits Rate Card. Salesforce will start metering the use of Advanced Prompts on July 21, 2026.
This usage is considered when a code extension function invokes a generative model through LLM Gateway. Billed in parallel with Code Extension compute usage.
Flex Credits Starter Prompts

Usage is calculated based on two factors: the number of direct requests to the LLM via the LLM gateway, and whether the gateway uses a Bring Your Own Large Language Model (BYOLLM).

Each starter prompt includes the processing of up to 2,000 tokens. Prompt usage is counted in chunks of 2,000 tokens, rounded up. Prompts that exceed this limit will be metered as multiple prompts, with each additional 2,000-token chunk counting as a new prompt. For example, a prompt with a total of 6,500 input and output tokens will be metered as 4 prompts.

Tokens are units of data processed by the AI models.

Credits are only consumed in this usage type when your org doesn’t have any Einstein Requests credits.
Flex Credits

Standard Prompts

Basic Prompts

Advanced Prompts

Usage is calculated based on two factors: the number of direct requests to the LLM via the LLM gateway, and whether the gateway uses a Salesforce managed large language model. The specific category depends on the model that is used. See Large Language Model Support to find out which usage types apply.

All Standard, Basic, and Advanced prompts process up to 2,000 tokens per prompt. Token usage is rounded up in 2,000-token increments. All Standard, Basic, and Advanced prompts that exceed this limit will be metered as multiple prompts, with each additional 2,000-token chunk counting as a new prompt. For example, a prompt with a total of 6,500 input and output tokens will be metered as 4 prompts.

Tokens are units of data processed by the AI models.

Note
Note Advanced Prompts were launched with a designated multiplier listed in the Agentforce Flex Credits Rate Card. Salesforce will start metering the use of Advanced Prompts on July 21, 2026.
Credits are only consumed in this usage type when your org doesn’t have any Einstein Requests credits.
Data Services Data Queries

Usage is calculated based on the number of records processed.

The count of records processed depends on the structure of a query as well as other related factors such as the total number of records in the objects being queried.

This usage is considered when a code extension batch data transform script runs locally and queries DLOs or DMOs through the Data Query API.
Flex Credits Data 360 Queries

Usage is calculated based on the number of records processed.

The count of records processed depends on the structure of a query as well as other related factors such as the total number of records in the objects being queried.

When an object is queried in the context of a data space, the number of rows processed is based on the total number of processed rows in the source object, not the number of rows pertaining to the particular data space

Credits are only consumed in this usage type when your org doesn’t have any Data Services credits. This usage is considered when a code extension batch data transform script runs locally and queries DLOs or DMOs through the Data Query API.

Compute Size Impact on Billing

The compute size that you select for your custom code deployment directly affects credit consumption.

The available compute size options are:

  • Standard - Large - 4 Compute Units per hour
  • Standard - X-Large - 8 Compute Units per hour
  • Standard - 2X-Large - 16 Compute Units per hour
  • Standard - 4X-Large - 32 Compute Units per hour
Important
Important Larger compute sizes provide more processing power but consume proportionally more credits. Choose the compute size that balances your performance requirements with cost considerations.

Compute Unit Consumption Calculation

Compute Unit consumption depends on the compute size you select for your code execution and on total compute time. Total compute time accounts for the total run time of all underlying components. Because the job uses parallel processing for underlying components, total compute time can be greater than the start-to-finish duration.

Note
Note Code extension chunking functions incur compute charges while the function is active, including 1 hour of standby time after execution completes. If a new request arrives during the standby period, the 1-hour timer resets. This reset keeps the function ready for incoming requests to ensure faster and more reliable search index processing.

Compute Unit consumption is calculated by using the following formula:

Compute Unit Consumption = Total Compute Time (hours) x Compute Unit Rate per Hour for the Compute Size

For compute unit consumption, the total compute time value is applied as follows:

  • If total compute time is less than 1 minute, it is rounded up to 60 seconds.
  • If total compute time is greater than 1 minute, billing uses 1-second increments. For example, if total compute time is 5 minutes and 1 second, it is billed as 5 minutes and 1 second (not 6 minutes).

Example: Suppose you execute a code extension script configured for a Standard - Large Compute size. Total compute time is 1.5 hours. When configured to use Standard - Large compute size, the code uses 4 Compute Units for every hour it runs.

  • Compute Size: Standard - Large - 4 Compute Units per hour
  • Total Compute Time: 1.5 hours (illustrative)
  • Compute Unit Rate per Hour for the Compute Size: 4 Compute Units/hour
  • Compute Unit Consumption: 1.5 hours x 4 Compute Units/hour = 6 Compute Units

Your code consumes 6 compute units.

Your code could execute in less time if you chose a larger compute size, however, larger compute sizes consume more compute units per hour.