PHPackages                             pipetic/salesforce - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. pipetic/salesforce

ActiveLibrary[API Development](/categories/api)

pipetic/salesforce
==================

Salesforce adapter for the Pipetic platform. Provides OAuth 2.0 authentication and ETL data sync for multi-tenant SaaS applications.

049PHP

Since Mar 14Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/pipetic/salesforce)[ Packagist](https://packagist.org/packages/pipetic/salesforce)[ RSS](/packages/pipetic-salesforce/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

pipetic/salesforce
==================

[](#pipeticsalesforce)

Salesforce adapter for the [Pipetic](https://github.com/pipetic) platform. Provides OAuth 2.0 authentication and ETL data synchronisation between multi-tenant SaaS applications and Salesforce.

Requirements
------------

[](#requirements)

- PHP ≥ 8.0
- Composer

Installation
------------

[](#installation)

```
composer require pipetic/salesforce
```

Configuration
-------------

[](#configuration)

Add your Salesforce OAuth credentials to your application configuration:

```
// config/services.php (Laravel) or equivalent
'salesforce' => [
    'oauth' => [
        'client_id'     => env('SALESFORCE_CLIENT_ID'),
        'client_secret' => env('SALESFORCE_CLIENT_SECRET'),
        'redirect_uri'  => env('SALESFORCE_REDIRECT_URI'),
    ],
],
```

Usage
-----

[](#usage)

### OAuth 2.0 Authentication

[](#oauth-20-authentication)

```
use Pipetic\Salesforce\Client\Actions\SalesforceCreateClientDataNode;

// 1. Create a client bound to a DataNode (stores the access token)
$client = SalesforceCreateClientDataNode::run($dataNode);

// 2. Redirect the user to Salesforce login
$authorizationUrl = $client->getAuthenticator()->getAuthorizationUrl();
header('Location: ' . $authorizationUrl);

// 3. Exchange the authorization code for an access token (in your callback route)
$client->authenticate(['code' => $_GET['code']]);
```

### Querying Records (SOQL)

[](#querying-records-soql)

```
$response = $client->query()->query('SELECT Id, Name FROM Account LIMIT 10');

foreach ($response->getRecords() as $record) {
    echo $record['Name'] . PHP_EOL;
}

// Paginate through large result sets
while (!$response->isDone()) {
    $response = $client->query()->nextPage($response->getNextRecordsUrl());
    foreach ($response->getRecords() as $record) {
        // process record
    }
}
```

### CRUD on SObjects

[](#crud-on-sobjects)

```
$sobjects = $client->sobjects();

// Create a record
$result = $sobjects->create('Account', ['Name' => 'Acme Corp', 'Phone' => '555-1234']);
$newId = $result['id'];

// Read a record
$account = $sobjects->get('Account', $newId);

// Update a record
$sobjects->update('Account', $newId, ['Phone' => '555-5678']);

// Delete a record
$sobjects->delete('Account', $newId);
```

### Token Introspection

[](#token-introspection)

```
$accessToken = $client->getAccessToken();
$response = $client->oauth2Introspect()->inspect($accessToken);

if ($response->getActive()) {
    echo 'Token is active, user: ' . $response->getUsername();
}
```

Architecture
------------

[](#architecture)

```
src/
├── Abstract/Behaviours/       # Reusable traits (HasAccessToken, HasDataNode, HasOauthConfig)
├── Authentication/            # OAuth2 authentication & token storage
│   └── Token/                 # TokenRepositoryInterface + DataNode implementation
├── Client/                    # SalesforceClient + composable behaviours
│   ├── Actions/               # Factory actions (CreateClientBase, CreateClientDataNode)
│   └── Behaviours/            # HasAuthenticatorTrait, HasConfiguration, HasEndpoints
├── Config/                    # OauthConfig, ClientConfiguration
└── Endpoints/
    ├── Base/                  # AbstractEndpoint
    ├── Oauth2/Introspect/     # Token introspection endpoint
    └── SObjects/              # CRUD + SOQL query endpoints (ETL)

```

Testing
-------

[](#testing)

```
composer install
vendor/bin/phpunit
```

License
-------

[](#license)

MIT

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance58

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 81.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/bee4d69e72d2a9819fbbb63e3d81c904273f04bbcce9e0105c0f40fba73ef73d?d=identicon)[gabrielsolomon](/maintainers/gabrielsolomon)

---

Top Contributors

[![gabrielsolomon](https://avatars.githubusercontent.com/u/17990591?v=4)](https://github.com/gabrielsolomon "gabrielsolomon (9 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (2 commits)")

### Embed Badge

![Health badge](/badges/pipetic-salesforce/health.svg)

```
[![Health](https://phpackages.com/badges/pipetic-salesforce/health.svg)](https://phpackages.com/packages/pipetic-salesforce)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
