All contents © MuleSoft, LLC
Online MuleSoft Meetup
Thank you for joining us today! Please introduce yourself in the chat!
We will get started shortly
Welcome to the
All contents © MuleSoft, LLC
Meet your Meetup leaders
2
Join the group at https://meetups.mulesoft.com/online-group-english/
to be notified of all future events
All contents © MuleSoft, LLC
Some guidelines
3
● Use the chat and Q&A link to ask questions and comment.
● Slides and recording will be shared within 24 hours on the
event page.
All contents © MuleSoft, LLC
Announcements
All contents © MuleSoft, LLC
Upcoming Community Meetups
Weekly events
• Check out all upcoming events every week here
Over 150 groups world wide
• Join from anywhere!
→ Join the Global Group: meetups.mulesoft.com/online-group-english
→ RSVP for upcoming events: meetups.mulesoft.com/events
All contents © MuleSoft, LLC
Upcoming and On-demand Webinars
Upcoming Webinar
Accelerate Center for Enablement delivery
with an API Community
Description: When building out a Center for
Enablement (C4E), the concentration is often strictly
around the technology. As a result, there is less focus on
the people who will be a part of the broader API
community. To truly engage C4E across the
organization, C4E teams need to enable through
engagement layers, promote C4E benefits, and
evangelize the C4E by highlighting assets and sharing
best practices. In this webinar we will:
● Explore API catalog best practices to enable self-service
● Understand channels of engagement for your C4E
● Discover best practices used by other organizations for
building API communities
Watch Now On-demand!
On-demand Webinar
How to Accelerate C4E Delivery: Developing an Integration
Architecture and SDLC Model
Description: When developing a Center for Enablement
(C4E), understanding your delivery model tech stack and
determining its management for a stable environment is a
critical component for success. As such, it's essential to have
a firm understanding of what your integration architecture
looks like and understand the Software Development
Lifecycle (SDLC) and Continuous Integration/ Continuous
Delivery (CI/CD) processes used to govern it.
● Core services and building blocks of your integration
architecture
● Examples of reference architecture diagrams
● Architecture governance team structures
● CI/CD tools to ensure the proper delivery of applications
● Testing strategies to ensure deliverables are meeting
stakeholder expectations
Register HERE to watch on March 22/23 or
On-demand after!
All contents © MuleSoft, LLC 7
Become a MuleSoft Mentor
Who are MuleSoft Mentors?
● Individuals eager to become active
contributors across platforms
● Hold 1+ MuleSoft certifications (not
required!)
Why should you become a Mentor?
● Build your professional and personal brand
● Help others skill up
● Earn recognition as a Mule expert by
MuleSoft and the broader ecosystem
Apply now
mulesoft.com/mentors
A top community program
All contents © MuleSoft, LLC
1.How to create an API specification in RAML
2.Connecting the Anypoint Platform with an
AWS Transit Gateway
3.Implement a REST API using APIKit
4.MuleSoft Error Handling
5.API Manager Overview - API Autodiscovery
vs. API Proxies
Friends of Max
1.Setting Up Slack Connector in Anypoint Studio
2.Implement a REST API using APIKit
3.Customer facing self-help resources
4.Catalyzing Your Implementation Success
5.Connecting the Anypoint Platform with an AWS
Transit Gateway
6.Reusable assets over the full API lifecycle
7.Dependency Management
What’s New & What’s Trending
What’s new with Friends of Max? Top Videos in February
All contents © MuleSoft, LLC
We have 12 new Connectors ready for use
New Connectors in Exchange
Anypoint Connectors
Azure Cosmos DB
Dropbox
Google Pub/Sub
Mailchimp
Microsoft Business Central
MS Outlook
NetSuite Restlet
Sendgrid
Shopify
Tableau
Composer Connectors
Zendesk
Zuora
Quickbooks Online
9
READ THE BLOG POST HERE
All contents © MuleSoft, LLC
Salesforce Streaming APIs
Elza Circiu
Anant Alok
All contents © MuleSoft, LLC
Elza Circiu
MuleSoft
Professional Services
Speakers Intro
11
Anant Alok
MuleSoft
Professional Services
All contents © MuleSoft, LLC
Agenda
12
The Four
Streaming
APIs
MuleSoft
Support
Demo Q & A
All contents © MuleSoft, LLC
The Four Streaming APIs
An Introduction
All contents © MuleSoft, LLC
The Four Streaming APIs
14
All contents © MuleSoft, LLC
Four Different APIs Built Around a Shared Model
A single technology:
● Publish/Subscribe, Event Driven Architecture
● Push Technology with Replay Capability
Common Use Cases:
● Real time notifications
● Process automation
● Data Replication
● Audit & Compliance 15
All contents © MuleSoft, LLC
Publish/Subscribe Architecture
17
All contents © MuleSoft, LLC
Message Durability
19
Change Data
Capture
2nd Generation
Streaming APIs
1st Generation
Platform
Events
PushTopics
Generic Events
72 hours
24 hours
All contents © MuleSoft, LLC
Platform Events
All contents © MuleSoft, LLC
21
Salesforce Platform Events
All contents © MuleSoft, LLC
Publishing Platform events
❖ internally from the Salesforce platform
➢ APEX code
➢ process builder
➢ flows
❖ externally via Salesforce APIs
Platform Event publish behavior:
● Publish after commit - event message is
published only after the transaction commits
successfully
● Publish immediately - event message is
published when the publish call executes
23
All contents © MuleSoft, LLC
Publishing a Platform Event using Salesforce Process Builder
Publishing Platform events
24
All contents © MuleSoft, LLC
Change Data Capture
All contents © MuleSoft, LLC
Architecture to enable Synchronization at scale
Change Data Capture publishes events for changes in Salesforce records corresponding to
create, update, delete and undelete operations.
Change Events Lifecycle
● Data Change events are captured at the moment they happen
● Events are published to a durable event stream
● Subscribing clients listen to the event stream & consume events
26
All contents © MuleSoft, LLC
Enabling Change Data Capture
27
All contents © MuleSoft, LLC
Platform Events vs Change Data Capture
29
{
"data": {
"schema": "8_j4Jvbl5vY1cUg6ykKsKw",
"payload": {
"LastModifiedDate": "2021-10-21T03:40:09.000Z",
"Phone": "(336) 222-7000",
"ChangeEventHeader": {
"commitNumber": 202866745235,
"commitUser": "0055j000000vpBOAAY",
"sequenceNumber": 1,
"entityName": "Account",
"changeType": "UPDATE",
"changedFields": [
"Phone",
"LastModifiedDate"
],
"changeOrigin": "",
"transactionKey":
"00046797-0e54-b5dd-3ba7-97e31380dd57",
"commitTimestamp": 1634787609000,
"recordIds": [
"0015j000007aJyAAAU"
]
}
},
"event": {
"replayId": 40532028
}
},
"channel": "/data/AccountChangeEvent"
}
Sample events
{
"data" : {
"schema" : "fxnhBTVoCql1BwaszeK2iQ",
"payload" : {
"CreatedById" : "0055g000005O2lwAAC",
"Contact_Name__c" : "Test PEDemo3",
"CreatedDate" : "2021-11-07T06:08:38.959Z",
"Contact_Id__c" : "0035g00000HvOv8AAF"
},
"event" : {
"replayId" : 1134652
}
},
"channel" : "/event/New_Contact_notification__e"
}
All contents © MuleSoft, LLC
MuleSoft Salesforce Connector
All contents © MuleSoft, LLC
MuleSoft Connector Operations
31
1. Subscribe Channel Listener
2. Subscribe Topic Listener
3. Replay Channel Listener
4. Replay Topic Listener
All contents © MuleSoft, LLC
Replaying Events
32
MuleSoft Connector Option Salesforce API Option ReplayID Required? Behavior
ALL -2 No Subscriber receives all events including past events
within the retention window and new events after the
subscription
FROM REPLAY ID REPLAY ID Yes Subscriber receives only events with ReplayId >
specified ReplayId
ONLY NEW -1 No Subscriber receives new events broadcasts after
client subscription
Replay Options
All contents © MuleSoft, LLC
Demo
All contents © MuleSoft, LLC
All contents © MuleSoft, LLC
Q & A
All contents © MuleSoft, LLC
References
All contents © MuleSoft, LLC
References
38
● https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/intro_strea
m.htm
● https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platfor
m_events_publish_process.htm
● https://trailhead.salesforce.com/en/content/learn/modules/change-data-capture/understand-cha
nge-data-capture
● https://docs.mulesoft.com/salesforce-connector/10.14/salesforce-connector-reference
● https://developer.salesforce.com/blogs/2018/07/which-streaming-event-do-i-use
● https://developer.salesforce.com/docs/atlas.en-us.234.0.change_data_capture.meta/change_data
_capture/cdc_allocations.htm
● https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platfor
m_event_limits.htm
All contents © MuleSoft, LLC
Thank you!

