Ingredients

Custom Metadata Type
Apex Trigger
Custom Objects
Approval Process

Department

Sales

Susannah St-Germain

Price Change Request App

by Susannah St-Germain

Directions

  1. Start by mapping out the current process for getting price change approvals. By creating your workflow and understanding the structure of your process first, you can clearly build out a data model and workflow that works best.

  2. Create two custom objects: Price Change Request and Price Change Request line items. There is a master-detail relationship between the Price Change Request object and the Price Change Request line item object.

    Here are the fields we track within each object:

    Fields we track
  3. Create a custom metadata type to store the approval hierarchy for your organization.

    Trailblazer Note

    Note: We have a complex organization with nonlinear reporting which is why we used custom metadata types. Your organization might be able to use a lookup field or hierarchical custom setting instead.

  4. Write a simple Apex trigger class to roll the correct approver onto the Price Change Request object so that when a sales rep fills out the form, the appropriate approver within the organization is automatically added to the record.

    Apex trigger class
  5. Using an approval process, create an automation that notifies the next person in the approval chain when a new price change request has been filed or when it’s their turn to take action on an approval.

Inspired to build your own app? Share your app recipe with the community.

Submit a Recipe

More App Recipes