Skip to main content
Build the future with Agentforce at TDX in San Francisco or on Salesforce+ on March 5–6. Register now.

Run and Monitor Data Processing Engine Definitions

Activate the Flow to Process Transaction Journals

Sarah Wang, a Cloud Kicks Inner Circle member, orders a product for $50. There’s an active order for this purchase that hasn’t been processed yet.

An Order record with details of the purchase.

What happens next? When you run the DPE, it creates a transaction journal, which in turn triggers relevant loyalty program processes.

In this scenario, Linda processes the transactions using the Run Program Process for Transaction Journal loyalty flow action. This flow is already created for you in your Developer Edition org.

Navigate to the flow to activate it.

Note

You need to activate this flow in the special Developer Edition org you’re using. The loyalty program process and challenges can only run if this flow is active, so it’s important to complete each step.

  1. If you’re on the DPE builder page, click Back. Otherwise, click Setup, and select Setup.
  2. Enter Flows in the Quick Find box, and under Process Automation, select Flows.
  3. Find and select the Run Loyalty Program Process flow.
  4. Click Activate.

The Flow Builder page where you activate the flow.

Now the relevant loyalty program processes can run transaction journals for loyalty rewards.

Modify the Flow That Runs the DPE Definition

You can run a DPE definition either from the builder or using a flow. Typically, admins run a definition from the builder to test and validate writeback results using input variables provided at the time of the run.

At Cloud Kicks, orders are loaded into the system once a day. So for the DPE to process eligible orders, Linda creates a scheduled flow that runs the definition daily. The Run Create Transaction Journals From Orders DPE flow invokes the definition and writes back results at the end of each day.

The flow runs based on the schedule you set. When it runs, the DPE definition creates transaction journals and updates the order status for all relevant transactions.

Note

This flow has been partially created for you. In this step, you add the remaining elements to complete the flow.

Here’s how you navigate to the flow and add the remaining details to process the order.

  1. If you’re on the Flow Builder page, click Back. Otherwise, click Setup , and select Setup. Enter Flows in the Quick Find box, and select Flows.
  2. From the Flows list view, find and open the Run Create Transaction Journals From Orders DPE flow.
  3. Below the Loyalty Program Get Records element, click Add Element .
  4. Select Action.
  5. Search for and select Create Transaction Journals From Orders-Loyalty.
  6. Add the following details.
    • Label: Create Transaction Journals from Orders
    • API Name: Auto-populates with Create_Transaction_Journals_from_Orders
    • JournalSubtypeId: {!Journal_Subtype.Id}
    • JournalTypeId: {!Journal_Type.Id}
    • PartnerId: {!Partner.Id}
    • Program_ID: {!Loyalty_Program.Id}
    • StartDate: 01/01/2024

The Action element with details of the input variables required for the DPE definition.

  1. Save your work
  2. Click Activate.

The flow builder page where you add elements and activate the flow.

The flow runs at the scheduled time and processes eligible transactions. Sarah’s order is in the activated but pending state, making it an eligible transaction for the DPE definition.

Run the flow to create a transaction journal for the order and process rewards.

  1. Click Debug.
  2. Deselect Debug pause element behavior.
  3. Click Run.

The Debug flow window where you run a scheduled flow to test it.

The flow invokes the DPE definition, which begins processing the data. It takes a few minutes to finish and create the transaction journal. You can check the status using Monitor Workflow Services.

Monitor the DPE Definition

After running the flow or the DPE definition, a batch job record is automatically created that tracks the status of the run.

  1. From Setup, in the Quick Find Box, enter Monitor Workflow Services, and then select it.
  2. Click the Create Transaction Journals From Orders job to view the details of the run.

The Monitor Workflow Services page where you can track details of the DPE run.

  1. Click the Tasks tab to view details of the tasks.

Refresh the list to view the latest task status. Here’s how the tasks look in the completed state.

The Create Transaction Journals From Orders job where you can find details of each task in the definition.

When each task changes to Completed, navigate back to Loyalty Management to view the transaction journal.

  1. Click App Launcher, and select Loyalty Management.
  2. Ensure that the All Loyalty Programs list view is displayed.
  3. In the Program Name column, click Cloud Kicks Inner Circle.
  4. In the Cloud Kicks Inner Circle program record, click the Members And Partners tab.
  5. In the Loyalty Program Members related list, select CL005.
  6. In the Transaction Journals related list, click the newly created record.

The Transaction Journal record where you can review the ledger entries.

You’ll see two loyalty ledgers associated with this transaction journal. Sarah’s awarded loyalty points for her purchase based on the rules defined in the loyalty program process.

At the same time, the Order Status Copy field in the order changes to Processed. To view the order, navigate to Orders from the App Launcher and select 00000101.

The Order record with details of the purchase.

The change in order status ensures this order isn’t processed again during the next DPE run.

In Conclusion

You successfully created a DPE definition that generates transaction journals from orders. You added the data sources required to bring in data, and added join, filter, and formula nodes to transform the data. Finally, you used writeback object nodes to load the transformed results to target objects. You also tested transaction journal creation from a pending order.

Linda is excited to see the definition running smoothly. Integrating different processes ensures an excellent experience for Cloud Kicks employees, and most importantly, the customers. Thanks to DPE, complex data transformations are fast and easy.

Resources

Salesforce ヘルプで Trailhead のフィードバックを共有してください。

Trailhead についての感想をお聞かせください。[Salesforce ヘルプ] サイトから新しいフィードバックフォームにいつでもアクセスできるようになりました。

詳細はこちら フィードバックの共有に進む