Add "Salesforce Object Metadata" action

Created on 9 June 2025, about 1 month ago

Problem/Motivation

Dynamic workflows need access to Salesforce object metadata to determine available fields and their properties.

Use cases:
- Discover fields available on custom objects
- Check field properties before operations
- Build dynamic forms based on Salesforce schema
- Validate data before pushing to Salesforce

Steps to reproduce

1. Create an ECA model
2. Need to get field information for a Salesforce object
3. No action available to retrieve object metadata

Proposed resolution

Add an action that retrieves object metadata from Salesforce using the objectDescribe() method.

Remaining tasks

- [ ] Create action plugin
- [ ] Call objectDescribe() API method
- [ ] Parse and structure metadata
- [ ] Store field information in tokens
- [ ] Test with standard and custom objects

User interface changes

New action "Get Salesforce object metadata" 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.
Sign in to follow issues

Comments & Activities

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

    Get Salesforce Object Metadata action implemented and committed.

    What it does: Retrieve comprehensive metadata about any Salesforce object type including field definitions, properties, relationships, and capabilities. Built with performance optimization to handle large objects efficiently.

    Key features:

    • Complete object metadata retrieval using Salesforce objectDescribe API
    • Performance-optimized field filtering system with smart defaults
    • Configurable inclusion/exclusion of field types (address, geocode, system fields)
    • Optional picklist value retrieval with memory usage warnings
    • Field categorization (required, updateable, createable, relationships)
    • Record type information and object capabilities

    Available tokens:

    • Object info: [token:object_type], [token:label], [token:key_prefix]
    • Capabilities: [token:is_createable], [token:is_updateable], [token:is_deletable]
    • Field data: [token:field_count], [token:field_names], [token:required_fields]
    • Field details: [token:fields:Email:type], [token:fields:Email:label], [token:fields:Email:required]
    • Picklists: [token:picklist_fields:Status], [token:picklist_fields:Status:New:label]
    • Relationships: [token:relationship_fields:AccountId:references]

    Performance options:

    • Include picklist values: Default OFF - prevents massive country/state data bloat
    • Include address fields: Default OFF - excludes Street, City, State, Country fields
    • Include geocode fields: Default OFF - excludes Latitude, Longitude fields
    • Include system fields: Default OFF - excludes CreatedDate, ModifiedDate audit fields
    • Include relationship fields: Default ON - includes AccountId, OwnerId lookup fields

    Testing: Successfully tested with Contact object. Reduced from 65 fields to 31 fields (52% reduction) with default filtering. Eliminated 100K+ character data bloat. All token access confirmed working.

    Files added/changed:

    • src/Plugin/Action/SalesforceObjectMetadata.php (new action)
    • config/schema/salesforce_eca.schema.yml (configuration schema)

    This completes the final roadmap item for v1.0.0. All planned features are now implemented and performance optimized.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024