This article explains why the Salesforce Pricing Action fails with an invalid tag attribute name key error and how to align the context definition with the pricing procedure to resolve it. Customers describe this as: "We couldn't refresh the prices. Ask your Salesforce admin for help. Invalid tag attribute name key: [PriorAttributeValue__c, Custom_Sales_Price__c, StandardPrice__c]" and "Invalid tag attribute name key: [Override_Pricing_Structure__c, Has_Pricing_Structure__c, AccountDiscount__c, Apply_To_All__c, Non_Discountable__c] when invoking pricing procedure from a flow". The error appears in two scenarios: (1) calling the Salesforce Pricing Action from a Flow, and (2) clicking Reprice All on a Revenue Cloud quote or order. Trigger conditions: the active Pricing Procedure was built or copied from the Revenue Management Default Pricing Procedure expression set template and references custom node attributes (for example, on SalesTransactionItem) that were added by extending the standard SalesTransactionContext context definition. The error is raised when the bracketed custom field API names listed in the message either (a) have no matching context tag, (b) have a context tag whose data type (STRING, NUMBER, BOOLEAN) does not match the data type used in the pricing procedure expression set, or (c) are not mapped under QuoteEntitiesMapping or OrderEntitiesMapping in the active context definition. Affects Revenue Cloud (Core) orgs on Summer '24 and later releases, in Enterprise, Performance, and Unlimited editions with Salesforce Pricing and Revenue Cloud licenses. Users require the Salesforce Pricing Design Time User and Context Service Admin permission sets to remediate.
Follow these steps in order. Each cause must be ruled out before moving on.
Cause 1: Custom attribute is missing from the active context definition
1. Navigate to Setup > Quick Find > Context Definitions and open the custom definition that extends SalesTransactionContext (the one selected on your Pricing Procedure).
2. On the Custom Definitions tab, click the definition name, then click Edit.
3. Under the SalesTransactionItem node, confirm that an attribute exists for every API name listed in the error message brackets (for example, [PriorAttributeValue__c], [Custom_Sales_Price__c], [Override_Pricing_Structure__c]).
4. For each missing attribute, click Add Attribute, set Name to match the custom field API name exactly, and set Direction to INPUT OUTPUT.
5. Set the attribute Data Type to match the field type on the source object: STRING for Text, NUMBER for Number/Currency/Percent, BOOLEAN for Checkbox.
6. Save your changes.
Cause 2: Attribute data type does not match the pricing procedure tag
1. Navigate to Setup > Quick Find > Context Definitions and open the active custom definition.
2. For each attribute named in the error, verify that the Data Type matches how the attribute is consumed in the Pricing Procedure expression set (for example, a BOOLEAN tag like [Non_Discountable__c] cannot be assigned from a STRING attribute).
3. If a mismatch exists, edit the attribute to the correct data type, then update the corresponding context tag on the attribute. Do not assign multiple tags to a single attribute.
4. Save your changes.
Cause 3: Attribute is not mapped to the source object field
1. On the active context definition, click the Map Data tab.
2. From the dropdown for QuoteEntitiesMapping, select Edit SObject Mapping, select Mark as Default, and click Map.
3. On the Context Mapping builder, link each custom attribute on the Structure tile to its corresponding field on the QuoteLineItem [QuoteLineItem] or Quote [Quote] object on the Connect Objects tile (for example, map Custom_Sales_Price__c to QuoteLineItem.Custom_Sales_Price__c).
4. Repeat for OrderEntitiesMapping, mapping each attribute to the matching OrderItem [OrderItem] field.
5. Save the mapping.
Cause 4: Context definition or pricing procedure version is not active
1. Navigate to Setup > Quick Find > Context Definitions, open the custom definition, and from the dropdown select Activate. The Status field must read Active.
2. Navigate to App Launcher > Pricing Procedures and open the pricing procedure used by Salesforce Pricing.
3. Click Edit and confirm the Context Definition field references the active custom definition. Confirm the Start Date Time is on or after the Effective From of the context definition.
4. Open the latest pricing procedure version and click Activate.
Cause 5: Salesforce Pricing setup still references an old procedure
1. Navigate to Setup > Quick Find > Salesforce Pricing Setup.
2. Under Set Up Salesforce Pricing, set Pricing Procedure to the activated procedure from the previous step.
3. Save your changes.
Confirm the issue is resolved by opening the affected quote, clicking Reprice All, and re-running the Flow that invokes the Salesforce Pricing Action. The error "Invalid tag attribute name key" must no longer appear and the prices on the quote lines must refresh successfully.
005385143

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.