2. Our Speaker 2
Jigar Shah (Enterprise Architect, Eternus Solutions)
• 3x Certified (Platform Dev 1, App Builder, Administrator)
• 4x Speaker (Tahoe Dreamin’18, Southeast Dreamin’18, ForceAcademyLA)
• Developer Community Profile
• Trailblazer Community Profile
• Blogs at https://learnsfdcwithjigar.wordpress.com/
@jigarshah189
/in/jigarshah189
3. Agenda 3
Point to Point
Integration
Challenges
Solution –
Event Driven
Architecture
Understanding
Platform Events
Publishing &
Subscribing to
Platform Events
Demo
Q & A
Challenges with Peer to Peer Integration Strategies
Solution to a Scalable Integration Architecture
Understanding Platform Events
Publishing & Subscribing to Platform Events
Demo
Q & A
4. Peer to Peer Integration Challenges 4
Scalability
Inclusion and removal
of entities to the
communication is time
consuming
Tight Coupling
Dependency on every
integration point makes
it maintenance heavy
Non Ubiquitous
Communication
Inconsistent & disparate
data exchanges formats
Traditional Enterprise Integration Landscape
6. What are Platform Events? 6
01
Subject like Salesforce Entity
• Suffixed with __e
• Replay ID for replaying
specific event
02
Pub/Sub based
Communication
• No Polling required.
03
Heterogeneous payloads
• Define events with different
payloads.
7. Understanding How Platform Events Work? 7
User
Interaction
Message
(Platform Event)
Inbox
(Event Queue)
Declarative Tools
(Process Builder,
Visual Flows)
Programmatic Tools
(Triggers, Apex)
External Systems
(REST / SOAP)
8. Publishing / Subscribing Platform Events 8
PUBLISH SUBSCRIBE
Process
Builder Flows
Apex
EventBus.publish
(List<event>)
API
(REST / SOAP)
Process
Builder Flows
Triggers CometD
9. Demo – Order Shipping Application 9
EventBus.publish()
Apex Trigger
EventBus.publish()
Apex
Trigger
Process
Builder
Order Mgmt. App
(CRM)
Shipping App
(External)
Status = Ready to Ship
1. Status = Shipped
2. Follow-up Task
Status = Delivered
Status = Delivery Failed
Log a Case
Shipped
Delivered
Delivery Failed
10. Demo – Creating Event Schema 10
Order
• Order Number (Name - AutoNumber)
• Status
Pending
Ready to Ship
Shipped
Delivered
Delivery Failed
Order Shipping Notification
Event
• OrderShippingNotification__e
• Order Number – Text(20)
• Status - Number(1,0)
Ready to Ship = 1
Shipped = 2
Delivered = 3
Delivery Failed = -1