承接 doitcloudconsulting/salesforce 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

doitcloudconsulting/salesforce

Composer 安装命令:

composer create-project doitcloudconsulting/salesforce

包简介

Salesforce ToolKit for Laravel maked by DoIT Cloud Consulting

README 文档

README

Salesforce ToolKit for Laravel maked by DoIT Cloud Consulting

Getting Started

Thank you so much for the interest on the package, is very interesting to us keep a community open source to Salesforce integrations. The work on the package is sponsored by DoIT Cloud Consulting and to company is importatn get your feedback, please contact us throught the official page to duds or questions.

Prerequisites

In this tutorial we take for granted that you have installed PHP and composer. Create a laravel project, run the next commands:

$ composer create-project --prefer-dist laravel/laravel SalesforceConnectionProject
$ cd SalesforceConnectionProject

Installing

After you have a laravel project you will need run the command to install our package:

composer require doitcloudconsulting/salesforce

Wait a moment and you see on the composer.json a new element:

 "require": {
     ....
        "doitcloudconsulting/salesforce": "^0.0.0",
     ....
    }

Now is necessary add the service providers, go to config/app.php and add the next line in the providers array:

 DoITCloudConsulting\Salesforce\SalesforceServiceProvider::class,

To init session is neccesary add some parameters and a file wsdl, set the credentials on the config file app/SalesforceConfig.php . You will must run the next command to see the file on the config folder.

$ php artisan vendor:publish --tag=config

####### Result #######

Copied File [/myProject/DoITCloudConsulting/Salesforce/src/config/SalesforceConfig.php] To [/config/SalesforceConfig.php]

Set the credentials

return [

	/*
    |--------------------------------------------------------------------------
    | Data Access
    |--------------------------------------------------------------------------
    |
    | Set credenctials to login on salesforce platform.
    | 
    */

	'Username' => '********@doitcloud.consulting',
	'Password' => '**********',
	'Token' => '******************************',

Now export the demo file to connect through a wsdl. It will show a file wsdl into config/partner.wsdl.xml, just you need replace it. Run the next command:

$ php artisan vendor:publish --tag=wsdlconfig

Go to Settings >[find box write] API > Download Partner / Enterprise then you will download a file xml that must be replaced inside of config/partner.wsdl.xml

Depending of connection type selected, in config/SalesforceConfig.php you must set what type connection you want use.


    /*
    |--------------------------------------------------------------------------
    | WSDL 
    |--------------------------------------------------------------------------
    |
    | To connect to salesforce definition objects is necessary set a connect 
    | mode, partner or enterprise is the options. Download the WSDL from 
    | Salesforce > Settings > API. Click on the option that you need and 
    | replace the files demo on the package.
    | 
    */


    'Mode' => 'partner',

Running some examples:

Insert

$salesforce = new Salesforce();
$salesforce->insert(array('Name' => 'DoIT Acc FROM ToolKit'), 'Account');

Update

$salesforce = new Salesforce();
$salesforce->update(array('Name' => 'DoIT Acc ', 'id' => '001f400000yNY0LAAW'), 'Account');

Delete

$salesforce = new Salesforce();
$salesforce->delete(array('001f400000yNY0LAAW', '001f400130TMY0L5AW', ...));

Undelete

$salesforce = new Salesforce();
$salesforce->delete(array('001f400000yNY0LAAW', '001f400130TMY0L5AW', ...));

Upsert

$salesforce = new Salesforce();
$salesforce->upsert(array(
	array('Name' => 'Acc1'),
	array('Name' => 'Acc2'),
	array('Name' => 'Acc2', 'Phone' => 192837465, 'id' => '001f400000yNY0LAAW'),
	), 'Account');

Query

$salesforce = new Salesforce();
$salesforce->query('select Id, Name from Account limit 10');

Search / SOSL

$salesforce = new Salesforce();
$salesforce->sosl('Find {doit} Returning Account(name), lead(name, phone)');

Convert Lead

$salesforce = new Salesforce();

$lead = $salesforce->insert(
        array('lastname' => 'Homerito Hernández', 
              'Email' => 'homerito@doitcloud.mx', 
              'Phone' => 1234588892, 
              'Company' => 'DoIT Cloud Consulting'
          ), 'Lead');

$salesforce->convertLead($lead->id, 'Closed - Converted');

Describe Global (sObject of objects custom and standard with properties).

$salesforce = new Salesforce();
$salesforce->describeGlobal();

Describe layout

$salesforce = new Salesforce();
$salesforce->describeLayout('Account');

Describe SObject

$salesforce = new Salesforce();
$salesforce->describeSObject('Account');

Get me all updated

$salesforce = new Salesforce();
$salesforce->getMeAllUpdated('Case', '08-04-2019', '30-04-2019');

Get me all Deleted

$salesforce = new Salesforce();
$salesforce->getMeAllDeleted('Case', '08-04-2019', '30-04-2019');

Built With

  • Carbon - A simple PHP API extension for DateTime.
  • Sublime Text - A sophisticated text editor for code, markup and prose
  • PHP Toolkit Salesforce - The Force.com PHP Toolkit provides an easy-to-use wrapper for the Force.com
  • PHP - PHP is a popular general-purpose scripting language that is especially suited to web development.
  • SOAP Project - Web Service

Authors

  • Hugo Hernández - Initial work - Linkedin

See also the list of contributors who participated in this project.

License

This project is licensed under the LGPL-2.0-only License - see the LICENSE.md file for details

doitcloudconsulting/salesforce 适用场景与选型建议

doitcloudconsulting/salesforce 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 17 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 04 月 29 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「salesforce」 「Salescloud」 「forms salesforce」 「DoITCloudConsulting」 「DoIT Cloud Consulting」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 doitcloudconsulting/salesforce 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 doitcloudconsulting/salesforce 我们能提供哪些服务?
定制开发 / 二次开发

基于 doitcloudconsulting/salesforce 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 17
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-2.0-only
  • 更新时间: 2019-04-29