82
Salesforce1 Platform Basics

Bbva workshop

  • View
    164

  • Download
    2

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Bbva workshop

Salesforce1 PlatformBasics

Page 2: Bbva workshop

David ScruggsPlatform Engineer

@[email protected]

Page 3: Bbva workshop

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 salesforce.com, 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 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, 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, risks associated with 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 non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal quarter ended July 31, 2011. This document and others 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 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. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.

Page 4: Bbva workshop

What are we doing?

Setup and Introductions

Salesforce1 Platform Overview

Declarative Development

User Interface

Mobility

Programmatic Development and Heroku

Page 5: Bbva workshop

Setup and Introductions

Page 6: Bbva workshop

Login and get ready

Internet Username/PasswordSF13/SF13

Page 7: Bbva workshop

Be interactive

Page 8: Bbva workshop

http://developer.force.com/join

http://bit.ly/heroku_qs

http://eclipse-plugin.herokuapp.com/

SETUP: Free Developer Environment

Page 9: Bbva workshop

Online Workbook

http://bit.ly/basics_book

http://bit.ly/heroku_qsIf needed:

http://bit.ly/c9heroku

If you’re interested: http://bit.ly/force_apex_book

Page 10: Bbva workshop

Salesforce1 Platform Overview

Page 11: Bbva workshop

Salesforce is a Platform Company. Period. -Alex Williams, TechCrunch

500MAPI Calls Per Day6BLines of

Apex4M+

Apps Built on the Platform

72BRecords Stored

Salesforce1 Platform

Page 12: Bbva workshop

1.4 million…and growing

Page 13: Bbva workshop

CoreServices

Chatter

Multi-languag

e

Translation

Workbench

Email Service

s

Analytics

CloudDatabas

e

Scheema

Builder

Search

Visualforce

MonitoringMulti-tenant

Apex

Data-level

Security

Workflows

APIs

Mobile Services

Social

APIs

Analytics

APIs

Bulk APIs

Rest APIs

Metadata

APIs

Soap APIs

Private App

Exchange

Custom Actions

Identity

Mobile Notificatio

ns

Tooling

APIs

Mobile Packs

Mobile SDK

Offline Support

Streaming

APIs

Geolocation

ET 1:1 ET Fuel

Heroku1

Heroku Add-Ons

Sharing Model

ET API

Salesforce1 Platform

Page 14: Bbva workshop

Every Object, Every Field: Salesforce1 Mobile Accessible

AppExchange Apps:

Dropbox Concur Evernote ServiceMax More

Custom Apps and Integrations:

SAP Oracle Everything Custom More

Sales, Service and Marketing

Accounts Cases CampaignsDashboards More

Page 15: Bbva workshop

Declarative and Programmatic

Declarative Programmatic

Visualforce PagesVisualforce Components

Apex ControllersApex Triggers

Metadata APIREST APIBulk API

Formula FieldsValidation Rules

Workflows and Approvals

ObjectsFields

Relationships

Page LayoutsRecord Types

User Interface

Business Logic

Data Model

Page 16: Bbva workshop

Your App

Every Object, Every Field: API Enabled

GET

POST

PATCH

DELETE

OAuth 2.0HTTPS

Page 17: Bbva workshop

Every Object, Every Field: Apex and Visualforce Enabled

Visualforce PagesVisualforce Components

Apex ControllersApex Triggers

Custom UICustom UI

Custom LogicCustom Logic

Page 18: Bbva workshop

ChatterFramework for the social enterprise

Page 19: Bbva workshop

Declarative Development

Page 20: Bbva workshop

Declarative ApplicationsBusiness logic expressed without programming

Page 21: Bbva workshop

Warehouse Application Requirements

Track price and inventory on hand for all merchandise

Create invoices containing one or more merchandise items as a line items

Present total invoice amount and current shipping status

Page 22: Bbva workshop

Warehouse Application Requirements

Track price and inventory on hand for all merchandise

Create invoices containing one or more merchandise items as a line items

Present total invoice amount and current shipping status

Page 23: Bbva workshop

Warehouse Application Requirements

