Salesforce CRM Integration

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1212
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    815

Salesforce CRM Integration with Website

Salesforce is an enterprise CRM platform with broad customization capabilities. Website integration with Salesforce allows automatic lead creation from forms, customer database synchronization, transaction data transmission, and building a unified customer profile for sales managers.

Connection Methods

REST API (Salesforce REST API) — primary option. Authentication via OAuth 2.0 (Connected App). Supports CRUD operations on Salesforce objects (Lead, Contact, Account, Opportunity).

Salesforce Web-to-Lead — built-in HTML form from Salesforce. Simplest option, but limited capabilities: no validation, no custom fields, difficult to customize appearance. Suitable only for simple cases.

Salesforce Platform Events / Streaming API — for real-time bidirectional synchronization.

Connected App Setup

  1. In Salesforce: Setup → App Manager → New Connected App
  2. Enable OAuth settings, add callback URL
  3. Select scopes: api, refresh_token
  4. Get Consumer Key and Consumer Secret

Creating Lead from Order Form

use Omniphx\Forrest\Providers\LaravelServiceProvider;
// composer require omniphx/forrest

// config/forrest.php
'credentials' => [
    'consumer_key'    => env('SF_CONSUMER_KEY'),
    'consumer_secret' => env('SF_CONSUMER_SECRET'),
    'username'        => env('SF_USERNAME'),
    'password'        => env('SF_PASSWORD'),
]

// In controller
Forrest::authenticate();

$lead = Forrest::sobjects('Lead', 'post', [
    'body' => [
        'FirstName'   => $request->first_name,
        'LastName'    => $request->last_name,
        'Email'       => $request->email,
        'Phone'       => $request->phone,
        'Company'     => $request->company ?? 'Individual',
        'LeadSource'  => 'Website',
        'Description' => "UTM: {$request->utm_source}/{$request->utm_campaign}"
    ]
]);

Order Synchronization (Opportunities)

Confirmed order on website → Opportunity in Salesforce linked to Contact/Account. This allows managers to see purchase history directly in CRM.

Forrest::sobjects('Opportunity', 'post', [
    'body' => [
        'Name'        => "Order #{$order->id}",
        'AccountId'   => $salesforceAccountId,
        'Amount'      => $order->total / 100,
        'CloseDate'   => $order->created_at->format('Y-m-d'),
        'StageName'   => 'Closed Won',
        'Order_ID__c' => $order->id  // custom field
    ]
]);

Bidirectional Synchronization

Changes in Salesforce (deal status, contact details) should reflect on the website. Implementation via Outbound Messages or Platform Events: Salesforce sends webhook to website when object changes.

Alternative — periodic polling: every 15 minutes query changed objects via SELECT Id, ... FROM Lead WHERE LastModifiedDate > {timestamp} via SOQL.

Contact Deduplication

Salesforce often contains duplicates — need logic: before creating new Lead/Contact, check for existing records with same email via SOQL query.

$existing = Forrest::query(
    "SELECT Id, Email FROM Lead WHERE Email = '{$email}' LIMIT 1"
);

if ($existing['totalSize'] > 0) {
    // Update existing lead
    Forrest::sobjects("Lead/{$existing['records'][0]['Id']}", 'patch', [...]);
} else {
    // Create new
}

Field Mapping

Custom fields in Salesforce are created via Setup → Object Manager. API name of custom field ends with __c (e.g., UTM_Source__c). Field mapping website → Salesforce fields is stored in config so code doesn't change when structure changes.

Error Handling and Queues

Salesforce API has limits (24-hour API call limits). All requests to Salesforce are executed via queue (Laravel Queue/Horizon) so response isn't blocked and retries happen on temporary errors.

Development time: 4–6 weeks for complete bidirectional integration with custom objects and order synchronization.