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.
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.
- If you’re on the DPE builder page, click . Otherwise, click , and select Setup.
- Enter
Flows
in the Quick Find box, and under Process Automation, select Flows.
- Find and select the Run Loyalty Program Process flow.
- Click Activate.
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.
Here’s how you navigate to the flow and add the remaining details to process the order.
- If you’re on the Flow Builder page, click . Otherwise, click , and select Setup. Enter
Flows
in the Quick Find box, and select Flows.
- From the Flows list view, find and open the Run Create Transaction Journals From Orders DPE flow.
- Below the Loyalty Program Get Records element, click .
- Select Action.
- Search for and select Create Transaction Journals From Orders-Loyalty.
- 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
- Label:
- Save your work
- Click Activate.
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.
- Click Debug.
- Deselect Debug pause element behavior.
- Click Run.
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.
- From Setup, in the Quick Find Box, enter
Monitor Workflow Services,
and then select it.
- Click the Create Transaction Journals From Orders job to view the details of the run.
- 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.
When each task changes to Completed, navigate back to Loyalty Management to view the transaction journal.
- Click , and select Loyalty Management.
- Ensure that the All Loyalty Programs list view is displayed.
- In the Program Name column, click Cloud Kicks Inner Circle.
- In the Cloud Kicks Inner Circle program record, click the Members And Partners tab.
- In the Loyalty Program Members related list, select CL005.
- In the Transaction Journals related list, click the newly created record.
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 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.