Track price and inventory on hand for all merchandise

Create invoices containing one or more merchandise items as a line items

Present total invoice amount and current shipping status

Page 24: Bbva workshop

Warehouse Data Model

Merchandise

Name Price Inventory

Pinot $20 15

Cabernet $30 10

Malbec $20 20

Zinfandel $10 50

Invoice

Number Status Count Total

INV-01 Shipped 16 $370

INV-02 New 20 $200

Invoice Line Items

Invoice Line Merchandise Units Sold

Unit Price

Value

INV-01 1 Pinot 1 15 $15

INV-01 2 Cabernet 5 10 $150

INV-01 3 Malbec 10 20 $200

INV-02 1 Pinot 20 50 $200

Page 25: Bbva workshop

Declarative Logic: Validation Rules Formulas which validate data before being entered or modified

Page 26: Bbva workshop

How Validation Rules Work

WHEN THENIF

Line Item is added or Updated

Quantity__c <= 0 Error: “Line Item’s Quantity Should Be Greater Than 0”

Record isinserted or updated

Statement evaluates to true

Block Insert/UpdateReturn error message

Page 27: Bbva workshop

Hands On Tutorials#1: Create your data model

#2: Customize your user interface

Page 28: Bbva workshop

Declarative Logic: Formula Fields Fields which can calculate data in real time

Page 29: Bbva workshop

Formula Fields

Excel style formulas

Functions can be nested

Support for commons functions

– Math

– Text

– Date & Time

– Logical

CASE(MONTH( date ),

1, "January",2, "February",3, "March",4, "April",5, "May",6, "June",7, "July",8, "August",9, "September",10, "October",11, "November","December",

)

Page 30: Bbva workshop

Warehouse Data Model

Merchandise

Name Price Inventory

Pinot $20 15

Cabernet $30 10

Malbec $20 20

Zinfandel $10 50

Invoice

Number Status Count Total

INV-01 Shipped 16 $370

INV-02 New 20 $200

Invoice Line Items

Invoice Line Merchandise Units Sold

Unit Price

Value

INV-01 1 Pinot 1 15 $15

INV-01 2 Cabernet 5 10 $150

INV-01 3 Malbec 10 20 $200

INV-02 1 Pinot 20 50 $200

Formula Field Item Total = Unit Price X Quantity

Page 31: Bbva workshop

Declarative Logic: Roll-Up Summary Fields Fields which can summarize data based on child records

Page 32: Bbva workshop

Warehouse Data Model

Merchandise

Name Price Inventory

Pinot $20 15

Cabernet $30 10

Malbec $20 20

Zinfandel $10 50

Invoice

Number Status Count Total

INV-01 Shipped 16 $370

INV-02 New 20 $200

Invoice Line Items

Invoice Line Merchandise Units Sold

Unit Price

Value

INV-01 1 Pinot 1 15 $15

INV-01 2 Cabernet 5 10 $150

INV-01 3 Malbec 10 20 $200

INV-02 1 Pinot 20 50 $200

Roll-Up Field Sum of Line Item Value

Page 33: Bbva workshop

Child of Master-Detail

Count or Aggregate

Roll-Up Summary Fields

Page 34: Bbva workshop

Declarative Logic: WorkflowsEvent based actions to express business logic

Page 35: Bbva workshop

How Workflows Work

WHEN THENIF

Invoice is updated 30 days later, status is open

Change status to“Pending”

Record isinserted or updated

DefinedConditions are met

PerformWorkflow actions

Page 36: Bbva workshop

Workflow Actions

TaskOutbound MessageUpdate

FieldEmail

Page 37: Bbva workshop

Warehouse Data Model

Merchandise

Name Price Inventory

Pinot $20 15

Cabernet $30 10

Malbec $20 20

Zinfandel $10 50

Invoice

Number Status Count Total

INV-01 Shipped 16 $370

INV-02 New 20 $200

Invoice Line Items

Invoice Line Merchandise Units Sold

Unit Price

Value

INV-01 1 Pinot 1 20 $20

INV-01 2 Cabernet 5 10 $150

