Corey Babka 1 Comment

When reviewing an Account’s orders, it can be helpful to see the total amount of Orders or sales the Account has had.  By creating a custom currency field on the Account object and a flow to update the value each time an Order is completed, you can create a summary field without having to use one of the allowed Rollup fields.

Create a custom currency field:

  1. Navigate to Setup | Build | Customize | Accounts | Fields
  2. Click the New button in the Account Custom Fields & Relationship section
  3. Create a currency field with the following:
    1. Length: 16
    2. Decimal Places: 2
    3. Name and description
    4. Read Only Access
    5. Visible to all users that need to see the field value
    6. Add the custom field to current Account Layout(s)
  4. Save the new custom field

Create a Process Builder Flow to keep the summary field current:

  1. Navigate to Setup | Build | Create | Workflows & Approvals | Process Builder
  2. Click the New button in the right corner
  3. Give the process a Name and description
  4. Select “A record changes” to start the process from the drop-down list
  5. Click on + Add Object in the flow side of Process Builder

  1. Select Orders from the Object Drop Down and choose to start the process when a record is created or edited.

  1. Click Save.
  2. Click on + Add Criteria in the flow side of Process Builder.
  3. Give the criteria a name and choose Formula evaluates to true for the Executing Actions.
  4. Add the following formula to evaluate the Order Status field for the value of “Paid”
    • You can use another field and/or value by editing the formula
    • You can use a different date by editing the formula

  1. Click +Add Action under the Immediate Actions box.
  2. Give the Action a Name and choose the associated Account object as the record to be updated.
  3. Select No Criteria – Just update the records! for the criteria for updating records.
  4. Choose the field to update (e.g., the summary field on the Account).
  5. Select Formula for the Type.
  6. Add the following formula to update the summary field:
    • If you are using another order total field you can edit the formula

BLANKVALUE([Order].Account.Order_Summary_Field__c, 0) + [Order].TotalAmount

  1. Click the Save
  2. Select the Activate button in the top right corner.
  3. Test the process and make changes as needed.

Written by Becci Gearman

— One Comment —

Leave a Reply

Your email address will not be published. Required fields are marked *