Data Science Snaps
Bits for wannabe data scientist
Data Science Snaps
Bits for wannabe data scientist
Salesforce
Overview & Getting Started
Katia Bonella - May 30th 2019
Data Science Snaps
Bits for wannabe data scientist
CRM or Customer Relationship Management
is a strategy for managing an organisation's relationships and interactions
with customers and potential customers.
It uses data analysis about customers' history with a company
to improve business relationships with customers,
specifically focusing on customer retention and ultimately driving sales
growth.
Through the CRM approach and the systems used to facilitate it,
businesses learn more about their target audiences
and how to best cater to their needs.
What is CRM?
2
Data Science Snaps
Bits for wannabe data scientist
When people talk about CRM, they might mean any of three things:
3
● CRM as Technology
This is a technology product, often in the cloud,
that teams use to record, report and analyse interactions between the company and users.
This is also called a CRM system or solution.
● CRM as a Strategy
This is a business’ philosophy about how relationships with customers and
potential customers should be managed
● CRM as a Process
Think of this as a the system a business adopts to nurture and manage those relationships.
What is CRM?
Data Science Snaps
Bits for wannabe data scientist
●
4
●
●
●
●
Sales teams
Sales managers can access reliable information
about the progress of individual team members in achieving their sales targets.
Sales reps can spend more time selling and less time inputting data.
Marketing teams
They can get clear visibility over every opportunity or
lead, and map out the whole customer journey
Customer service teams
Without a common platform for customer interactions, communications can be missed or
lost in the flood of information – leading to an unsatisfactory response to a valued customer.
Supply-chain, procurement and partner management teams
Reporting enables businesses to compare the efficiency of suppliers and so manage their
entire supply chain more effectively.
HR team
They can use CRM to accelerate the recruitment process and track employee performance.
How do different business functions benefit from using CRM?
Data Science Snaps
Bits for wannabe data scientist
Why Salesforce?
5
Data Science Snaps
Bits for wannabe data scientist
Before Salesforce
6
Data is stored in different places and on different devices
Data Science Snaps
Bits for wannabe data scientist
After Salesforce
7
Data is all in Salesforce, accessible via the cloud form any device
Data Science Snaps
Bits for wannabe data scientist
Salesforce organizes your data
into objects and records.
You can think of objects
like a tab on a spreadsheet,
and a record
like a single row of data.
How Salesforce Organizes Your Data
8
Data Science Snaps
Bits for wannabe data scientist
●
9
●
●
●
●
Record
An item you are tracking in your database;
if your data is like a spreadsheet, then a record is a row on the spreadsheet
Field
A place where you store a value, like a name or address;
using our spreadsheet example, a field would be a column on the spreadsheet
Object
A table in the database;
in that spreadsheet example, an object is a tab on the spreadsheet
Org
Short for “organization,” the place where all your data, configuration, and customization
lives. You log in to access it. You might also hear this called “your instance of Salesforce”
App
A set of fields, objects, permissions, and functionality to support a business process
How Salesforce Organizes Your Data
Data Science Snaps
Bits for wannabe data scientist
●
●
●
●
Accounts
Accounts are the companies you’re doing business with.
You can also do business with individual people (like solo contractors) using something
called Person Accounts.
Contacts
Contacts are the people who work at an Account.
Leads
Leads are potential prospects.
You haven’t yet qualified that they are ready to buy or what product they need.
You don’t have to use Leads, but they can be helpful if you have team selling, or if
you have different sales processes for prospects and qualified buyers.
Opportunities
Opportunities are qualified leads that you’ve converted.
When you convert the Lead, you create an Account and Contact along with the Opportunity.
Salesforce Standard Objects
10
Data Science Snaps
Bits for wannabe data scientist
What is the Salesforce Architecture?
11
Data Science Snaps
Bits for wannabe data scientist
Salesforce has two different desktop user interfaces:
Lightning Experience and Salesforce Classic.
The Lightning Component framework is a UI framework
for developing single page applications for mobile and desktop devices.
Salesforce Lightning includes the Lightning Component Framework and some tools:
●
●
●
Lightning
12
Lightning components accelerate development and app performance.
Develop custom components that other developers and admins can use as reusable building
blocks to customize Communities, the Salesforce mobile app, and Lightning Experience.
Lightning App Builder empowers admins to build Lightning pages visually, without code,
using off-the-shelf and custom-built Lightning components.
Community Builder empowers admins to build communities visually, without code, using
Lightning templates and components.
Data Science Snaps
Bits for wannabe data scientist
• App-centric
web application
model
• UI Generation:
Client-side
• Recommend for
mobile
• Custom UI Custom
CSS
• Reuse nesting
components inside
other components
Visualforce or Lightning?
• Page-centric
web application
model
• UI Generation:
Server-side
• Recommend for
use third-party
framework es:
Angular or React
• Render as PDF
output
13
Data Science Snaps
Bits for wannabe data scientist
If you use Safari, we recommend using the latest version that Salesforce supports.
Apply all Apple software updates.
Salesforce currently doesn't support Analytics with Apple Safari.
Use Internet Explorer 11, Edge, or the latest version of Chrome or Firefox.
Supported Browsers for Lightning Experience
14
Data Science Snaps
Bits for wannabe data scientist
PDF
How render as PDF output in a standalone Lightning app?
• Solution in AppExchange (Salesforce Store)
cons: often this apps have a cost for every user
• Use Visualforce
cons: duplicate code, effort to mantain
• Use External JS Library
cons: disable Locker Service (powerful security architecture)
15
Data Science Snaps
Bits for wannabe data scientist
Where to learn?
https://trailhead.salesforce.com/
16
Data Science Snaps
Bits for wannabe data scientist
Trail
A trail is an ordered group of modules, projects or both
that provides a guided learnig path to learning a new skill, product, or role.
A module covers a single learning topics
A project is a series of hands-on steps
that let lets you learn Salesfroce skills
by putting them into practice
17
Data Science Snaps
Bits for wannabe data scientist
Trailhead Playground
A Trailhead Playground is an org that you can use for hands-on challenges,
learning new features, and testing Customizations.
You can create a illimitate number of Thrailhead Playgrpund.
18
Data Science Snaps
Bits for wannabe data scientist
Badges and Superbadges
Badges represent what you have learned,
are always earned by achieving
a measurable numeric goal.
Superbadges prove that you can take what
you have learned and apply it to solve
complex, real-world business problems.
Are a great way to test your Salesforce
chops at your own pace before scheduling a
certification exam.
19
Data Science Snaps
Bits for wannabe data scientist
Certifications
To maintain Salesforce Certification
credentials, all certified professionals must
successfully complete release maintenance
exams specific to their credential.
Depending on your credentials, you may have
anywhere from one to three release exams per
credential to complete each year.
20
Data Science Snaps
Bits for wannabe data scientist
My first Standalone Lightning App
Lightning Experience Development
Aura Components Basics
References:
21
Data Science Snaps
Bits for wannabe data scientist
Developer Console
22
Data Science Snaps
Bits for wannabe data scientist
MyApp.app
File → New → Lightning Application
Name: MyApp
MyApp.app
MyAppController.js
MyAppHelper.js
MyApp.css
MyApp.auradoc
MyAppRender.js
MyApp.svg
23
Data Science Snaps
Bits for wannabe data scientist
Preview
MyApp.app
<aura:application >
Hello World!
</aura:application>
24
Data Science Snaps
Bits for wannabe data scientist
Component
File → New → Lightning Component
Name: Component1
Component1.cmp
Component1Controller.js
Component1Helper.js
Component1.css
Component1.auradoc
Component1Render.js
Component1.design
Component1.svg
25
Data Science Snaps
Bits for wannabe data scientist
Add Component
Component1.cmp
<aura:component >
<p>I am Component 1</p>
</aura:component>
MyApp.app
<aura:application >
Hello World!
<c:Component1/>
</aura:application>
26
Data Science Snaps
Bits for wannabe data scientist
Add .zip
Create a Resource.zip with:
style.css
.logo {
background-image: url("logo1.jpg");
height: 30px;
width: 160px;
background-repeat: no-repeat;
}
p {
color: red;
}
logo1.jpg
logo2.png
27
Data Science Snaps
Bits for wannabe data scientist
Add Static Resource
Setup → Static Resource → New
Name: MyResource
28
Data Science Snaps
Bits for wannabe data scientist
MyAppController.js
Modify MyAppController.js
({
doInit : function(component, event, helper) {
document.title = "My First App";
var headTag = document.getElementsByTagName('head')[0];
var resourceCss = document.createElement("link");
resourceCss.setAttribute("href" , "../resource/MyResource/style.css");
resourceCss.setAttribute("rel" , "stylesheet");
headTag.appendChild(resourceCss);
}
})
29
Data Science Snaps
Bits for wannabe data scientist
MyApp.app
Modify MyApp.app
<aura:application >
<aura:handler name= "init" value= "{!this}" action= "{!c.doInit}" />
<div class= "logo"></div>
Hello World!
<c:Component1/>
<img src="../resource/MyResource/logo2.png"
width="126" height="100"/>
</aura:application>
30
Data Science Snaps
Bits for wannabe data scientist
Preview
31
Data Science Snaps
Bits for wannabe data scientist
Server-Side
• Server responses are handled asynchronously
• Apex controllers contain remote methods
your Lightning components can call
Identifier Context Meaning
c.
"{!c.doInit}"
Component
markup
Client-side controller
c. Controller
code
Server-side
controller
c: Markup Default namespaces
three “c”s is definitely
an opportunity for confusion
32
Data Science Snaps
Bits for wannabe data scientist
Apex Class
File → New → Apex Class
Name: ExpensesController
ExpensesController.apxc
public with sharing class ExpensesController {
@AuraEnabled
public static List<Expense__c> getExpenses() {
return [SELECT Id, Name, Amount__c
FROM Expense__c];
}
}
In Component’s controller
var action = component.get("c.getExpenses");
returns a remote method call to our Apex controller
33
Data Science Snaps
Bits for wannabe data scientist
SOQL
It returns the SOQL query results directly.
The Lightning Components framework handles all the
marshalling/unmarshalling work involved in most situations.
Salesforce Object Query Language
• Like SQL but optimized for Salesforce
• you can’t specify * for all fields
• Try Query in Query Editor
• Write Apex triggers to perform custom DB actions
Apex Triggers
public static List<Expense__c> getExpenses() {
return [SELECT Id, Name, Amount__c
FROM Expense__c]; }
34

