Loading

Salesforce Loyalty Management: Transaction Journal batch jobs fail, stall, or do not generate Loyalty Ledgers

Publiceringsdatum: Jun 19, 2026
Beskrivning

This article addresses Loyalty Management batch Apex processing problems where Transaction Journals run through a batch process but the job fails, stops processing additional records, runs slowly during data migration, or completes without generating Loyalty Ledger records. It also covers how to estimate batch size for high-volume runs (for example, consent update volume) and how to stop or deactivate a running batch job. 

Lösning

Cause 1: Loyalty Ledgers are not generated when Transaction Journals run through Batch Apex (known issue KI-62859).
1. From Setup, enter Loyalty Management in the Quick Find box, then select Loyalty Management Settings.
2. Enable the setting Query API (or Query API for multiple data spaces if your org uses multiple data spaces).
3. Save the setting.
4. Re-run the affected Loyalty Program Process batch for the Transaction Journals.

Cause 2: Batch job fails, stalls, or runs slowly during high-volume runs or data migration.
1. Lower the batch scope size. From Setup, enter Apex Classes in the Quick Find box, then select Apex Classes > Schedule Apex, or run the batch with a reduced scope value.
2. Set the batch size to 50000 or lower; for jobs that hit CPU or row-lock errors, set it to less than 50000 records per execution.
3. To estimate batch size for consent or transaction volume, divide total records to process by the number of executions you want, keeping each execution under the per-transaction limits.
4. From Setup, enter Apex Jobs in the Quick Find box, then select Apex Jobs to review the Status, Total Batches, and Number of Errors for each job.
5. If a job shows errors such as "APEX_CPU_TIME_LIMIT_EXCEEDED" or "UNABLE_TO_LOCK_ROW", reduce batch size further and stagger concurrent jobs so they do not run in the same transaction window.

Cause 3: Other automation in the same transaction consumes platform limits.
1. From Setup, enter Flows in the Quick Find box, then select Flows, and identify record-triggered flows on the Transaction Journal or related Loyalty objects.
2. Confirm no triggers, Data Processing Engine jobs, or rollup automations run synchronously during the batch DML.
3. Add a time delay or move dependent automation to a separate asynchronous job so activation and downstream processing do not run too closely together.

To stop or deactivate a running batch job:
1. From Setup, enter Apex Jobs in the Quick Find box, then select Apex Jobs.
2. Locate the job with Status of Queued, Preparing, or Processing.
3. Click Abort Job next to that row to stop it. A job that is already Completed or Failed cannot be deactivated because it is no longer running.
4. For a scheduled job, from Setup enter Scheduled Jobs in the Quick Find box, select Scheduled Jobs, then click Del next to the scheduled entry to remove the schedule.

Confirm the issue is resolved by re-running the Loyalty Program Process batch on a small set of Transaction Journals and verifying in Apex Jobs that Status is Completed with 0 errors, and that the corresponding Loyalty Ledger records are created for the processed members.

Knowledge-artikelnummer

005387399

 
Laddar
Salesforce Help | Article