chatter publisher actions and salesforce1

29
Chatter Publisher Actions and Salesforce1 a practical introduction to Chatter Publisher Actions Stephen Willcock, FinancialForce.com, Director of Product Innovation @stephenwillcock Carolina Ruiz Medina, FinancialForce.com, Principal Developer in Product Innovation @CarolEnLaNube

Upload: salesforce-developers

Post on 13-Jul-2015

392 views

Category:

Technology


5 download

TRANSCRIPT

Page 1: Chatter Publisher Actions and Salesforce1

Chatter Publisher Actions and Salesforce1a practical introduction to Chatter Publisher Actions

Stephen Willcock, FinancialForce.com, Director of Product Innovation

@stephenwillcock

Carolina Ruiz Medina, FinancialForce.com, Principal Developer in Product Innovation

@CarolEnLaNube

Page 2: Chatter Publisher Actions and Salesforce1

All about FinancialForce.com

Revolutionizing the Back Office

#1 Accounting, Billing and PSA Apps on the Salesforce platform

Native apps

San Francisco HQ, 595 Market St

R&D in San Francisco, Harrogate UK, and Granada ES

We are hiring! Meet us at Rehab!

Page 3: Chatter Publisher Actions and Salesforce1

Salesforce One and Chatter Publisher Actions

Mobile Force.com Social

Mobile

Force.com

Social

Chatter Publisher Actions

Mobile Cards Flexipages

Notifications

Page 4: Chatter Publisher Actions and Salesforce1

Take a micro-moment…

Salesforce Chatter Mobile Makes Every Moment Count

New Chatter Mobile is the world’s first social and mobile

application that will allow employees to take any business action

instantly, from anywhere... With the new customizable

publisher, companies will be able to create actions that

empower employees to perform custom business activities...

Now, employees will get valuable work done in every micro-

moment—all from the Chatter feed.

Salesforce press release - July 2013

Page 5: Chatter Publisher Actions and Salesforce1

What are Chatter Publisher Actions?

Never mind about Publisher Actions…

what is the Chatter Publisher?

Page 6: Chatter Publisher Actions and Salesforce1

What are Chatter Publisher Actions?

Page 7: Chatter Publisher Actions and Salesforce1

Chatter Publisher Actions

Object

Global

Custom Create UpdateCanvas Log a Call

Visualforce Clicks-not-codeCanvas

Mobile smart actionsDefault actions

Page 8: Chatter Publisher Actions and Salesforce1

Actions in use

User ProfilesUser

Profiles

Record Types

Record Types

Salesforce One

Salesforce One

Standard UIStandard UI

MobileMobile

DesktopDesktop

Page LayoutsPage

Layouts

Global PublisherLayouts

Global PublisherLayouts

ObjectsObjects

Page 9: Chatter Publisher Actions and Salesforce1

When to use custom actions• Retrieve data from / update related records

• Multiple update / create

• Logic• Respond to user interaction

• Calculation / process

• Call APIs

Page 10: Chatter Publisher Actions and Salesforce1

Custom Action use cases

Create case on Account

• Query other related records

• Apply logic to available values and guide the user

Time recording against Tasks

• Query related records and make a calculation based on them

• Insert or update related records depending on outcome

Page 11: Chatter Publisher Actions and Salesforce1

Implementation options

• Classic Visualforce

• Visualforce form submit

• AJAX Visualforce

• much Visualforce is valid, although some is not useful!

• Javascript Remoting + HTML/CSS/JavaScript

• Hybrid: Visualforce + HTML/CSS

Page 12: Chatter Publisher Actions and Salesforce1

Design considerations

• Recommended limit to 9 actions (including standard) per layout

• Custom action Visualforce page rendered in IFRAME

• Height must be specified and is fixed

• Take care when reaching outside of IFRAME

• Design for mobile and browser

• Compromise

• Adapt

• Micro-moments

Page 13: Chatter Publisher Actions and Salesforce1

Design considerations: action lifecycle

Model

Desktop / Web UI Mobile / Salesforce1

APIs

Cyclic Modal

Publisher Refresh (feed)Redirect

