All articlesArticle

Salesforce CPQ Custom Label

Salesforce CPQ is packed with powerful features, but not all of them get the spotlight they deserve. One such hidden gem is the ability to assign custom labels to groupings within your quote templates—without ever changing the template itself. This subtle feature can make your documentation clearer, better tailored to your organization’s needs, and even support more advanced customizations. Let’s dive into how it works and why you might want to leverage it.

Default Grouping and Its Limitations

By default, when grouping products in a Salesforce CPQ quote template—such as using the Product Family name—the displayed label is simply the field value itself. While this can suffice in many cases, there are times when you need more descriptive or client-friendly headings without overhauling your entire template structure.

Creating Dynamic Custom Labels: Step-by-Step

  1. To apply custom group labels, you can use a specific label field that CPQ recognizes. Here’s how you can set this up:Create a Formula Field:
  • Navigate to the Quote Line object.
  • Add a new formula field (e.g., Product Family Name Label).
  • Set the return type to Text (since this will be your label).
  1. Define Your Logic:
  • Use a CASE statement or custom formula logic to conditionally assign custom labels.
  • For example, map Marketing Platform License to Marketing Platform License - Custom Label, Creativity Suite License to Creativity Suite License - Custom Label, and so on.
  • For any unmatched values, default to the original Product Family name.
  1. Field Naming Conventions:
  • CPQ looks for a field with the exact API name pattern: [FieldName]Label (no extra underscores or spaces).
  • Avoid typos in your field and API names to ensure proper functionality.
  1. Visibility and Layout:
  • Typically, this formula field serves as a back-end value for CPQ templates. You can safely remove it from page layouts if you don’t want end-users to see it directly.

Preview and Results

Once set up, generate a quote document preview. Your custom group labels will appear in the headings, even though the underlying grouping criteria remain unchanged. This enables you to:

  • Present client-facing documentation more clearly.
  • Dynamically adjust labels based on logic referencing other quote or quote line fields.
  • Manage advanced scenarios like differentiating label presentation across price books or market segments.

Additional Use Cases and Reference

  • The utility of this feature extends even further. Salesforce documentation mentions that default line groupings are sorted based on the addition order to the quote. By leveraging custom label fields, you gain another lever to enhance grouping, sorting, and overall presentation. Furthermore, label fields support advanced sorting options and fine-tuned template control, even if Salesforce’s help docs offer only limited coverage on this topic.

Real-World Value

This approach recently proved invaluable for a client needing hyper-specific template adjustments. With custom label fields, we achieved the desired outcome efficiently—no major template overhauls required.

While Salesforce CPQ documentation may not make a big deal of this feature, it’s a simple tweak that can have an outsized impact on both your workflow and the documents your customers see.