DATA-ARCHITECT practice question 21 of 35

A custom pricing engine for a Salesforce customer has to be decided by factors with the following hierarchy: State in which the customer is located…

Full set: 257 questions
A custom pricing engine for a Salesforce customer has to be decided by factors with the following hierarchy: State in which the customer is located City in which the customer is located if available Zip code in which the customer is located if available Changes to this information should have minimum code changes What should a data architect recommend to maintain this information for the custom pricing engine that is to be built in Salesforce?
Answer options
A: Create a custom object to maintain the pricing criteria.
B: Assign the pricing criteria within customer pricing engine.
C: Maintain require pricing criteria in custom metadata types. Correct answer
D: Configure the pricing criteria in price books.
Correct Answer:
C. Maintain require pricing criteria in custom metadata types.
Explanation

Custom Metadata Types are the ideal solution for storing application configuration data, such as hierarchical pricing rules. They are deployable from sandboxes to production, can be updated by administrators without code changes, and are cached by the platform, offering superior performance. Accessing them via SOQL does not count against governor limits, which is critical for a frequently used pricing engine. This approach directly meets the requirement for a solution that minimizes code changes for future updates to the pricing criteria.

Why Incorrect

A. A custom object would work, but it is less performant for configuration data and consumes SOQL limits, making it less ideal than Custom Metadata Types.
B. Hard-coding criteria within the engine is an anti-pattern that directly contradicts the requirement to minimize code changes for updates.
D. Price Books are designed to manage product prices, not complex, hierarchical, location-based pricing rules. This would be a misuse of the standard feature.

References

1. Salesforce Developer Documentation, "Custom Metadata Types". The documentation states, "Custom metadata is the best solution for... application configurations." It also highlights benefits like being packageable, deployable, and not counting against SOQL query limits.

2. Salesforce Architects, "Application Architecture for Enterprise Scale," (architect.salesforce.com), Section: Customization vs. Configuration. This guide advocates for using declarative, configurable solutions like Custom Metadata Types to reduce maintenance overhead.

3. Salesforce Developer Documentation, "Custom Metadata Types vs. Custom Settings Data". This page explains that for data that is part of an application package and needs to be migrated, Custom Metadata Types are the preferred solution.

Scroll to Top