APIs in Action ? Bringing Data to Life in Salesforce


Published on

Join us to learn more about the APIs as we dive deep into a couple of use cases. We'll show you how you can automate pulling in the right Contacts for your Accounts, filling in white spaces. We'll also explore strategies for automating cleaning your data using triggers and Apex code.

Published in: Technology, Business
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide APIs in Action ? Bringing Data to Life in Salesforce

  1. 1. lot Pi APIs In Action Alan Dray, Lead Sales Engineer @AlanDrayDDCSE Ali Sadat, Sr. Director Prod Management – API & Data Platform @alisadat #APInation
  2. 2. Safe Harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available., inc. assumes no obligation and does not intend to update these forward-looking statements.
  3. 3. { "agenda": [ { "topic": " Overview", "who": "Ali" }, { "topic": "API Overview", "who": "Ali" }, { "topic": ”Data Use Cases", "who": ”Alan" }, { "topic": ”Demo", "who": ”Alan" }, { "topic": "Q&A", "who": ”Alan and Ali" } ] }
  4. 4. Ali Sadat Sr. Dir. Product Management – API & Data Platform @alisadat
  5. 5. Built Together: The Best Data, The #1 Sales App Leading account and contact data right inside Sales Cloud Clean Market Sell
  6. 6. World’s Premier Sources of Accounts & Contacts Directly in Sales Cloud ▪ Company Information From D&B ▪ Millions of Crowd-Sourced Contacts ▪ Clean your Sales Cloud With One Click ▪ Instant Access and Real-time Updates In the Cloud
  7. 7. API Overview
  8. 8. API Goals and Motivation Allow customers to create rich custom experiences that can be integrated into their processes.
  9. 9. Possible Use Cases Enabled by API Use Cases Fill-in White Space Search/Purchase API Match API ✓ Selective Automated Cleaning ✓ On-Demand Automated Cleaning ✓ Search in DDC before Create ✓ Custom Build a List ✓ ✓ Web2Lead (Clean) Lookup by DUNS Future Build Visual Account Hierarchy ✓ Future Mobile Experience ✓ ✓
  10. 10. APIs generally act and feel like other APIs
  11. 11. How does data show up in your org? Org Datacloud (External) sObjects Accounts Contacts Datacloud Company Datacloud Contact Leads
  12. 12. Datacloud sObjects and APIs (Pilot) Force Technology DDC API DatacloudCompany DatacloudContact ✔ ✔ Search ✔ ✔ Purchase* ✔ ✔ Retrieve ✔ ✔ Match ✔ ✔ Search ✔ ✔ Purchase ✔ ✔ Retrieve ✔ ✔ Future Future sObject REST APEX Match * Purchase is a process that involves inserting into multiple objects
  13. 13. Searching Contacts / Companies
  14. 14. Search: SOQL SELECT ContactId, FirstName, LastName, Title, Email, CompanyName, Street, City, CompanyId, Country, State, Zip, Phone, IsInactive, IsOwned FROM DatacloudContact WHERE CompanyName Like '' AND City = 'San Francisco' AND FirstName Like 'Ali' Order by LastName
  15. 15. Contact Search: Result ContactId FirstName LastName Title Email CompanyName Street City State Zip Phone IsInactive IsOwned +1. 94105703.463.31 FALSE TRUE 1596 68 +*.***.***. 9****** FALSE FALSE **** +1. 94105415.547.86 FALSE TRUE 1596 37 +*.***.***. 9****** FALSE FALSE **** 55280504Alisa Distaso Principal Sales Engineer adistaso@salesfor, 1 Market Inc. San CA Francisco 34436669A****** G****** ****** ******@salesforce., ****** com Inc. San CA Francisco 61751292Alison Guzenski Campus Recruiter Non-technical aguzenski@salesf, 1 Market Inc. San CA Francisco 9041336A****** H****** ****** ******@salesforce., ****** com Inc. San CA Francisco 50285112A****** K****** ****** ******, ****** Inc. San CA Francisco 9****** +*.***.***. **** FALSE FALSE 31487887A****** L****** ****** ******@salesforce., ****** com Inc. San CA Francisco 9****** +*.***.***. **** FALSE FALSE 53554176A****** N****** ****** ******@salesforce., ****** com Inc. San CA Francisco 9****** +*.***.***. **** FALSE FALSE Sadat Senior Director Product Management Data com asadat@salesforce, 1 Market .com Inc. Ste 300 San CA Francisco +1. 94105415.778.33 5102 57 FALSE TRUE 45003056Ali Masked fields if Not Owned (purchased).
  16. 16. Search: Masked Fields in Result • Some fields masked if IsOwned = false • Purchase via API or tab to see all fields
  17. 17. Company Search SELECT AnnualRevenue,City,Industry,Name,NumberOfEmployees,Street, Website,YearStarted FROM DatacloudCompany WHERE Country = 'United States' AND Name Like 'Salesforce' ORDER BY City LIMIT 50 Jus t Li ke C ont a ct S ear ch
  18. 18. Purchasing Records
  19. 19. Purchasing Data is a Multi-Step Process Search •• SOQL - Filters Get Transaction Id •• Create DatacloudPurchaseUs age Buy Records Get Details •• Create DatacloudOwnedEntity •• SOQL – record Id
  20. 20. Purchase Object Relationships DatacloudContact DatacloudPurchaseUsage • Id • DatacloudEntityType • Description DatacloudOwnedEntity • DatacloudEntityType • DataDotComKey • PurchaseUsageId e=0 tyTyp Enti Enti tyTy pe= 1 • ContactId DatacloudCompany • CompanyId Note: Create only. Purchase is FINAL.
  21. 21. Match returns Single High Confidence result. Match ≠ Search
  22. 22. Match API Style: REST URLs: ▪ /services/data/v29.0/match/DatacloudMatchEngine/DatacloudCompany ▪ /services/data/v29.0/match/DatacloudMatchEngine/DatacloudContact 2. GET List of available fields and Max Batch Size 3. POST Match request
  23. 23. Match Response: Get List of Fields { "fieldSets": "[IsInactive, Country, FirstName, Zip, LastName, IsOwned, Phone, CompanyId, Email, ContactId, Street, CompanyName, City, Title, State]", "maxBatchSize": "30" }
  24. 24. Contact Match: Request Body: { "entities":[ { "attributes":{ "type":"DatacloudContact" }, "FirstName":"Ali", "LastName":"Sadat", "Email":"", "CompanyName":"Sale" } ], "fields":[ "FirstName", "LastName", "Email", "Phone", "CompanyName", "CompanyId", "Title", "Street", "City", "State", "Country", "Zip" ] Post …/services/data/v29. 0/match/DatacloudMatchEngine/DatacloudContact Input to Match List of Fields to include in Result }
  25. 25. [ { Contact Match: Result Match Results Same order as Request Fields that were different from Request "errorMessage": null, "errorCode": 0, "matchRecords": [ { "entity": { "attributes": { "type": "DatacloudContact" }, "Phone": "+1.415.778.3357", "Street": "1 Market Ste 300", "Email": "", "State": "CA", "CompanyId": "159110", "FirstName": "Ali", "Zip": "94105-5102", "CompanyName": ", Inc.", "Country": "United States", "LastName": "Sadat", "City": "San Francisco", "Title": "Senior Director Product Management Data com" }, "matchDiffs": [ "CompanyName" ] } ] } ]
  26. 26. Company Match Works just like Contact Match. GET…/services/data/v29. 0/match/DatacloudMatchEngine/DatacloudCompany { "fieldSets" : "[Site, Description, Sic, Country, YearStarted, CompanyId, NaicsCode, DunsNumber, Street, TickerSymbol, NumberOfEmployees, Phone, Ownership, IsInactive, SicDesc, Zip, Name, Website, NaicsDesc, State, City, TradeStyle, AnnualRevenue, Fax, IsOwned, Industry]", "maxBatchSize" : "30" }
  27. 27. API Availability by Product Prospector API Clean Object Purchase Retrieve2 Match1 ✔ ✔ Company 1 Premium Contact Search1 Corporate ✔ ✔ Contact ✔ ✔ Company ✔ Corporate ✔ ✔ DnB Company Premium ✔ Contact ✔ ✔ Company ✔ ✔ 1. Available at Pilot 2.Available at GA
  28. 28. Daily API Requests Quota Limit API Org Level Daily Limit* sObject Contact Max Calls = 1000/user * # Lic users; Max 100 results / page Search Company Contact No Limit Purchase Company DnB Company No Limit Contact Retrieve Max Calls = 1000/user * # Lic users; Max 30 Match Requests / call Match Company
  29. 29. Alan Dray Lead Sales Engineer, @AlanDrayDDCSE
  30. 30. Demo
  31. 31. Search & Match API (PILOT) Search API (Prospector) ▪ DataCloudContact ▪ DataCloudCompany Match API (Clean) ▪ DataCloudContact ▪ DataCloudCompany Purchase ▪ PurchaseUsage ▪ OwnedEntity
  32. 32. Use Cases Enabled by API Use Cases Search API Search in DDC before Create ✓ Search to Clean ✓ Contacts for Account Match API ✓ ✓ Web2Lead Fill Before Create Firmagraphics for Unmatched Leads ✓ Note: Purchase API used in all cases when a selection is made to add to Salesforce.
  33. 33. API – Considerations/Limitations Feature Consideration/Limitation Recommendation APEX Purchase ▪ Known issue – Have to retrieve purchased records after transaction has been fully committed. Use REST purchase. Completion of REST transaction commits. Search via SOQL ▪ QueryMore() not supported. Need to use LIMIT and OFFSET External API Calls ▪ @future annotation required when executing from triggers. Use AFTER triggers when performing look-ups for auto-fill. Filter by Email ▪ API does not support '=' so can't search for email = '' Use "Like ''" Filter by Email ▪ When using 'Like' to do wildcard search, you can only search on a string before the '@'. You cannot search for example '%@salesforce. com' Use "CompanyName Like 'salesforce. com'" Only issue is that if there are other email domains in the same company, those will be included too.
  34. 34. Resources Used •Technical Libraries, Tools, Discussion Boards, Cookbooks, Blogs, …And much more • •For those that choose REST over XML/SOAP •A tool to help generate strongly typed Apex code for parsing a JSON structure given an example of the JSON. • - Built on Heroku Online JSON Viewer •Format and View JSON requests and response. •There are many this one is simple • REST Explorer by Salesforce Labs •Discover and Explore the REST API. •
  35. 35. Ali Sadat Sr. Dir PM, @alisadat Alan Dray Lead Sales Engineer, @AlanDrayDDCSE
  36. 36. We want to hear from YOU! Please take a moment to complete our session survey Surveys can be found in the “My Agenda” portion of the Dreamforce app