MuleSoft Online Meetup - Salesforce Streaming APIs

  • 1.
    All contents ©MuleSoft, LLC Online MuleSoft Meetup Thank you for joining us today! Please introduce yourself in the chat! We will get started shortly Welcome to the
  • 2.
    All contents ©MuleSoft, LLC Meet your Meetup leaders 2 Join the group at https://meetups.mulesoft.com/online-group-english/ to be notified of all future events
  • 3.
    All contents ©MuleSoft, LLC Some guidelines 3 ● Use the chat and Q&A link to ask questions and comment. ● Slides and recording will be shared within 24 hours on the event page.
  • 4.
    All contents ©MuleSoft, LLC Announcements
  • 5.
    All contents ©MuleSoft, LLC Upcoming Community Meetups Weekly events • Check out all upcoming events every week here Over 150 groups world wide • Join from anywhere! → Join the Global Group: meetups.mulesoft.com/online-group-english → RSVP for upcoming events: meetups.mulesoft.com/events
  • 6.
    All contents ©MuleSoft, LLC Upcoming and On-demand Webinars Upcoming Webinar Accelerate Center for Enablement delivery with an API Community Description: When building out a Center for Enablement (C4E), the concentration is often strictly around the technology. As a result, there is less focus on the people who will be a part of the broader API community. To truly engage C4E across the organization, C4E teams need to enable through engagement layers, promote C4E benefits, and evangelize the C4E by highlighting assets and sharing best practices. In this webinar we will: ● Explore API catalog best practices to enable self-service ● Understand channels of engagement for your C4E ● Discover best practices used by other organizations for building API communities Watch Now On-demand! On-demand Webinar How to Accelerate C4E Delivery: Developing an Integration Architecture and SDLC Model Description: When developing a Center for Enablement (C4E), understanding your delivery model tech stack and determining its management for a stable environment is a critical component for success. As such, it's essential to have a firm understanding of what your integration architecture looks like and understand the Software Development Lifecycle (SDLC) and Continuous Integration/ Continuous Delivery (CI/CD) processes used to govern it. ● Core services and building blocks of your integration architecture ● Examples of reference architecture diagrams ● Architecture governance team structures ● CI/CD tools to ensure the proper delivery of applications ● Testing strategies to ensure deliverables are meeting stakeholder expectations Register HERE to watch on March 22/23 or On-demand after!
  • 7.
    All contents ©MuleSoft, LLC 7 Become a MuleSoft Mentor Who are MuleSoft Mentors? ● Individuals eager to become active contributors across platforms ● Hold 1+ MuleSoft certifications (not required!) Why should you become a Mentor? ● Build your professional and personal brand ● Help others skill up ● Earn recognition as a Mule expert by MuleSoft and the broader ecosystem Apply now mulesoft.com/mentors A top community program
  • 8.
    All contents ©MuleSoft, LLC 1.How to create an API specification in RAML 2.Connecting the Anypoint Platform with an AWS Transit Gateway 3.Implement a REST API using APIKit 4.MuleSoft Error Handling 5.API Manager Overview - API Autodiscovery vs. API Proxies Friends of Max 1.Setting Up Slack Connector in Anypoint Studio 2.Implement a REST API using APIKit 3.Customer facing self-help resources 4.Catalyzing Your Implementation Success 5.Connecting the Anypoint Platform with an AWS Transit Gateway 6.Reusable assets over the full API lifecycle 7.Dependency Management What’s New & What’s Trending What’s new with Friends of Max? Top Videos in February
  • 9.
    All contents ©MuleSoft, LLC We have 12 new Connectors ready for use New Connectors in Exchange Anypoint Connectors Azure Cosmos DB Dropbox Google Pub/Sub Mailchimp Microsoft Business Central MS Outlook NetSuite Restlet Sendgrid Shopify Tableau Composer Connectors Zendesk Zuora Quickbooks Online 9 READ THE BLOG POST HERE
  • 10.
    All contents ©MuleSoft, LLC Salesforce Streaming APIs Elza Circiu Anant Alok
  • 11.
    All contents ©MuleSoft, LLC Elza Circiu MuleSoft Professional Services Speakers Intro 11 Anant Alok MuleSoft Professional Services
  • 12.
    All contents ©MuleSoft, LLC Agenda 12 The Four Streaming APIs MuleSoft Support Demo Q & A
  • 13.
    All contents ©MuleSoft, LLC The Four Streaming APIs An Introduction
  • 14.
    All contents ©MuleSoft, LLC The Four Streaming APIs 14
  • 15.
    All contents ©MuleSoft, LLC Four Different APIs Built Around a Shared Model A single technology: ● Publish/Subscribe, Event Driven Architecture ● Push Technology with Replay Capability Common Use Cases: ● Real time notifications ● Process automation ● Data Replication ● Audit & Compliance 15
  • 16.
    All contents ©MuleSoft, LLC Publish/Subscribe Architecture 17
  • 17.
    All contents ©MuleSoft, LLC Message Durability 19 Change Data Capture 2nd Generation Streaming APIs 1st Generation Platform Events PushTopics Generic Events 72 hours 24 hours
  • 18.
    All contents ©MuleSoft, LLC Platform Events
  • 19.
    All contents ©MuleSoft, LLC 21 Salesforce Platform Events
  • 20.
    All contents ©MuleSoft, LLC Publishing Platform events ❖ internally from the Salesforce platform ➢ APEX code ➢ process builder ➢ flows ❖ externally via Salesforce APIs Platform Event publish behavior: ● Publish after commit - event message is published only after the transaction commits successfully ● Publish immediately - event message is published when the publish call executes 23
  • 21.
    All contents ©MuleSoft, LLC Publishing a Platform Event using Salesforce Process Builder Publishing Platform events 24
  • 22.
    All contents ©MuleSoft, LLC Change Data Capture
  • 23.
    All contents ©MuleSoft, LLC Architecture to enable Synchronization at scale Change Data Capture publishes events for changes in Salesforce records corresponding to create, update, delete and undelete operations. Change Events Lifecycle ● Data Change events are captured at the moment they happen ● Events are published to a durable event stream ● Subscribing clients listen to the event stream & consume events 26
  • 24.
    All contents ©MuleSoft, LLC Enabling Change Data Capture 27
  • 25.
    All contents ©MuleSoft, LLC Platform Events vs Change Data Capture 29 { "data": { "schema": "8_j4Jvbl5vY1cUg6ykKsKw", "payload": { "LastModifiedDate": "2021-10-21T03:40:09.000Z", "Phone": "(336) 222-7000", "ChangeEventHeader": { "commitNumber": 202866745235, "commitUser": "0055j000000vpBOAAY", "sequenceNumber": 1, "entityName": "Account", "changeType": "UPDATE", "changedFields": [ "Phone", "LastModifiedDate" ], "changeOrigin": "", "transactionKey": "00046797-0e54-b5dd-3ba7-97e31380dd57", "commitTimestamp": 1634787609000, "recordIds": [ "0015j000007aJyAAAU" ] } }, "event": { "replayId": 40532028 } }, "channel": "/data/AccountChangeEvent" } Sample events { "data" : { "schema" : "fxnhBTVoCql1BwaszeK2iQ", "payload" : { "CreatedById" : "0055g000005O2lwAAC", "Contact_Name__c" : "Test PEDemo3", "CreatedDate" : "2021-11-07T06:08:38.959Z", "Contact_Id__c" : "0035g00000HvOv8AAF" }, "event" : { "replayId" : 1134652 } }, "channel" : "/event/New_Contact_notification__e" }
  • 26.
    All contents ©MuleSoft, LLC MuleSoft Salesforce Connector
  • 27.
    All contents ©MuleSoft, LLC MuleSoft Connector Operations 31 1. Subscribe Channel Listener 2. Subscribe Topic Listener 3. Replay Channel Listener 4. Replay Topic Listener
  • 28.
    All contents ©MuleSoft, LLC Replaying Events 32 MuleSoft Connector Option Salesforce API Option ReplayID Required? Behavior ALL -2 No Subscriber receives all events including past events within the retention window and new events after the subscription FROM REPLAY ID REPLAY ID Yes Subscriber receives only events with ReplayId > specified ReplayId ONLY NEW -1 No Subscriber receives new events broadcasts after client subscription Replay Options
  • 29.
    All contents ©MuleSoft, LLC Demo
  • 30.
    All contents ©MuleSoft, LLC
  • 31.
    All contents ©MuleSoft, LLC Q & A
  • 32.
    All contents ©MuleSoft, LLC References
  • 33.
    All contents ©MuleSoft, LLC References 38 ● https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/intro_strea m.htm ● https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platfor m_events_publish_process.htm ● https://trailhead.salesforce.com/en/content/learn/modules/change-data-capture/understand-cha nge-data-capture ● https://docs.mulesoft.com/salesforce-connector/10.14/salesforce-connector-reference ● https://developer.salesforce.com/blogs/2018/07/which-streaming-event-do-i-use ● https://developer.salesforce.com/docs/atlas.en-us.234.0.change_data_capture.meta/change_data _capture/cdc_allocations.htm ● https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platfor m_event_limits.htm
  • 34.
    All contents ©MuleSoft, LLC Thank you!