Skip to main content
Version: 1

Stop Transaction

  • Category

    • Orchestration
    • Integration
    • Transactions
  • Flow Icon

Overview

The Stop Transaction component closes a Plinqx transaction from Flow.
Use it to record the final outcome of an integration or process step—optionally capturing the HTTP status code and the response body—so the transaction is completed and auditable.


Inputs

  1. statusCode (Optional)
    An HTTP status code to associate with the transaction (e.g., 200, 400, 500).

  2. responseBody (Optional; recommended when statusCode is provided)
    A string containing the HTTP response body (typically JSON) returned by the external system.

Provide either or both inputs as applicable. If you omit them, the transaction is simply marked as stopped without HTTP details.


Outputs

  1. success
    True if the transaction was stopped successfully; otherwise false.

  2. message
    A human-readable status or error message.


Behavior

  • Completes the currently active Plinqx transaction context and persists any provided HTTP outcome details:
    • statusCode → stored as the transaction’s final HTTP code.
    • responseBody → stored for traceability and diagnostics.
  • Designed to be the final step in a transaction-oriented Flow that began with Start Transaction.

Best Practices

  • Always stop a transaction you started to keep logs complete and searchable.

  • Include statusCode and responseBody whenever you have an external-system result; this makes audit and troubleshooting easier.

  • Pair with Start Transaction to frame the operation and provide related record context.



Troubleshooting

  • success = false → Check message for validation or subscription errors.

  • Missing outcome data → If you expected status/response, ensure your integration populated statusCode/responseBody before calling Stop Transaction.


Example Scenario – Logging Integration Outcomes
Scenario Overview:

A Salesforce org integrates with an external invoicing system through Flow. Each time Salesforce sends invoice data to the external system, the integration is wrapped in a Plinqx transaction. When the external system responds, the Flow must record the outcome—successful or failed—so that the transaction is auditable for future troubleshooting.

Implementation with Stop Transaction Component:

Flow Setup for Invoice Sync:
Create a Flow that sends invoice data to the external system via HTTP callout or middleware. Use Start Transaction at the beginning to establish a transaction context.

Adding Stop Transaction Component:
At the end of the Flow, incorporate the Stop Transaction component to finalize the transaction and capture the external system’s response.

Configuring Input (Successful Response):

  • statusCode is set to 200.

  • responseBody is set to the JSON response from the invoicing system, for example:

    {"status":"ok","id":"INV-10045"}

Executing Stop Transaction (Success):
The component stores the outcome and marks the transaction as complete.

Outputs:

  • success = true

  • message = Transaction stopped

Configuring Input (Error Response):

  • statusCode is set to 500.

  • responseBody is set to the error payload from the invoicing system, for example:

    {"error":"Upstream timeout","traceId":"62f4a..."}

Executing Stop Transaction (Failure):
The component logs the error details and finalizes the transaction for auditability.

Outputs:

  • success = true

  • message = Transaction stopped

Utilizing Results:
The Flow can continue with error handling—such as sending an alert or retrying—based on the stored transaction details. All responses remain traceable for audits and debugging.