INV-01 3 Malbec 10 20 $200

INV-02 1 Pinot 20 50 $200

Workflow RuleWhen updated, if unit price is blank then fill it withthe Merchandise price value

Page 38: Bbva workshop

Declarative Logic: ApprovalsFramework for approval on record updates

Page 39: Bbva workshop

Approvals

Define Criteria

Define Actions

Page 40: Bbva workshop

• Single / Multi / Skip Processes

• Role and User based Routing

• Chatter and Email Approvals

Approvals

Page 41: Bbva workshop

Security and Identity ServicesServices to authenticate users and control data visibility

Page 42: Bbva workshop

Security and Identity Services

• User Profiles• User Groups and Hierarchies

• Permission Sets• SSO / SAML• OAuth 2.0• Connected Apps

• User Profiles• User Groups and Hierarchies

• Permission Sets• SSO / SAML• OAuth 2.0• Connected Apps

Page 43: Bbva workshop

Hands On Tutorials#3: Add App Logic with Clicks,

Not Code#4: Secure your System

Page 44: Bbva workshop

Mobility

Page 45: Bbva workshop

LUNCHSalesforce1 MobileiOS and Android app for Salesforce1

Page 46: Bbva workshop

Stay Up to Date with Notifications & Feeds

Developers

Stay Up to Date with Notifications & Feeds

Customers

Salesforce1 Mobile

Users

Distribute, & Manage Apps and Identity

Administrators

Embed Apps to Extend Business Processes

ISVs

Use Visualforce, HTML5, CSS, & JavaScript to Customize UI

Page 47: Bbva workshop

Salesforce1 Mobile

Specify order and pin favorites

Control visibility with profiles & permission sets

Personalize with recent items

Add apps

Page 48: Bbva workshop

Declarative & programmatic actions

Universal Notifications

Custom apps with HTML5, JavaScript, Visualforce, and Force.com Canvas

Global and contextual actions

Salesforce1

Page 49: Bbva workshop

Hands On Tutorials#7: Create a Salesforce1 App

Page 50: Bbva workshop

User Interface

Page 51: Bbva workshop

VisualforceComponent-based user interface framework on Salesforce1

Page 52: Bbva workshop

Every Object, Every Field: Apex and Visualforce Enabled

Visualforce PagesVisualforce Components

Apex ControllersApex Triggers

Custom UICustom UI

Custom LogicCustom Logic

Page 53: Bbva workshop

<apex:page StandardController="Contact" extensions="duplicateUtility" action="{!checkPhone}">

<apex:form>

<apex:outputField var="{!Contact.FirstName}” /> <apex:outputField var="{!Contact.LastName}" />

<apex:inputField var="{!Contact.Phone}" /> <apex:commandButton value="Update" action="{!quicksave}" />

</apex:form>

</apex:page>

Visualforce Components

Standard & Custom ControllersCustom Extensions

Data bound components Controller Callbacks

Page 54: Bbva workshop

• Apex FormsVisualforce component bound to an Apex Method

• Javascript RemotingAnnotated Apex methods exposed to JavaScript

Interacting with Data

Page 55: Bbva workshop

Mobile Cards

Display Visualforce or Related Lookups

1. Record header

2. Mobile cards display above all

related items

3. Set width to 100%. It sizes

automatically. Mobile card content

can’t be scrolled.

4. Control height from the PLE

5. Related lists display after mobile

cards

Page 56: Bbva workshop

Publisher Actions

Create actions and add them to the Chatter publisher

• Global vs Object Level• Create actions

• Log-a-call actions

• Update actions

• Custom actions• VF

• Canvas

Page 57: Bbva workshop

Visualforce Use Cases

• Embed custom UI into tabs and layouts• Visualforce dashboards• Generate PDF• Email templates

Page 58: Bbva workshop

Programmatic Development and Heroku

Page 59: Bbva workshop

ApexCloud-based programming language on Salesforce1

Page 60: Bbva workshop

Introduction to Apex

• Object-Oriented Language• Dot Notation Syntax• Cloud based compiling, debugging and unit

testing• “First Class” Citizen on the Platform

