Академический Документы
Профессиональный Документы
Культура Документы
@salesforcedocs
Last updated: January 15, 2019
© Copyright 2000–2018 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark of salesforce.com, inc.,
as are other names and marks. Other marks appearing herein may be trademarks of their respective owners.
CONTENTS
Salesforce IoT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Key Concepts in Salesforce IoT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Enable Salesforce IoT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Create a Context in Salesforce IoT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Create an Orchestration in Salesforce IoT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Define States in Salesforce IoT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Create a Rule in Salesforce IoT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Activate an Orchestration in Salesforce IoT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Troubleshoot New Orchestrations in Salesforce IoT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Send Event Messages from Inside Salesforce IoT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Verify That Event Messages Are Received in Salesforce IoT . . . . . . . . . . . . . . . . . . . . . . . . . 21
Show Your Data Anywhere in Salesforce with IoT Insights . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Monitor Orchestration Activity in Salesforce IoT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Allocations in Salesforce IoT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Monitor Usage in Salesforce IoT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
SALESFORCE IOT
Use Salesforce IoT to process event messages and integrate them with Salesforce records.
EDITIONS
1
Salesforce IoT Key Concepts in Salesforce IoT
Orchestration States
Each orchestration state is a set of rules that are evaluated for an event message. A rule is a combination of conditions and actions, and
drives transitions to a new state. A rule can trigger actions to create or manipulate records in Salesforce. For example, an orchestration
for a solar panel can have one state for low-power generation and another state for damaged cells. An action in the low-power output
state creates a case to request maintenance for the solar panel. The damaged cell state creates an opportunity to sell a new solar panel.
This image shows the traffic view for an orchestration that receives and processes solar panel events.
2
Salesforce IoT Orchestrations in Salesforce IoT
A rule can use custom variables that you define to persist values. Actions within a rule can set variable values.
This image shows the rules view of the solar panel orchestration. Even though the rules view appears linear, remember that an orchestration
is a nonlinear state machine.
3
Salesforce IoT Orchestrations in Salesforce IoT
You can also define global rules. A global rule applies at all times, regardless of state. Both state rules and global rules can be time-based.
Specify a time in hours or days to delay the evaluation of a rule after a state has been entered.
For each incoming event, the system uses a key field to identify and execute the associated orchestration instance. If an orchestration
instance isn’t running for that key, the system creates an orchestration instance that starts in the default state. An orchestration instance
can be in only one state at one time. A rule can transition the orchestration instance to another state. If a transition doesn’t occur, the
orchestration instance remains in the default state.
SEE ALSO:
Create a Context in Salesforce IoT
Create an Orchestration in Salesforce IoT
4
Salesforce IoT Orchestrations in Salesforce IoT
b. Evaluates global rules for which the When column is set to Instance Created. Available for an extra cost
in: Enterprise, Performance,
c. Starts the timers for the time-based global rules.
and Unlimited Editions
2. Updates the variables that have defined values on the Variables tab.
3. Evaluates the global rules from the top down until the orchestration instance transitions to a new state. Time-based global rules and
global rules for which the When column is set to Instance Created are skipped.
4. If a global rule doesn’t cause a transition to a new state, the current state’s rules are evaluated in this order.
a. From the top down until the orchestration instance transitions to a new state, time-based rules and rules for which the When
column is set to State Entered are skipped.
b. If the evaluated rules transition the orchestration instance to a new state, all timers for this state are stopped.
SEE ALSO:
Key Concepts in Salesforce IoT
Create an Orchestration in Salesforce IoT
5
Salesforce IoT Enable Salesforce IoT
USER PERMISSIONS
Note: If you want to associate your event data with data in Salesforce records, the Salesforce Available in: Lightning
object must contain a field that you can use as a key. The key field must be unique so that Experience
only one record matches an orchestration instance. The key field can be one of the following: Available in: Developer
• Salesforce ID field Edition
• Text or number field with the Unique attribute enabled Available for an extra cost
in: Enterprise, Performance,
Note: Before you add platform events to the context, you must define them. For more and Unlimited Editions
information, see Platform Event Fields in the Platform Events Developer Guide.
1. From Setup, enter IoT in the Quick Find box, then select Contexts. USER PERMISSIONS
2. Click New Context.
To use Salesforce IoT:
3. Enter a context name. • API Enabled AND
4. To distinguish this context from others, enter a description and click Create. The description Customize Application
AND Manage Flow
appears on the context detail page.
5. Click Edit, and add event data and reference data.
6. Click Add Event Data, and select a platform event from the list.
A preview of the selected event fields is displayed.
7. Click Next.
8. Select a key field, and click Apply.
The key associates each incoming event with an orchestration instance.
6
Salesforce IoT Create an Orchestration in Salesforce IoT
Note: You can associate a context with an orchestration only when creating an orchestration. USER PERMISSIONS
After the orchestration is created, you can’t associate it with another context.
To use Salesforce IoT:
• API Enabled AND
SEE ALSO: Customize Application
Create a Context in Salesforce IoT AND Manage Flow
Create a Rule in Salesforce IoT
Define States in Salesforce IoT
7
Salesforce IoT Define States in Salesforce IoT
8
Salesforce IoT Define States on the Rules Tab in Salesforce IoT
9
Salesforce IoT Specify When to Evaluate a Rule in Salesforce IoT
SEE ALSO:
Specify When to Evaluate a Rule in Salesforce IoT
Define Conditions in Salesforce IoT
Add an Action in Salesforce IoT
Add a State Transition in Salesforce IoT
10
Salesforce IoT Define Conditions in Salesforce IoT
Example: This example uses the && logical operator to combine two conditions and the Available in: Developer
FLOOR function of the Salesforce Expression Language. The function is passed a value from Edition
a defined variable (CartridgePrice). Available for an extra cost
(MyEvent__e.Ink_Percentage__c < 25) && (FLOOR(CartridgePrice) in: Enterprise, Performance,
< 50) and Unlimited Editions
USER PERMISSIONS
SEE ALSO:
How to Reference Event, Variable, and Salesforce Record Values from Orchestrations in Salesforce To use Salesforce IoT:
IoT • API Enabled AND
Customize Application
Help: Salesforce Expression Language: Formula Operators and Functions AND Manage Flow
11
Salesforce IoT Add an Action in Salesforce IoT
8. Enter a unique, concise action name that describes what the action does.
A brief descriptive action name makes your orchestration rule easy to understand when viewing the Rules tab.
9. Click Finish.
10. Save your orchestration.
SEE ALSO:
Add an Action in Salesforce IoT
How to Reference Event, Variable, and Salesforce Record Values from Orchestrations in Salesforce IoT
12
Salesforce IoT Add an Action in Salesforce IoT
9. Click Finish.
10. Save your orchestration.
Choose or create orchestration variables to store the record’s field values. In a separate rule that’s triggered by the response event, add
an action that assigns the response event’s field values to orchestration variables.
SEE ALSO:
Add an Action in Salesforce IoT
How to Reference Event, Variable, and Salesforce Record Values from Orchestrations in Salesforce IoT
13
Salesforce IoT Add an Action in Salesforce IoT
SEE ALSO:
Add an Action in Salesforce IoT
How to Reference Event, Variable, and Salesforce Record Values from Orchestrations in Salesforce IoT
14
Salesforce IoT Add an Action in Salesforce IoT
SEE ALSO:
Add an Action in Salesforce IoT
How to Reference Event, Variable, and Salesforce Record Values from Orchestrations in Salesforce IoT
15
Salesforce IoT Add a State Transition in Salesforce IoT
SEE ALSO:
Define States in Salesforce IoT
16
Salesforce IoT How to Reference Event, Variable, and Salesforce Record
Values from Orchestrations in Salesforce IoT
17
Salesforce IoT Activate an Orchestration in Salesforce IoT
18
Salesforce IoT Troubleshoot New Orchestrations in Salesforce IoT
1. From Setup, enter IoT in the Quick Find box, then select Orchestrations.
2. Select an orchestration, and click .
3. Enter a key value, and click Start Tracker.
The tracker monitors the orchestration for 30 days and expires automatically. If you want to track the same orchestration and key
value after it expires, you must set it up again.
Trackers show the following orchestration log types for the past 24 hours:
• Events
• Actions
• Errors
• Transitions
• Variables
• Timers
19
Salesforce IoT Send Event Messages from Inside Salesforce IoT
• Rules
• Throttles
You can delete a tracker before it expires. When you delete a tracker, the logs are removed from the UI. Logs for the past 24 hours of
activity are stored in the Apex debug logs.
SEE ALSO:
Activate an Orchestration in Salesforce IoT
Monitor Orchestration Activity in Salesforce IoT
USER PERMISSIONS
20
Salesforce IoT Verify That Event Messages Are Received in Salesforce IoT
USER PERMISSIONS
21
Salesforce IoT Show Your Data Anywhere in Salesforce with IoT Insights
22
Salesforce IoT Show Your Data Anywhere in Salesforce with IoT Insights
23
Salesforce IoT Show Your Data Anywhere in Salesforce with IoT Insights
Property Details
Orchestration Choose the orchestration that contains the variables you want to show.
24
Salesforce IoT Show Your Data Anywhere in Salesforce with IoT Insights
Example: By adding Salesforce IoT data to record pages, IoT Insights gives service representatives diagnostic and operational
data about connected devices. This enhanced data can help your service team quickly and proactively solve customer issues.
25
Salesforce IoT Monitor Orchestration Activity in Salesforce IoT
SEE ALSO:
Orchestrations in Salesforce IoT
Troubleshoot New Orchestrations in Salesforce IoT
26
Salesforce IoT Monitor Usage in Salesforce IoT
1
The maximum event message count can include non-unique event messages. For example, if three orchestrations process the same
event message, the count of event messages processed is increased by three, not one.
In addition, the following allocations apply for platform events.
• Maximum number of event notifications published per hour
• Maximum number of platform event definitions that can be created in an org
SEE ALSO:
Platform Events Developer Guide : Platform Event Allocations
USER PERMISSIONS
27
Salesforce IoT Monitor Event and Orchestration Usage in Salesforce IoT
USER PERMISSIONS
SEE ALSO:
Allocations in Salesforce IoT
28
Salesforce IoT Get Email Alerts for High Event Usage in Salesforce IoT
SEE ALSO:
Allocations in Salesforce IoT
29
INDEX
A S
Action, Salesforce IoT Salesforce IoT 1
adding 11 Salesforce IoT action
create Salesforce records 12 adding 11
delete Salesforce records 15 create Salesforce records 12
edit Salesforce records 14 delete Salesforce records 15
read Salesforce records 13 edit Salesforce records 14
Activity Log 26 read Salesforce records 13
Salesforce IoT Activity Log 26
C Salesforce IoT conditions
Conditions, Salesforce IoT create a condition 11
create a condition 11 Salesforce IoT contexts
contexts, Salesforce IoT create a context 6
create a context 6 Salesforce IoT Insights 21
Salesforce IoT orchestrations
E create an orchestration 7
Event Sender 20 overview 2
Explorer limits 26 Salesforce IoT Orchestrations
activate an orchestration 18
H reference event and record fields, and variables 17
High-Usage Email 29 Salesforce IoT rules
create a rule 9–10
I Salesforce IoT state transition 16
IoT Event Sender 20 Salesforce IoT states
IoT Event Viewer 21 add in Rules tab 9
IoT Insights component 21 add in States tab 8
IoT Usage Email 29 add to an orchestration 8
Salesforce IoT Usage 27
O Salesforce IoT Usage Data 28
Orchestrations, Salesforce IoT Send IoT Events 20
activate an orchestration 18 State transition, Salesforce IoT 16
create an orchestration 7 States, Salesforce IoT
overview 2 add in Rules tab 9
reference event and record fields, and variables 17 add in States tab 8
Orchestrations, Troubleshoot 18 add to an orchestration 8
R T
Rules, Salesforce IoT Tracker 18
create a rule 9–10 Transition, Salesforce IoT 16
30