SK SKYVVA Documentation

How to Reprocess Outbound Messages Using Queueable Apex Retry

Overview

This guide explains how to reprocess outbound messages using Queueable Apex Retry in SKYVVA with Interface API Version V3.

When outbound messages fail, users can manually reprocess the affected root/API messages. SKYVVA uses Queueable Apex to process the selected root message and its child messages.

For each selected root/API message, SKYVVA creates one initial Queueable Apex job, regardless of the number of child messages belonging to that root.

If Queueable Apex encounters a supported Salesforce governor-limit error, such as Apex heap size too large, SKYVVA automatically retries the affected messages using smaller processing chunks.

This guide explains how to configure the outbound interface, reprocess failed messages, understand automatic retry behavior, and verify the results in SKYVVA and Salesforce.

Outbound Message Reprocessing Flow

image

1. Why Use Queueable Apex Retry?

When reprocessing an outbound root message containing multiple child messages, Salesforce may encounter governor-limit errors if the processing transaction requires too much memory.

For example, a root message containing eight child messages may fail when Queueable Apex attempts to process all eight messages together.

Queueable Apex Retry helps recover from supported heap-size errors by automatically reducing the processing chunk size and retrying the affected messages.

Benefits:

2. Prerequisites

Before reprocessing outbound messages, ensure that:

  1. A SKYVVA Integration has been created.
  2. An outbound interface has been configured with Interface API Version V3.
  3. The outbound interface uses Outbound Processing Behavior = QUEUABLE.
  4. Outbound root/API messages and their child messages exist in SKYVVA.
  5. The messages requiring reprocessing have been identified.
  6. The user has permission to reprocess messages and view Salesforce Apex Jobs.

3. Configure the Outbound Interface

Before reprocessing outbound messages, verify that the interface uses Queueable Apex processing.

Step 1: Open the Outbound Interface

  1. Log in to Salesforce.
  2. Open the SKYVVA application.
  3. Navigate to the integration containing the outbound interface.
  4. Open the outbound interface configuration.

For example:

ConfigurationValue
IntegrationReprocessing_Message
Outbound InterfaceAccount_Out_V3
Interface API VersionV3

Step 2: Configure Outbound Processing Behavior

  1. Open the outbound interface Details tab.
  2. Locate the Outbound Processing Behavior field.
  3. Set the value to QUEUEABLE.
  4. Save the interface configuration.
image

Important: The interface must use Interface API V3 with QUEUEABLE processing behavior for the reprocessing scenario described in this guide.

4. Manually Reprocess Outbound Messages

Manual reprocessing allows users to restart processing for failed outbound root/API messages.

Step 1: Open the Messages Section

  1. Open the SKYVVA message monitoring page.
  2. Navigate to the Messages section.
  3. Locate the integration and outbound interface.
  4. Find the failed root/API message that needs to be reprocessed.

For example:

Step 2: Select the Root/API Message

  1. Locate the failed root/API message.
  2. Expand the root message to review its child messages.
  3. Select the checkbox next to the root message.

In this example, one root/API message contains eight child messages.

Important: Select the root message to reprocess the message group. SKYVVA creates one initial Queueable Apex job for the selected root rather than creating one initial job for every child message.

Step 3: Click Reprocess

  1. After selecting the root message, click Reprocess.
  2. SKYVVA starts the outbound reprocessing operation.
  3. One initial Queueable Apex job is created for the selected root message.
  4. The Queueable Apex job processes the messages belonging to that root.
image

Expected result:

5. How Queueable Apex Reprocessing Works

Queueable Apex reprocessing is based on the selected root/API message.

Example: One Root Message with Eight Child Messages

Assume a failed outbound root message contains eight child messages.

MessageDescription
Root/API MessageThe parent message selected for reprocessing
Child MessagesEight messages belonging to the root
Initial Queueable Apex JobOne job created for the selected root
Processing ScopeEight child messages

When the user clicks Reprocess:

  1. SKYVVA identifies the selected root/API message.
  2. SKYVVA creates one initial Queueable Apex job.
  3. The Queueable Apex job attempts to process the eight child messages.
  4. If processing succeeds, the messages are completed.
  5. If a supported Apex heap-size error occurs, SKYVVA automatically reduces the processing chunk size.
  6. The affected messages are retried in smaller chunks.
  7. Processing continues until the messages complete or retry is no longer possible.

Automatic Retry Processing Structure

image

One root/API message containing eight child messages starts one initial Queueable Apex job. When a supported heap-size error occurs, SKYVVA automatically retries the affected messages using smaller chunks.