Salesforce - Overview & Getting Started

  • 1.
    Data Science Snaps Bitsfor wannabe data scientist Data Science Snaps Bits for wannabe data scientist Salesforce Overview & Getting Started Katia Bonella - May 30th 2019
  • 2.
    Data Science Snaps Bitsfor wannabe data scientist CRM or Customer Relationship Management is a strategy for managing an organisation's relationships and interactions with customers and potential customers. It uses data analysis about customers' history with a company to improve business relationships with customers, specifically focusing on customer retention and ultimately driving sales growth. Through the CRM approach and the systems used to facilitate it, businesses learn more about their target audiences and how to best cater to their needs. What is CRM? 2
  • 3.
    Data Science Snaps Bitsfor wannabe data scientist When people talk about CRM, they might mean any of three things: 3 ● CRM as Technology This is a technology product, often in the cloud, that teams use to record, report and analyse interactions between the company and users. This is also called a CRM system or solution. ● CRM as a Strategy This is a business’ philosophy about how relationships with customers and potential customers should be managed ● CRM as a Process Think of this as a the system a business adopts to nurture and manage those relationships. What is CRM?
  • 4.
    Data Science Snaps Bitsfor wannabe data scientist ● 4 ● ● ● ● Sales teams Sales managers can access reliable information about the progress of individual team members in achieving their sales targets. Sales reps can spend more time selling and less time inputting data. Marketing teams They can get clear visibility over every opportunity or lead, and map out the whole customer journey Customer service teams Without a common platform for customer interactions, communications can be missed or lost in the flood of information – leading to an unsatisfactory response to a valued customer. Supply-chain, procurement and partner management teams Reporting enables businesses to compare the efficiency of suppliers and so manage their entire supply chain more effectively. HR team They can use CRM to accelerate the recruitment process and track employee performance. How do different business functions benefit from using CRM?
  • 5.
    Data Science Snaps Bitsfor wannabe data scientist Why Salesforce? 5
  • 6.
    Data Science Snaps Bitsfor wannabe data scientist Before Salesforce 6 Data is stored in different places and on different devices
  • 7.
    Data Science Snaps Bitsfor wannabe data scientist After Salesforce 7 Data is all in Salesforce, accessible via the cloud form any device
  • 8.
    Data Science Snaps Bitsfor wannabe data scientist Salesforce organizes your data into objects and records. You can think of objects like a tab on a spreadsheet, and a record like a single row of data. How Salesforce Organizes Your Data 8
  • 9.
    Data Science Snaps Bitsfor wannabe data scientist ● 9 ● ● ● ● Record An item you are tracking in your database; if your data is like a spreadsheet, then a record is a row on the spreadsheet Field A place where you store a value, like a name or address; using our spreadsheet example, a field would be a column on the spreadsheet Object A table in the database; in that spreadsheet example, an object is a tab on the spreadsheet Org Short for “organization,” the place where all your data, configuration, and customization lives. You log in to access it. You might also hear this called “your instance of Salesforce” App A set of fields, objects, permissions, and functionality to support a business process How Salesforce Organizes Your Data
  • 10.
    Data Science Snaps Bitsfor wannabe data scientist ● ● ● ● Accounts Accounts are the companies you’re doing business with. You can also do business with individual people (like solo contractors) using something called Person Accounts. Contacts Contacts are the people who work at an Account. Leads Leads are potential prospects. You haven’t yet qualified that they are ready to buy or what product they need. You don’t have to use Leads, but they can be helpful if you have team selling, or if you have different sales processes for prospects and qualified buyers. Opportunities Opportunities are qualified leads that you’ve converted. When you convert the Lead, you create an Account and Contact along with the Opportunity. Salesforce Standard Objects 10
  • 11.
    Data Science Snaps Bitsfor wannabe data scientist What is the Salesforce Architecture? 11
  • 12.
    Data Science Snaps Bitsfor wannabe data scientist Salesforce has two different desktop user interfaces: Lightning Experience and Salesforce Classic. The Lightning Component framework is a UI framework for developing single page applications for mobile and desktop devices. Salesforce Lightning includes the Lightning Component Framework and some tools: ● ● ● Lightning 12 Lightning components accelerate development and app performance. Develop custom components that other developers and admins can use as reusable building blocks to customize Communities, the Salesforce mobile app, and Lightning Experience. Lightning App Builder empowers admins to build Lightning pages visually, without code, using off-the-shelf and custom-built Lightning components. Community Builder empowers admins to build communities visually, without code, using Lightning templates and components.
  • 13.
    Data Science Snaps Bitsfor wannabe data scientist • App-centric web application model • UI Generation: Client-side • Recommend for mobile • Custom UI Custom CSS • Reuse nesting components inside other components Visualforce or Lightning? • Page-centric web application model • UI Generation: Server-side • Recommend for use third-party framework es: Angular or React • Render as PDF output 13
  • 14.
    Data Science Snaps Bitsfor wannabe data scientist If you use Safari, we recommend using the latest version that Salesforce supports. Apply all Apple software updates. Salesforce currently doesn't support Analytics with Apple Safari. Use Internet Explorer 11, Edge, or the latest version of Chrome or Firefox. Supported Browsers for Lightning Experience 14
  • 15.
    Data Science Snaps Bitsfor wannabe data scientist PDF How render as PDF output in a standalone Lightning app? • Solution in AppExchange (Salesforce Store) cons: often this apps have a cost for every user • Use Visualforce cons: duplicate code, effort to mantain • Use External JS Library cons: disable Locker Service (powerful security architecture) 15
  • 16.
    Data Science Snaps Bitsfor wannabe data scientist Where to learn? https://trailhead.salesforce.com/ 16
  • 17.
    Data Science Snaps Bitsfor wannabe data scientist Trail A trail is an ordered group of modules, projects or both that provides a guided learnig path to learning a new skill, product, or role. A module covers a single learning topics A project is a series of hands-on steps that let lets you learn Salesfroce skills by putting them into practice 17
  • 18.
    Data Science Snaps Bitsfor wannabe data scientist Trailhead Playground A Trailhead Playground is an org that you can use for hands-on challenges, learning new features, and testing Customizations. You can create a illimitate number of Thrailhead Playgrpund. 18
  • 19.
    Data Science Snaps Bitsfor wannabe data scientist Badges and Superbadges Badges represent what you have learned, are always earned by achieving a measurable numeric goal. Superbadges prove that you can take what you have learned and apply it to solve complex, real-world business problems. Are a great way to test your Salesforce chops at your own pace before scheduling a certification exam. 19
  • 20.
    Data Science Snaps Bitsfor wannabe data scientist Certifications To maintain Salesforce Certification credentials, all certified professionals must successfully complete release maintenance exams specific to their credential. Depending on your credentials, you may have anywhere from one to three release exams per credential to complete each year. 20
  • 21.
    Data Science Snaps Bitsfor wannabe data scientist My first Standalone Lightning App Lightning Experience Development Aura Components Basics References: 21
  • 22.
    Data Science Snaps Bitsfor wannabe data scientist Developer Console 22
  • 23.
    Data Science Snaps Bitsfor wannabe data scientist MyApp.app File → New → Lightning Application Name: MyApp MyApp.app MyAppController.js MyAppHelper.js MyApp.css MyApp.auradoc MyAppRender.js MyApp.svg 23
  • 24.
    Data Science Snaps Bitsfor wannabe data scientist Preview MyApp.app <aura:application > Hello World! </aura:application> 24
  • 25.
    Data Science Snaps Bitsfor wannabe data scientist Component File → New → Lightning Component Name: Component1 Component1.cmp Component1Controller.js Component1Helper.js Component1.css Component1.auradoc Component1Render.js Component1.design Component1.svg 25
  • 26.
    Data Science Snaps Bitsfor wannabe data scientist Add Component Component1.cmp <aura:component > <p>I am Component 1</p> </aura:component> MyApp.app <aura:application > Hello World! <c:Component1/> </aura:application> 26
  • 27.
    Data Science Snaps Bitsfor wannabe data scientist Add .zip Create a Resource.zip with: style.css .logo { background-image: url("logo1.jpg"); height: 30px; width: 160px; background-repeat: no-repeat; } p { color: red; } logo1.jpg logo2.png 27
  • 28.
    Data Science Snaps Bitsfor wannabe data scientist Add Static Resource Setup → Static Resource → New Name: MyResource 28
  • 29.
    Data Science Snaps Bitsfor wannabe data scientist MyAppController.js Modify MyAppController.js ({ doInit : function(component, event, helper) { document.title = "My First App"; var headTag = document.getElementsByTagName('head')[0]; var resourceCss = document.createElement("link"); resourceCss.setAttribute("href" , "../resource/MyResource/style.css"); resourceCss.setAttribute("rel" , "stylesheet"); headTag.appendChild(resourceCss); } }) 29
  • 30.
    Data Science Snaps Bitsfor wannabe data scientist MyApp.app Modify MyApp.app <aura:application > <aura:handler name= "init" value= "{!this}" action= "{!c.doInit}" /> <div class= "logo"></div> Hello World! <c:Component1/> <img src="../resource/MyResource/logo2.png" width="126" height="100"/> </aura:application> 30
  • 31.
    Data Science Snaps Bitsfor wannabe data scientist Preview 31
  • 32.
    Data Science Snaps Bitsfor wannabe data scientist Server-Side • Server responses are handled asynchronously • Apex controllers contain remote methods your Lightning components can call Identifier Context Meaning c. "{!c.doInit}" Component markup Client-side controller c. Controller code Server-side controller c: Markup Default namespaces three “c”s is definitely an opportunity for confusion 32
  • 33.
    Data Science Snaps Bitsfor wannabe data scientist Apex Class File → New → Apex Class Name: ExpensesController ExpensesController.apxc public with sharing class ExpensesController { @AuraEnabled public static List<Expense__c> getExpenses() { return [SELECT Id, Name, Amount__c FROM Expense__c]; } } In Component’s controller var action = component.get("c.getExpenses"); returns a remote method call to our Apex controller 33
  • 34.
    Data Science Snaps Bitsfor wannabe data scientist SOQL It returns the SOQL query results directly. The Lightning Components framework handles all the marshalling/unmarshalling work involved in most situations. Salesforce Object Query Language • Like SQL but optimized for Salesforce • you can’t specify * for all fields • Try Query in Query Editor • Write Apex triggers to perform custom DB actions Apex Triggers public static List<Expense__c> getExpenses() { return [SELECT Id, Name, Amount__c FROM Expense__c]; } 34