Implement Salesforce ERROR event for ECA workflows

Created on 9 June 2025, 3 days ago

Problem/Motivation

The Salesforce module dispatches a SalesforceEvents::ERROR event when API operations fail, but this event is not available in ECA workflows.

Users need to handle Salesforce errors in their workflows for:
- Error logging
- Notifications
- Conditional error handling
- Retry logic

Steps to reproduce

1. Create an ECA model
2. Look for Salesforce error events
3. No error event is available

Proposed resolution

Add a new ECA event plugin that fires when SalesforceEvents::ERROR is dispatched.

Remaining tasks

- [ ] Create event plugin
- [ ] Add to event definitions
- [ ] Implement token support
- [ ] Test with Salesforce errors

User interface changes

New event "Salesforce: API error occurred" will appear in ECA.

API changes

None.

Data model changes

None.

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States camoa

Live updates comments and jobs are added and updated live.
  • API addition

    Enhances an existing API or introduces a new subsystem. Depending on the size and impact, possibly backportable to earlier major versions.

Sign in to follow issues

Comments & Activities

  • Issue created by @camoa
  • πŸ‡ΊπŸ‡ΈUnited States camoa
  • πŸ‡ΊπŸ‡ΈUnited States camoa

    ERROR event implemented and committed.

    What it does:

    Catches Salesforce errors and makes the data available in ECA workflows. No more custom event subscribers needed for error handling.

    Available tokens:

    [error_message], [entity_id], [mapping_info], [operation_type], [failure_details], and others.

    Testing:

    Created ECA model with both push_fail and error events. Both fire correctly during failures. The error event gives you the detailed context you need for smart error handling.

    Files changed:

    SalesforceEventsDeriver.php and SalesforceEvent.php

    Now you can build error workflows directly in ECA without writing code.

  • πŸ‡ΊπŸ‡ΈUnited States camoa
    • camoa β†’ committed 493eac8c on 1.0.x
      Issue #3529276 by camoa: Implement Salesforce ERROR event for ECA...
Production build 0.71.5 2024