Corey Babka 8 Comments

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


    • Yes, you should be able to just repeat the same process for a separate field. This would be like having multiple roll-up fields (I think there’s a limit that way and you’re of course limited to certain objects that have that relationship). Here, because you’re using a typical field and using a process to update, you’re only limited by the number of processes (which depends on your version). Hope this helps!

  1. Hi,

    thanks a lot for this article. I´m trying to rebuild this on our org, but I have problems on step 16. You´re using the field “Order_Summary_Field__c” for the formula. Do I have to create this or what kind of field is this?

    Thanks a lot. Looking forward to an answer.

    • Yes, it is a custom field so that would have to be created. At the top of blog, see the first section called “Create a Custom field” as we have to build the “container” first before we start populating the data. Hope that helps!

  2. I see, thanks a lot for the quick help! I thought the “container” is the field “Order this year”, that you used for the formula, but I guess I have to create 2 custom fields?

    1. Order this year
    2. Order Summary Field

    or am I wrong with this ? Thanks a lot, great content!

    • No, actually it should just be one field, which is the Order Summary. The “Order this year” is not a field, but more of a formula that’s moving to true or false (Step 10 above). I hope that makes sense. Be sure to also check out our Youtube page where this video is.

Leave a Reply

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