Salesforce1 Platform API Services Guide

  • View
    351

  • Download
    37

Embed Size (px)

Text of Salesforce1 Platform API Services Guide

  • Salesforce1 Platform API Services Guide

    Version 1November 2013

  • Salesforce1 Platform API Services Guide

    Copyright 20002014 salesforce.com, inc. All rights reserved. Salesforce.com is a registered trademarkof salesforce.com, inc., as are other names and marks. Other marks appearing herein may betrademarks of their respective owners.

    Various trademarks held by their respective owners.

    No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in anyform, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without theprior consent of the publisher.

    This book provides comprehensive information for all Salesforce APIs. Use this book to explore commonscenarios that require using Salesforce APIs. Once youve learned which APIs fit your needs, you canuse this guide to get detailed API overviews, examples, best practices, and more.

  • Table of Contents

    Preface......................................................................................................1

    INTRODUCTION..................................................................................5

    Chapter 1: Introducing the Salesforce1 Platform................................5Features of Salesforce1..........................................................................................6Key Business Use Cases........................................................................................8

    Customize Existing Salesforce Apps and Make Them Mobile................9Orchestrate Relevant and Targeted Multi-Channel Marketing

    Campaigns.........................................................................................10Create Seamless Interaction Between Customer and Employee Facing

    Apps..................................................................................................11Enable Employees to Access Corporate Data from Anywhere...............13Analyze Real-Time Data From Connected Devices...............................14Create Mobile Apps that Drive Employee Productivity.........................16Evolve Identity and Data Security Beyond the Perimeter.......................17

    Chapter 2: Overview of Force.com..................................................19Resources............................................................................................................20

    Chapter 3: Overview of Heroku.......................................................21Key Features of Heroku .....................................................................................23Heroku Quick Start............................................................................................27Best Practices for Consuming Salesforce1 APIs from Heroku...........................31Resources............................................................................................................32

    Chapter 4: Overview of ExactTarget................................................33Customer Touchpoints for Developers...............................................................34Resources............................................................................................................38

    FORCE.COM.......................................................................................39

    Chapter 5: Authentication..............................................................39Defining Connected Apps..................................................................................39

    i

    Table of Contents

  • Understanding OAuth Endpoints......................................................................40Understanding the Web Server OAuth Authentication Flow............................41Understanding the User-Agent OAuth Authentication Flow............................46Understanding the Username-Password OAuth Authentication Flow..............50Understanding the OAuth Refresh Token Process............................................53

    Chapter 6: SOAP API....................................................................57Quick Start..........................................................................................................57Best Practices......................................................................................................58Resources............................................................................................................62

    Chapter 7: REST API.....................................................................63Quick Start..........................................................................................................63

    Prerequisites............................................................................................63Step One: Obtain a Salesforce Developer Edition Organization............64Step Two: Set Up Authorization............................................................64Step Three: Send HTTP Requests with cURL......................................68Step Four: Walk Through the Sample Code..........................................69

    Best Practices......................................................................................................76Resources............................................................................................................76

    Chapter 8: Metadata API................................................................77Quick Start..........................................................................................................78

    Prerequisites............................................................................................78Step 1: Generate or Obtain the Web Service WSDLs for Your

    Organization......................................................................................79Step 2: Import the WSDL Files Into Your Development

    Platform.............................................................................................80Step 3: Walk Through the Java Sample Code........................................81

    Best Practices......................................................................................................89Resources............................................................................................................91

    Chapter 9: Bulk API.......................................................................93Quick Start..........................................................................................................94

    Setting Up a Salesforce Developer Edition Organization.......................94Setting Up Your Client Application.......................................................94Sending HTTP Requests with cURL.....................................................95

    Best Practices....................................................................................................101

    ii

    Table of Contents

  • General Guidelines for Data Loads......................................................101Using Compression for Responses........................................................103

    Resources..........................................................................................................104

    Chapter 10: Streaming API...........................................................105Quick Start Using Workbench.........................................................................106

    Prerequisites..........................................................................................106Step 1: Create an Object.......................................................................107Step 2: Create a PushTopic...................................................................108Step 3: Subscribe to the PushTopic Channel........................................109Step 4: Test the PushTopic Channel....................................................110

    Best Practices....................................................................................................111Clients and Timeouts............................................................................111Clients and Cookies for Streaming API...............................................111Supported Browsers..............................................................................112HTTPS Recommended........................................................................112Debugging Streaming API Applications..............................................112Monitoring Events Usage.....................................................................113Notification Message Order..................................................................113

    Resources..........................................................................................................114

    Chapter 11: Data.com API............................................................115Data.com Search API.......................................................................................116Data.com Match API.......................................................................................116Purchasing Data.com Records..........................................................................117

    Chapter 12: SOQL and SOSL.......................................................119Resources..........................................................................................................120

    Chapter 13: Apex..........................................................................121Apex Quick Start..............................................................................................122

    Writing Your First Apex Class and Trigger..........................................122Best Practices....................................................................................................129