jeffersongoncalves/laravel-salesforce
A Laravel package that brings Salesforce into your app with OAuth authentication, a fluent REST API client, and Eloquent-style models for querying, creating, and syncing Salesforce objects via SOQL, all with simple configuration and Laravel-native conventions.
Architecture fit
Integration feasibility
api), IP relaxation, and the org's login policy..env committed anywhere, and not in the database. Note that the security token is appended to the password; mishandling that concatenation is a common source of invalid_grant.nextRecordsUrl / queryMore beyond the 2,000-record batch), Bulk API 2.0 for volume writes, Composite API for multi-object transactions, retry/backoff on 5xx and REQUEST_LIMIT_EXCEEDED, structured mapping of Salesforce error codes (INVALID_FIELD, MALFORMED_QUERY, ENTITY_IS_DELETED), and any mocking/faking helper for tests. Assume you build the test double yourself.Technical risk
invalid_grant / lockout noise. Needs a cache lock around token acquisition.ALL OR NONE behavior, partial-success handling in multi-record calls).Key questions for the maintainer/vendor
Cache::lock/atomic operations to prevent concurrent re-auth storms?Sforce-All-Or-None / partial-success handling supported for multi-record create/update?Stack fit
Http facade is the natural home; the package idiom (service provider + config + facade) maps cleanly to Laravel's container and should be bound to an interface (SalesforceClientInterface) so it can be swapped or faked in tests.Migration path
Sforce calls from controllers.Http:: calls, wrap the existing code behind the same interface first, then swap the implementation; keeps the change reversible.Compatibility
Sequencing
nextRecordsUrl pagination if reads exceed one batch.Maintenance
Support
Scaling
Failure modes to design for
invalid_grant on password rotation or security-token mismatch → hard outage for all consumers; needs pre-rotation dual-secret support or a maintenance window.INVALID_SESSION_ID mid-flight on org maintenance or session revocation → in-flight job failure; retries must be idempotent to avoid duplicate upserts.REQUEST_LIMIT_EXCEEDED → cascading queue backlog; add backoff, a circuit breaker, and a dead-letter queue rather than tight retries.AllOrNone is unset → data drift requiring a reconciliation job.Ramp-up
invalid_grant. Without it, the first auth incident consumes the team's goodwill for the package.How can I help you explore Laravel packages today?