Example of Automatic Chunk Reduction

The following example illustrates how processing may be divided into smaller chunks.

Processing AttemptChunk SizeResult
Initial processing8 messagesApex heap-size error
Automatic retry4 + 4 messagesRetry using smaller chunks
Further retry, if neededSmaller chunksContinue processing
Final processingSuccessfully processed messagesCompleted

Note: The chunk sizes shown above are examples. The actual chunk size reduction and number of retry attempts depend on the SKYVVA implementation.

Important: Users do not need to click Reprocess again when a supported automatic retry is triggered. SKYVVA handles the retry during Queueable Apex processing.

6. Verify Queueable Apex Jobs in Salesforce

After starting reprocessing, users can monitor the Queueable Apex jobs in Salesforce.

Step 1: Open Apex Jobs

  1. Open Salesforce Setup.
  2. Enter Apex Jobs in the Quick Find search box.
  3. Select Apex Jobs.
  4. Locate the Queueable Apex jobs created during reprocessing.

Step 2: Review Queueable Apex Jobs

Check the following information:

FieldExpected Information
Job TypeQueueable
Apex ClassIServiceBatchReprocess
StatusCompleted or Failed
Extended StatusError details, if available
image

Step 3: Understand the Job Results

In the example, some Queueable Apex jobs show Failed with an error such as:

Apex heap size too large: 39021624

Other Queueable Apex jobs show Completed.

This is consistent with the automatic retry behavior:

  1. A Queueable Apex job encounters a supported heap-size error.
  2. SKYVVA initiates retry processing with smaller chunks.
  3. Subsequent processing attempts may complete successfully.
  4. The original failed Queueable Apex job remains visible in Salesforce Apex Jobs history.

Important: A Failed Apex Job does not necessarily mean that the entire root/API message remains failed. Always verify the final message status in SKYVVA.

7. Verify the Reprocessed Messages in SKYVVA

After reprocessing, return to SKYVVA to verify the final processing results.

Step 1: Open the Messages Section

  1. Open the SKYVVA message monitoring page.
  2. Locate the integration and outbound interface.
  3. Refresh the message list.
  4. Review the messages that were reprocessed.

Step 2: Check the Message Status

After successful reprocessing, the message status changes to Completed.

In the provided example, the Messages section shows successfully processed outbound messages with the comment:

Status=OK, Status Code:200

image

Step 3: Verify the Final Result

Confirm that:

Expected result: Even if an earlier Queueable Apex job encounters a supported heap-size error, the affected messages may complete successfully through automatic retry.

8. Troubleshooting

Case 1: Apex Heap Size Too Large

Problem: A Queueable Apex job fails with an Apex heap-size error.

Expected behavior: SKYVVA automatically retries the affected messages with a smaller chunk size when the error is supported by the retry mechanism.

Verification steps:

  1. Open Salesforce Apex Jobs.
  2. Locate the failed Queueable Apex job.
  3. Check whether additional Queueable Apex jobs were created.
  4. Return to SKYVVA Messages.
  5. Verify the final message statuses.

Case 2: Messages Remain Failed After Reprocessing

Problem: Some outbound messages remain Failed after reprocessing.

Possible causes:

Action:

  1. Open the failed message.
  2. Review the error details.
  3. Correct the underlying issue.
  4. Reprocess the root/API message again when appropriate.

Case 3: Queueable Apex Job Shows Failed, but Messages Are Completed

Problem: Salesforce Apex Jobs contains Failed jobs, while SKYVVA Messages shows Completed.

Explanation: An earlier Queueable Apex attempt may have failed due to a heap-size error, while subsequent automatic retry attempts completed successfully.

Action: Verify the final status of the root and child messages in SKYVVA. Do not rely only on the status of the original Apex job.

9. Summary

Queueable Apex Retry allows users to reprocess outbound messages using Interface API V3 with Outbound Processing Behavior = QUEUEABLE.

When a user selects one root/API message and clicks Reprocess, SKYVVA creates one initial Queueable Apex job to process the messages belonging to that root.

If a supported Apex heap-size error occurs, SKYVVA automatically retries the affected messages using smaller processing chunks.

Users can monitor Queueable Apex jobs in Salesforce Setup and verify the final message results in SKYVVA.

Key point: One root/API message creates one initial Queueable Apex job, regardless of the number of child messages. Automatic retry may create additional jobs to process smaller chunks when necessary.

Open this article in the interactive viewer →