---
schema_version: "1"
id: 15276591ad79b2be4fd4836d7e550c1773b7f2ea8fd890733d1ef5b9321d47cd
title: Data Processing Engine Definition to Calculate Purchase Credit and Bonus (Example)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/dpe_use_case.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.dpe_use_case.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d6b2031fa1b2c2c19c4e3fa0347af496ab0508025a8404a6aeaa81ca0e2c946d
description: Cloud Kicks provides a 5% year-end purchase credit to accounts based on their total effective orders that ended between January 1 and November 30. The salespeople associated with these orders are also rewarded with 0.5% of the total order amount as a bonus. The purchase credit and bonus are granted to the accounts and salespeople on December 1 each year.
products:
  - Cross Cloud
release: "264"
---
# Data Processing Engine Definition to Calculate Purchase Credit and Bonus (Example)

Cloud Kicks provides a 5% year-end purchase credit to accounts based on their total effective orders that ended between January 1 and November 30. The salespeople associated with these orders are also rewarded with 0.5% of the total order amount as a bonus. The purchase credit and bonus are granted to the accounts and salespeople on December 1 each year.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=ind.dpe_editions.htm&amp;release=264.0.0&amp;type=5" title="Review the supported editions and availability for Data Processing Engine (DPE).">View supported editions</a>.</td></tr></tbody></table>

The Cloud Kicks admin uses a Data Processing Engine definition to calculate the account purchase credit and the sales bonus. The purchase credit is written back to a Purchase Credit Amount custom field on the Account object. The bonus is written back to the Salesperson Bonus custom object along with the user ID and email of the salesperson.

Here's how the Data Processing Engine definition is designed:

![Flow of how the Data Processing Engine definition works.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-data_processing_engine-264-0-0-production-enus/80e06924-e6c0-4b82-81cf-e99ccd77d857/data_processing_engine/images/dpe_example_design.png)

- **[Create a Definition to Calculate Purchase Credit and Reward](https://help.salesforce.com/s/articleView?id=ind.dpe_use_case_example.htm&release=264.0.0&type=5)**  
    The Cloud Kicks admin created and activated a Data Processing Engine definition to calculate and update the purchase credit for accounts based on their orders. The definition is also used to calculate the bonuses to be awarded to the salespeople associated with the orders.
- **[Run the Definition to Update Purchase Credit and Bonus](https://help.salesforce.com/s/articleView?id=ind.dpe_example_flow.htm&release=264.0.0&type=5)**  
    An admin creates a flow to run the activated Data Processing Engine definition. The admin wants to schedule the flow to write back the results to the target objects and fields automatically on December 1, every year.