Page 61: Bbva workshop

public with sharing class myControllerExtension implements Util {

private final Account acct; public Contact newContact {get; set;} public myControllerExtension(ApexPages.StandardController stdController) { this.acct = (Account)stdController.getRecord(); }

public PageReference associateNewContact(Id cid) { newContact = [SELECT Id, Account from Contact WHERE Id =: cid LIMIT 1]; newContact.Account = acct; update newContact; }}

Apex Anatomy

Class and Interface based Scoped Variables Inline SOQL Inline DML

Page 62: Bbva workshop

Apex Triggers

• Event Based Logic

• Associated with Object Types

• Before or After:• Insert

• Update

• Delete

• Undelete

Page 63: Bbva workshop

Custom Controllers and Extensions

• Provide Custom Logic to Visualforce

• Extensions can be used with Standard Controllers

• One controller can span multiple pages

• Can expose logic via Remote Action

Page 64: Bbva workshop

Asynchronous Apex

• Batch & Scheduled Interfaces• Asynchronous processing

• Can handle queues of data• Can be scheduled to run later

• Similar to a cron job

Page 65: Bbva workshop

Apex Use Cases

• Outbound Email• Inbound Email• Custom API Endpoints• HTTP callouts

Page 66: Bbva workshop

Declarative before ProgrammaticUse declarative features when possible:

• Quicker to build• Easier to maintain and debug• Possible addition of new features• Do not count against governor limits

For example:• Will a workflow suffice instead of a trigger?• Will a custom layout work instead of

Visualforce?

Page 67: Bbva workshop

What is Heroku?

Everything you need to build, run and scale customer apps

Run virtually any language at any scale

DynosEnterprise grade Postgres as a service

DatabasesMarketplace for logging, data and more

Add-ons

Page 68: Bbva workshop

Supported Languages Buildpacks Databases

Heroku supports…

Ruby

Node.js

Java

Python

PHP (beta)

– Dart

– GO!

– Scala

– Clojure

– Erlang

– Perl

– And more…

Postgres

Redis

Mongo

CouchDB

Hadoop

TempDB

MySQL

Elasticsearch

Neo4j

Page 69: Bbva workshop

Heroku is…

Page 70: Bbva workshop

Smart driving assistant tracks driving, parking and vehicle performance

Developers able to focus on feature development by using Heroku Add-ons to provide infrastructure services

Product improvements deployed frequently to delight early adopters

Help people drive smarter and bring the power of connectivity to every car

Admittedly “obsessive about creating great user experiences in well-engineered products,” Automatic knew the Heroku platform would provide the flexibility their product requires while allowing them to focus less on infrastructure and more on user experience.

Page 71: Bbva workshop

Heroku Demo

Page 72: Bbva workshop

Heroku Exerciseshttp://bit.ly/heroku_qs

Alternatively:http://bit.ly/c9heroku

Page 73: Bbva workshop

Double-click to enter title

Double-click to enter text

The Wrap Up

Page 74: Bbva workshop

LUNCHSalesforce1 APIsFamily of APIs on the Salesforce1 Platform

Page 75: Bbva workshop

LUNCHCanvasFramework for embedding third party apps in Salesforce

Page 76: Bbva workshop

LUNCHMobile SDKDevelopment Kit for building hybrid and native iOS and Android apps

Page 77: Bbva workshop

LUNCHAppExchangeEnterprise marketplace for Salesforce1 Apps

Page 78: Bbva workshop

LUNCHHerokuPolyglot framework for hosting applications

Page 79: Bbva workshop

Double-click to enter title

Double-click to enter text

http://developer.force.com

Page 80: Bbva workshop

Developer Groups

Join a Salesforce Developer Grouphttp://bit.ly/fdc-dugs

Los Angeles Salesforce Developer Group:http://www.meetup.com/Los-Angeles-Force-com-Developer-Group/

Become a User Group LeaderEmail: April Nassi <[email protected]>

Page 81: Bbva workshop

simplicity is the ultimate form ofsophistication

- Da Vinci

Page 82: Bbva workshop

Thank You