PHPackages                             mncee/salesforce-sync - 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. mncee/salesforce-sync

ActiveLibrary

mncee/salesforce-sync
=====================

Package for syncing Salesforce objects with local data

v2.0.0(1y ago)32.1k1MITPHP

Since Feb 20Pushed 1y ago3 watchersCompare

[ Source](https://github.com/jwilson-cee/salesforce-sync)[ Packagist](https://packagist.org/packages/mncee/salesforce-sync)[ RSS](/packages/mncee-salesforce-sync/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (1)Versions (12)Used By (0)

Salesforce Sync
===============

[](#salesforce-sync)

This package is for syncing Salesforce objects with local data in a Laravel app.

Works with [Laravel 9, 10, and 11](https://laravel.com/docs/11.x).

[*Use version `^1.0` for Laravel 5*](https://github.com/jwilson-cee/salesforce-sync/tree/v1.0.9)

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

[](#installation)

This package can be installed via [Composer](http://getcomposer.org) by requiring the `mncee/salesforce-sync` package.

```
composer require mncee/salesforce-sync
```

[*For Laravel 5*](https://github.com/jwilson-cee/salesforce-sync/tree/v1.0.9)

```
composer require mncee/salesforce-sync:^1.0
```

Laravel Configuration
---------------------

[](#laravel-configuration)

### Environment Variables

[](#environment-variables)

Include the following environment variables in the `.env` file:

```
SALESFORCE_USERNAME=#your salesfore username#
SALESFORCE_PASSWORD=#your salesfore password#
SALESFORCE_TOKEN=#your salesfore token#
SALESFORCE_WSDL=#path to the wsdl stored in the storage/app/ directory#

```

Place your [your **Enterprise** WSDL file](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_quickstart_steps_generate_wsdl.htm) into your app `storage/app/` directory you specified in the `.env` file.

**IMPORTANT:** This package only works with Enterprise WSDL

### Package Discovery

[](#package-discovery)

This packages *Service Provider* and *Facade alias* should be auto-discovered when requiring it with `composer`.

But if you need to add them manually, you can do so with the following instructions:

#### For Laravel 11

[](#for-laravel-11)

In the `bootstrap/providers.php` file add `CEE\Salesforce\Laravel\SalesforceServiceProvider::class` to the returned array.

```
// bootstrap/providers.php

return [
    App\Providers\AppServiceProvider::class,
    CEE\Salesforce\Laravel\SalesforceServiceProvider::class,
];
```

In the `config/app.php` file add these corresponding lines to the returned array.

```
// config/app.php

return [

    //...

    'aliases' => Facade::defaultAliases()->merge([
        'Salesforce' => \CEE\Salesforce\Laravel\Facades\Salesforce::class,
    ])->toArray(),
]
```

#### For Laravel 9 and 10

[](#for-laravel-9-and-10)

Find the `providers` key and `aliases` key in your `config/app.php` and add these corresponding lines to the returned array.

```
// config/app.php

return [

    //...

    'providers' => [
        // ...
        CEE\Salesforce\Laravel\SalesforceServiceProvider::class,
    ],

    'aliases' => [
        // ...
        'Salesforce' => \CEE\Salesforce\Laravel\Facades\Salesforce::class,
    ],

];
```

The SyncObject Class
--------------------

[](#the-syncobject-class)

This is the class to use for syncing local data with remote Salesforce objects.

### Sub-class usage

[](#sub-class-usage)

Classes that inherit this class can perform functions for syncing (pushing and pulling) with a remote Salesforce object.

```
class Contact extends SyncObject
{
    public $objectName = 'Contact'; // Saleforce Object Name
    ...
}

$salesforceContact = new Contact();
$salesforceContact->push();
$salesforceContact->pull();
```

Functions need to be defined for pushing and pulling Salesforce object fields, and must use this naming convention:

```
public function push_()
public function pull_($value)
```

The `push_...()` functions should return a value that is to be pushed to the corresponding `` of the remote Salesforce object.

```
    public function push_FirstName() {
        return DB::table('contact')->where('id', 1)->value('first_name');
    }
```

The `pull_...($value)` functions will have an argument containing the value corresponding to the `` of the remote Salesforce object that can be used to update local data.

```
    public function pull_FirstName($firstName) {
        DB::table('contact')->where('id', 1)->update(['first_name' => $firstName]);
    }
```

It is not required to have both a `push_...()` and a `pull_...()` function for a given Salesforce field. Either or both can be used according to what is needed for syncing in either direction.

### Static `objectName()` function and chaining usage

[](#static-objectname-function-and-chaining-usage)

This class can also be used on it's own using the chaining functions:

```
SyncObject::objectName('Contact')
	->id('00A10000001aBCde')
	->pushFields(['FirstName' => 'John', 'LastName' => 'Doe'])
	->push();

$salesforceContact = SyncObject::objectName('Contact')
	->id('00A10000001aBCde')
	->pullFields(['FirstName', 'LastName'])
	->pull();
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 95.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.

###  Release Activity

Cadence

Every ~203 days

Recently: every ~425 days

Total

11

Last Release

609d ago

Major Versions

v1.0.9 → v2.0.02024-09-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/39a6407276b8bb6bc2e07144d39f600c765e697c180b8b98aeaac02a4db99ce0?d=identicon)[jwilson-cee](/maintainers/jwilson-cee)

---

Top Contributors

[![jwilson-cee](https://avatars.githubusercontent.com/u/40274663?v=4)](https://github.com/jwilson-cee "jwilson-cee (23 commits)")[![zealouscreations](https://avatars.githubusercontent.com/u/7072952?v=4)](https://github.com/zealouscreations "zealouscreations (1 commits)")

---

Tags

laravellaravel 5salesforceforce.com toolkit

### Embed Badge

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

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[davispeixoto/laravel5-salesforce

Laravel 5 Salesforce Force.com PHP Toolkit port

47142.8k1](/packages/davispeixoto-laravel5-salesforce)[davispeixoto/laravel-salesforce

Laravel 4 Salesforce Force.com PHP Toolkit port

1433.1k](/packages/davispeixoto-laravel-salesforce)

PHPackages © 2026

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