Salesforce Integration with PHP

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites & 1 Group

    Salesforce Integration with PHP - Presentation Transcript

    1. Salesforce Integration with PHP A Sydney PHP Group Presentation April 3 rd 2008 Toivo Talikka http://totaldata.biz
    2. Salesforce.com
      • On-demand CRM vendor
        • software as a Service (SaaS)
        • CRM and business applications
        • Application Exchange
        • APEX Developer Network
      • Standard Objects:
        • Account
        • Contact
        • Opportunity
        • Lead
      • Customers can add own fields
    3. User Interface
    4. Integration With PHP
      • Web Services API
      • PHP Toolkit
    5. PHP Toolkit
      • Self Service Portal Toolkit For PHP 5
        • v0.9.1 11 May 2006
        • Embeds Self Service Portal to a website
        • Authenticate user, login to Salesforce
      • PHP Toolkit 11
        • v11.0b 15/2/2008, supports API v11.1
        • Web Service API calls
        • Requires PHP 5.1.2+
        • SOAP enabled
        • SSL enabled
    6. Web Services
    7. Data Model
      • Entity Relationship Diagrams for objects
        • Sales
          • Accounts, contacts, opportunities, leads, campaigns
        • Task and Event
        • Support
        • Document, Note and Attachment
        • User and Profile
        • Record Type
        • Product and Schedule
        • Sharing and Team Selling
        • Customizable Forecasting
        • Territory Management
        • Process
    8. Sales Objects
    9. SOQL
      • Salesforce Object Query Language
      • 500 row limit to rows in the query result object in a query or queryMore call
      • Client application can change batch size in QueryOptions of SOAP header before invoking the query call
      • Daily maximum number of API calls
    10. SOQL
      • Comparison operators:
        • = != < <= > >=
        • like: case insensitive matching
          • Wildcards % and _
      • Logical operators: and, or, not
      • Boolean filtering
        • where BooleanField = TRUE
        • where BooleanField = FALSE
    11. Multi-Select Picklists
      • 'AAA;BBB' means 'AAA' and 'BBB‘
      • MSP1__c = 'AAA;BBB' : exact match
      • MSP1__c includes ('AAA;BBB', 'CCC')
        • either: AAA and BBB selected
        • or: CCC selected
    12. Relationship Queries
      • Must have relationship between objects to create a join in SOQL
      • Only one level of parent-to-child relationship can be specified in a query
      • SELECT Account.Name, (SELECT Note.OwnerId FROM Account.Notes) FROM Account
    13. Query Example
      • Company and contact details
      • Select Id, Name, Type, BillingStreet, BillingCity, BillingState, BillingPostalCode, BillingCountry, Phone, Fax, Website, (SELECT LastName, FirstName, Title, Email, FROM Account.Contacts ) FROM Account WHERE id = '00120000001pKpFAAU'
    14. Returned Objects
      • $query = &quot;SELECT Id, FirstName, LastName from Contact&quot;;
      • $queryResult = $mySforceConnection->query($query);
      • $records = $queryResult->records;
      • foreach ($records as $record) { $sObject = new SObject ($record); echo &quot;Id = &quot;. $sObject->Id ; echo &quot;First Name = &quot;. $sObject->fields->FirstName ; echo &quot;Last Name = &quot;. $sObject->fields->LastName ;
      • }
    15. Relationship Query
      • $query = 'Select a.Id, a.Name, a.Type, ';
      • $query .= ' a.BillingStreet, a.BillingCity,';
      • $query .= ' a.BillingCountry, a.Phone, a.Fax,';
      • $query .= ' (SELECT c.LastName, c.FirstName, c.Title, c.Email FROM Account.Contacts c)';
      • $query .= ' FROM Account a';
      • $query .= &quot; WHERE Id = '&quot;.$account_id.&quot;'&quot;;
    16. queryResult Array
      • foreach ($records as $record) {
      • $Account = new SObject($record);
      • $id = $Account->Id;
      • $name = $Account->fields->Name;
      • $Contact_query_result =
      • $Account->queryResult[0];
      • $Contacts =
      • $Contact_query_result->records;
      • foreach ($Contacts as $Contact) {
      • $first_name = $Contact->fields->FirstName;
      • $last_name = $Contact->fields->LastName;
    17. Objects and Arrays
      • Select c.FirstName, c.LastName, a.Name
      • FROM Contact c. c.Account
      • $Contact = new SObject($record);
      • // echo var_dump($Contact);
      • // echo print_r(get_object_vars($Contact);
      • $first_name = $Contact->fields->FirstName;
      • $company = $Contact->sobjects[0]->fields->Name;
    18. APEX Data Loader Download tables as CSV files Test queries before using API

    + Toivo TalikkaToivo Talikka, 2 years ago

    custom

    3760 views, 2 favs, 3 embeds more stats

    A Sydney PHP Group presentation
    April 3rd 20 more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 3760
      • 3644 on SlideShare
      • 116 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 48
    Most viewed embeds
    • 113 views on http://www.sydphp.org
    • 2 views on http://sydphp.org
    • 1 views on http://74.125.39.104

    more

    All embeds
    • 113 views on http://www.sydphp.org
    • 2 views on http://sydphp.org
    • 1 views on http://74.125.39.104

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Groups / Events