Submit action

Page 14: Chatter Publisher Actions and Salesforce1

Plain old Visualforce<apex:page standardcontroller="Account"

extensions="AccountActivityTimeActionController"

showHeader="false">

<apex:form >

<apex:selectList value="{!SelectedTask}" multiselect="false"

label="Task" size="10" style="width:100%;">

<apex:actionSupport event="onchange" action="{!changeTask}"

rerender="logPanel"/>

<apex:selectOptions value="{!SelectableTasks}"/>

</apex:selectList>

Page 15: Chatter Publisher Actions and Salesforce1

Plain old Visualforce<apex:outputPanel id="logPanel">

<apex:repeat var="item" value="{!log}”>{!item}<br/></apex:repeat>

</apex:outputPanel>

</apex:form>

</apex:page>

Page 16: Chatter Publisher Actions and Salesforce1

Publisher APIs

<script type='text/javascript' src='/canvas/sdk/js/publisher.js'/>

Page 17: Chatter Publisher Actions and Salesforce1

Refresh feed (desktop)Sfdc.canvas.publisher.publish({ name: 'publisher.refresh',

payload: {feed:true}

});

Page 18: Chatter Publisher Actions and Salesforce1

Submit hook (Salesforce1)Sfdc.canvas.publisher.subscribe({name: "publisher.showPanel",

onData:function(e) {

Sfdc.canvas.publisher.publish({name:

"publisher.setValidForSubmit", payload:"true"});

}});

Sfdc.canvas.publisher.subscribe({ name: "publisher.post",

onData: function(e) {

alert("call some remote action here");

Sfdc.canvas.publisher.publish({ name: "publisher.close",

payload:{ refresh:"true" }});

}});

Page 19: Chatter Publisher Actions and Salesforce1

Redirect (Salesforce1)sforce.one.navigateToSObject(recordId,view)

sforce.one.navigateToURL(url)

sforce.one.navigateToFeed(subjectId, type)

sforce.one.navigateToFeedItemDetail(feedItemID)

sforce.one.navigateToRelatedList(relatedListId, parentRecordId)

sforce.one.navigateToList(listViewId, listViewName, scope)

sforce.one.createRecord(entityName, recordTypeId)

sforce.one.editRecord(recordId)

Page 20: Chatter Publisher Actions and Salesforce1

Adaptif( (typeof sforce != 'undefined') && (sforce != null) ) {

// Salesforce1

} else {

// Desktop

}

Page 21: Chatter Publisher Actions and Salesforce1

Salesforce1 and FinancialForce Accounting

• Use Case

• Collaborative Collections / 360º BackOffice

• Invoice Conversation

• Credit Limit Conversation

• Raise Account

• Etc.

• Implementation

Lets use what Salesforce1 has for us!

Page 22: Chatter Publisher Actions and Salesforce1

Implementation Element: Flexipage

Implementation

1. FlexiPage

What is it ?!

Setup Create Tabs

Page 23: Chatter Publisher Actions and Salesforce1

Flexipage Metadata

• List Views

• Recent Records

• Global Chatter Actions

Page 24: Chatter Publisher Actions and Salesforce1

Salesforce1 and FinancialForce Accounting

• Implementation

• FlexiPage• List Views

• Recent Records

• Global Chatter Actions

Page 25: Chatter Publisher Actions and Salesforce1

Salesforce1 and FinancialForce Accounting

• Implementation

• Mobile Card

What is it?

It is like an inline Visualforce

page for mobile devices only.

Page 26: Chatter Publisher Actions and Salesforce1

Salesforce1 and FinancialForce Accounting

• Implementation

• Custom Action• Visualforce

• JQuery Mobile

Page 27: Chatter Publisher Actions and Salesforce1

Invoice Conversation

Salesforce1 demonstration

Page 28: Chatter Publisher Actions and Salesforce1

Stephen Willcock

Director of Product Innovation at

FinancialForce.com@stephenwillcock

Carolina Ruiz

Principal Developer, Product Innovation at

FinancialForce.com@CarolEnLaNube

Page 29: Chatter Publisher Actions and Salesforce1