SlideShare a Scribd company logo
1 of 19
Download to read offline
Publishing Data to REST APIs with
Lightning Process Builder
Scott Coleman
Principal Solutions Architect, Cloud Giants
scott@cloudgiants.com
@scottsalesforce
alex@cloudgiants.com
@KenneyAlexandra
Alex Kenney
Solutions Consultant, Cloud Giants
Welcome to Dreamforce
Why implement simple data integrations using Process Builder and Invocable Apex?
• Maximum use of platform features, filling gaps with code when necessary
• Using clicks instead of code increases maintainability and reusability
Key takeaways
• REST web service basics
• A mostly clicks approach to simple integration
• A process and some code that you can use right away!
• How to decide if this approach is for you - this isn't the only way (and isn't always the best way)
• Ideas about extending the solution to meet your specific needs
Thanks for joining us!
REST Web Services and APIs
What is an API?
• Application Programming Interface
• Defines the interface between one component and second component that provides services for it
What is REST?
• Representational State Transfer
• An architectural style that can be applied to APIs (most commonly on the web); a set of conventions or
rules
• Emphasis on lightweight payloads and predictable behaviors
REST API examples
• Slack webhooks
• Google Maps Geocoding API
• Salesforce REST API
A (Very) High Level Introduction
Calling Apex from Process Builder
Process Builder - have you used it?
You can call Apex methods from your process!
• Powerful way to create mostly-declarative solutions
• A chance for collaboration between admins and devs
• Use the "Apex" action type in Process Builder, select the method to call, and specify the values to pass into the
method
There are rules for your Apex class and method. It must:
• Method should be annotated with @InvocableMethod
• Only accept one List as its input parameter (though it can be custom type - use @InvocableVariable on members of
user-defined types)
• Be static and public/global
The Basics
Slack Integration
Demo
Slack is a popular
communication tool used by
companies, project teams,
other organizations
Possible use case: Notify
your team when a hot lead
lands in Salesforce
Let's run through a quick
demo of this simple
Salesforce to Slack
integration
Slack Integration
Slack configuration
• Define a webhook and specify which channel messages should appear in
• Take note of the webhook address
Responsibilities of our Process Builder process
• Know when to send a notification (criteria)
• Specify what data should be included in the notification
• Specify the address of the Slack webhook to which the notification should be sent
Configuration
Slack Integration
Process Builder
Let's walk through our
process!
Slack Integration
Not coupled to any particular object or webhook address
• Labels, values, and address passed in by process
• Same class can be used with any object that supports Process Builder
• Make sure to create a Remote Site in Salesforce for https://hooks.slack.com
Very simple implementation with basic capabilities
• Data structure is flat - not hierarchical
• Number of fields you can include in notification is limited
• Optional record link can be included so user can get more details
• Works great for most quick notifications
Apex Class
Slack Integration
Apex Class
Let's dive into the code!
Extending the Solution
Is this pattern right for you?
• Great for productivity features - not the best solution for reliable messaging, guaranteed delivery, business
critical scenarios
Payload format
• Slack's webhook uses a JSON (JavaScript Object Notation) payload, but your REST endpoint may use a
different format
• We're using a very flat data structure - maybe your target requires a hierarchical structure
Authentication
• Slack's webhook REST endpoint doesn't implement any authentication, but your target endpoint likely does
• Consider using Named Credentials (Spring '15 feature) to make your code simpler (more on this later)
Let us know how you extend the solution (or let us know if we can help!)
• Session Chatter feed, Twitter, Email
Meet your specific needs
Salesforce-to-Salesforce Integration
Demo
Possible use case: Publish new
accounts from one org to
another
Let's run through a quick demo
of this basic Salesforce to
Salesforce integration
Named Credentials
What are they?
• A configuration item that allows you to define the credentials that should be used when making a callout to
a particular external service, either per user or for all users
Why are they useful?
• Simplifies your Apex code by managing non-trivial authentication flows for you, like OAuth 2.0
• Keeps the endpoint address in one place, outside of your process and Apex code
What else is needed to make this work in our use case?
• A Connected App defined in the target org to grant access
• An Auth Provider defined in the source org to be used by the Named Credential for authentication in the
target org
An Introduction
Salesforce-to-Salesforce Integration
Responsibilities of our Process Builder process
• Similar to our first use case
• Know when to send a notification (criteria)
• Specify what data should be included in the notification
• Specify the Salesforce API endpoint to which the notification should be sent (and the credentials to be used)
• Used Named Credentials for this
Configuration
Salesforce-to-Salesforce Integration
Process Builder
Let's walk through our
process!
Salesforce-to-Salesforce Integration
Not coupled to any particular object or org
• Labels, values, named credential passed in by process
• Same class can be used with any object that supports Process Builder
Not appropriate in scenarios where data is business critical and we need guaranteed delivery
• This approach is best for informational integrations and data that isn't business critical (productivity)
Apex Class
Salesforce-to-Salesforce Integration
Apex Class
Let's dive into the code
and related authentication
config!
Resources
Get the Process, Code, and Step-by-Step Instructions
• Available at GitHub: https://github.com/scott-cloudgiants/df16-procbuilder-restapi
Salesforce Documentation
• Lightning Process Builder
• https://help.salesforce.com/HTViewHelpDoc?id=process_overview.htm
• InvocableMethod Annotation
• https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_InvocableMethod.htm
• Apex Web Services and Callouts
• https://developer.salesforce.com/page/Apex_Web_Services_and_Callouts
• Named Credentials as Callout Endpoints
• https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_named_credentials.htm
Blog Posts
• Slack and Salesforce Integration by Christophe Coenraets - the inspiration for our approach!
• http://coenraets.org/blog/2016/01/slack-salesforce-integration/
• Salesforce to Salesforce integration using Named Credentials in 5 lines by Jitendra Zaa - more inspiration!
• http://www.jitendrazaa.com/blog/salesforce/salesforce-to-salesforce-integration-using-named-credentials-in-just-5-lines-of-code/
Q&A
Ask questions!
Thank Y u
Scott Coleman
Principal Solutions Architect, Cloud Giants
scott@cloudgiants.com
@scottsalesforce
Alex Kenney
Solutions Consultant, Cloud Giants
alex@cloudgiants.com
@KenneyAlexandra

More Related Content

What's hot

Integrating SIS’s with Salesforce: An Accidental Integrator’s Guide
Integrating SIS’s with Salesforce: An Accidental Integrator’s GuideIntegrating SIS’s with Salesforce: An Accidental Integrator’s Guide
Integrating SIS’s with Salesforce: An Accidental Integrator’s GuideSalesforce.org
 
Application Test Management and Quality Assurance
Application Test Management and Quality Assurance Application Test Management and Quality Assurance
Application Test Management and Quality Assurance SAP Solution Extensions
 
Capture and Feed Telecom Network Data and More Into SAP HANA - Quicky and Aff...
Capture and Feed Telecom Network Data and More Into SAP HANA - Quicky and Aff...Capture and Feed Telecom Network Data and More Into SAP HANA - Quicky and Aff...
Capture and Feed Telecom Network Data and More Into SAP HANA - Quicky and Aff...SAP Solution Extensions
 
Trinamix demantra data manager
Trinamix demantra data managerTrinamix demantra data manager
Trinamix demantra data managerAmit Sharma
 
TRINAMIX - AMIT SHARMA - Demantra Vs Oracle Demand Planning
TRINAMIX - AMIT SHARMA - Demantra Vs Oracle Demand PlanningTRINAMIX - AMIT SHARMA - Demantra Vs Oracle Demand Planning
TRINAMIX - AMIT SHARMA - Demantra Vs Oracle Demand PlanningAmit Sharma
 
Demantra Case Study Doug
Demantra Case Study DougDemantra Case Study Doug
Demantra Case Study Dougsichie
 
Application Portfolio Assessment Tool
Application Portfolio Assessment ToolApplication Portfolio Assessment Tool
Application Portfolio Assessment ToolSkip Roncal
 
Real-Time Operational Reporting for Oracle E-Business Suite with CS*Rapid
Real-Time Operational Reporting for Oracle E-Business Suite with CS*RapidReal-Time Operational Reporting for Oracle E-Business Suite with CS*Rapid
Real-Time Operational Reporting for Oracle E-Business Suite with CS*RapidCraig O'Neill
 
Analyze billions of records on Salesforce App Cloud with BigObject
Analyze billions of records on Salesforce App Cloud with BigObjectAnalyze billions of records on Salesforce App Cloud with BigObject
Analyze billions of records on Salesforce App Cloud with BigObjectSalesforce Developers
 
Sage Accpacv5.6 Whats New
Sage Accpacv5.6 Whats NewSage Accpacv5.6 Whats New
Sage Accpacv5.6 Whats Newjohn_allen
 
Integrating Salesforce with Microsoft Office through Add-ins
Integrating Salesforce with Microsoft Office through Add-insIntegrating Salesforce with Microsoft Office through Add-ins
Integrating Salesforce with Microsoft Office through Add-insSalesforce Developers
 
Build a Lightning Reporting App with the Salesforce Analytics API
Build a Lightning Reporting App with the Salesforce Analytics APIBuild a Lightning Reporting App with the Salesforce Analytics API
Build a Lightning Reporting App with the Salesforce Analytics APISalesforce Developers
 
Oracle VCP Training - Oracle Value Chain Planning
Oracle VCP Training - Oracle Value Chain PlanningOracle VCP Training - Oracle Value Chain Planning
Oracle VCP Training - Oracle Value Chain PlanningAmit Sharma
 
Trusted Reliability & Performance with the AppExchange Platform
Trusted Reliability & Performance with the AppExchange PlatformTrusted Reliability & Performance with the AppExchange Platform
Trusted Reliability & Performance with the AppExchange Platformdreamforce2006
 
Simplify Complex Consolidations and Close Processes with Oracle Financial Con...
Simplify Complex Consolidations and Close Processes with Oracle Financial Con...Simplify Complex Consolidations and Close Processes with Oracle Financial Con...
Simplify Complex Consolidations and Close Processes with Oracle Financial Con...Alithya
 
Optimizing Callidus TrueComp Suite: Tips and Tricks
Optimizing Callidus TrueComp Suite: Tips and TricksOptimizing Callidus TrueComp Suite: Tips and Tricks
Optimizing Callidus TrueComp Suite: Tips and TricksCallidus Software
 
Writing Code to Work Against any Salesforce Object
Writing Code to Work Against any Salesforce ObjectWriting Code to Work Against any Salesforce Object
Writing Code to Work Against any Salesforce ObjectSalesforce Developers
 

What's hot (20)

Integrating SIS’s with Salesforce: An Accidental Integrator’s Guide
Integrating SIS’s with Salesforce: An Accidental Integrator’s GuideIntegrating SIS’s with Salesforce: An Accidental Integrator’s Guide
Integrating SIS’s with Salesforce: An Accidental Integrator’s Guide
 
Oracle demantra online training
Oracle demantra online trainingOracle demantra online training
Oracle demantra online training
 
Application Test Management and Quality Assurance
Application Test Management and Quality Assurance Application Test Management and Quality Assurance
Application Test Management and Quality Assurance
 
SAP S/4 HANA Information Sheet
SAP S/4 HANA Information Sheet SAP S/4 HANA Information Sheet
SAP S/4 HANA Information Sheet
 
Capture and Feed Telecom Network Data and More Into SAP HANA - Quicky and Aff...
Capture and Feed Telecom Network Data and More Into SAP HANA - Quicky and Aff...Capture and Feed Telecom Network Data and More Into SAP HANA - Quicky and Aff...
Capture and Feed Telecom Network Data and More Into SAP HANA - Quicky and Aff...
 
Trinamix demantra data manager
Trinamix demantra data managerTrinamix demantra data manager
Trinamix demantra data manager
 
TRINAMIX - AMIT SHARMA - Demantra Vs Oracle Demand Planning
TRINAMIX - AMIT SHARMA - Demantra Vs Oracle Demand PlanningTRINAMIX - AMIT SHARMA - Demantra Vs Oracle Demand Planning
TRINAMIX - AMIT SHARMA - Demantra Vs Oracle Demand Planning
 
Demantra Case Study Doug
Demantra Case Study DougDemantra Case Study Doug
Demantra Case Study Doug
 
Application Portfolio Assessment Tool
Application Portfolio Assessment ToolApplication Portfolio Assessment Tool
Application Portfolio Assessment Tool
 
Real-Time Operational Reporting for Oracle E-Business Suite with CS*Rapid
Real-Time Operational Reporting for Oracle E-Business Suite with CS*RapidReal-Time Operational Reporting for Oracle E-Business Suite with CS*Rapid
Real-Time Operational Reporting for Oracle E-Business Suite with CS*Rapid
 
Analyze billions of records on Salesforce App Cloud with BigObject
Analyze billions of records on Salesforce App Cloud with BigObjectAnalyze billions of records on Salesforce App Cloud with BigObject
Analyze billions of records on Salesforce App Cloud with BigObject
 
Sage Accpacv5.6 Whats New
Sage Accpacv5.6 Whats NewSage Accpacv5.6 Whats New
Sage Accpacv5.6 Whats New
 
Integrating Salesforce with Microsoft Office through Add-ins
Integrating Salesforce with Microsoft Office through Add-insIntegrating Salesforce with Microsoft Office through Add-ins
Integrating Salesforce with Microsoft Office through Add-ins
 
Build a Lightning Reporting App with the Salesforce Analytics API
Build a Lightning Reporting App with the Salesforce Analytics APIBuild a Lightning Reporting App with the Salesforce Analytics API
Build a Lightning Reporting App with the Salesforce Analytics API
 
Oracle VCP Training - Oracle Value Chain Planning
Oracle VCP Training - Oracle Value Chain PlanningOracle VCP Training - Oracle Value Chain Planning
Oracle VCP Training - Oracle Value Chain Planning
 
Simple Salesforce Data Migration
Simple Salesforce Data MigrationSimple Salesforce Data Migration
Simple Salesforce Data Migration
 
Trusted Reliability & Performance with the AppExchange Platform
Trusted Reliability & Performance with the AppExchange PlatformTrusted Reliability & Performance with the AppExchange Platform
Trusted Reliability & Performance with the AppExchange Platform
 
Simplify Complex Consolidations and Close Processes with Oracle Financial Con...
Simplify Complex Consolidations and Close Processes with Oracle Financial Con...Simplify Complex Consolidations and Close Processes with Oracle Financial Con...
Simplify Complex Consolidations and Close Processes with Oracle Financial Con...
 
Optimizing Callidus TrueComp Suite: Tips and Tricks
Optimizing Callidus TrueComp Suite: Tips and TricksOptimizing Callidus TrueComp Suite: Tips and Tricks
Optimizing Callidus TrueComp Suite: Tips and Tricks
 
Writing Code to Work Against any Salesforce Object
Writing Code to Work Against any Salesforce ObjectWriting Code to Work Against any Salesforce Object
Writing Code to Work Against any Salesforce Object
 

Viewers also liked

A Fisherman's Monument, The Drake
A Fisherman's Monument, The DrakeA Fisherman's Monument, The Drake
A Fisherman's Monument, The DrakeMark Menlove
 
Cladirea bisericii de la trecut la prezent - ELIM Piatra Neamţ
Cladirea bisericii de la trecut la prezent - ELIM Piatra NeamţCladirea bisericii de la trecut la prezent - ELIM Piatra Neamţ
Cladirea bisericii de la trecut la prezent - ELIM Piatra Neamţelimneamt
 
Feedback on the COSO Enterprise Risk Management 20160929 Final
Feedback on the COSO Enterprise Risk Management 20160929 FinalFeedback on the COSO Enterprise Risk Management 20160929 Final
Feedback on the COSO Enterprise Risk Management 20160929 FinalDarius Mayhew MCMI, SIRM, CSM
 
байтакова адия будущее-решение
байтакова адия будущее-решениебайтакова адия будущее-решение
байтакова адия будущее-решениеAdiya Baitakova
 
COMM 125 Portfolio
COMM 125 PortfolioCOMM 125 Portfolio
COMM 125 PortfolioCole Hibbard
 
Priyanka nandwani participate kaosal vikash mela as a training partner
Priyanka nandwani participate kaosal vikash mela as a training partnerPriyanka nandwani participate kaosal vikash mela as a training partner
Priyanka nandwani participate kaosal vikash mela as a training partnerPriyanka Nandwani
 
Mostafa Gamal - Portfolio
Mostafa Gamal - PortfolioMostafa Gamal - Portfolio
Mostafa Gamal - PortfolioMostafa Gamal
 

Viewers also liked (10)

A Fisherman's Monument, The Drake
A Fisherman's Monument, The DrakeA Fisherman's Monument, The Drake
A Fisherman's Monument, The Drake
 
Yuberca
YubercaYuberca
Yuberca
 
Cladirea bisericii de la trecut la prezent - ELIM Piatra Neamţ
Cladirea bisericii de la trecut la prezent - ELIM Piatra NeamţCladirea bisericii de la trecut la prezent - ELIM Piatra Neamţ
Cladirea bisericii de la trecut la prezent - ELIM Piatra Neamţ
 
Monthly reports
Monthly reports Monthly reports
Monthly reports
 
Feedback on the COSO Enterprise Risk Management 20160929 Final
Feedback on the COSO Enterprise Risk Management 20160929 FinalFeedback on the COSO Enterprise Risk Management 20160929 Final
Feedback on the COSO Enterprise Risk Management 20160929 Final
 
байтакова адия будущее-решение
байтакова адия будущее-решениебайтакова адия будущее-решение
байтакова адия будущее-решение
 
COMM 125 Portfolio
COMM 125 PortfolioCOMM 125 Portfolio
COMM 125 Portfolio
 
Priyanka nandwani participate kaosal vikash mela as a training partner
Priyanka nandwani participate kaosal vikash mela as a training partnerPriyanka nandwani participate kaosal vikash mela as a training partner
Priyanka nandwani participate kaosal vikash mela as a training partner
 
Ch03
Ch03Ch03
Ch03
 
Mostafa Gamal - Portfolio
Mostafa Gamal - PortfolioMostafa Gamal - Portfolio
Mostafa Gamal - Portfolio
 

Similar to Publishing Data to REST APIs with Lightning Process Builder

apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...apidays
 
DevOps on Windows: How to Deploy Complex Windows Workloads | AWS Public Secto...
DevOps on Windows: How to Deploy Complex Windows Workloads | AWS Public Secto...DevOps on Windows: How to Deploy Complex Windows Workloads | AWS Public Secto...
DevOps on Windows: How to Deploy Complex Windows Workloads | AWS Public Secto...Amazon Web Services
 
Building a DevOps Culture in Public Sector | AWS Public Sector Summit 2017
Building a DevOps Culture in Public Sector | AWS Public Sector Summit 2017Building a DevOps Culture in Public Sector | AWS Public Sector Summit 2017
Building a DevOps Culture in Public Sector | AWS Public Sector Summit 2017Amazon Web Services
 
Azure for SharePoint Developers - Workshop - Part 3: Web Services
Azure for SharePoint Developers - Workshop - Part 3: Web ServicesAzure for SharePoint Developers - Workshop - Part 3: Web Services
Azure for SharePoint Developers - Workshop - Part 3: Web ServicesBob German
 
State of Infrastructure as Code - AutomaCon 2016
State of Infrastructure as Code - AutomaCon 2016State of Infrastructure as Code - AutomaCon 2016
State of Infrastructure as Code - AutomaCon 2016Amazon Web Services
 
AWS Summit Singapore Webinar Edition | Architecting a Serverless Data Lake on...
AWS Summit Singapore Webinar Edition | Architecting a Serverless Data Lake on...AWS Summit Singapore Webinar Edition | Architecting a Serverless Data Lake on...
AWS Summit Singapore Webinar Edition | Architecting a Serverless Data Lake on...Amazon Web Services
 
Using logic apps for dynamics 365 integration
Using logic apps for dynamics 365 integrationUsing logic apps for dynamics 365 integration
Using logic apps for dynamics 365 integrationPeter Haggert
 
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?Vincent Biret
 
Implementing Salesforce DevOps at a Logistics Firm to Deliver More Value.pdf
Implementing Salesforce DevOps at a Logistics Firm to Deliver More Value.pdfImplementing Salesforce DevOps at a Logistics Firm to Deliver More Value.pdf
Implementing Salesforce DevOps at a Logistics Firm to Deliver More Value.pdfSolunus, Inc.
 
Lessons Learned Migrating Apps to Azure
Lessons Learned   Migrating Apps to AzureLessons Learned   Migrating Apps to Azure
Lessons Learned Migrating Apps to AzureSam Larko
 
SFDC Lightning Demo
SFDC Lightning DemoSFDC Lightning Demo
SFDC Lightning DemoSamar Saha
 
Application Delivery Patterns for Developers - Technical 401
Application Delivery Patterns for Developers - Technical 401Application Delivery Patterns for Developers - Technical 401
Application Delivery Patterns for Developers - Technical 401Amazon Web Services
 
Accelerating your Tableau deployment in AWS
Accelerating your Tableau deployment in AWSAccelerating your Tableau deployment in AWS
Accelerating your Tableau deployment in AWSSion Smith
 
Securing Systems at Cloud Scale with DevSecOps
Securing Systems at Cloud Scale with DevSecOpsSecuring Systems at Cloud Scale with DevSecOps
Securing Systems at Cloud Scale with DevSecOpsAmazon Web Services
 
AWS Summit Singapore - Managing a Database Migration Project | Best Practices
AWS Summit Singapore - Managing a Database Migration Project | Best PracticesAWS Summit Singapore - Managing a Database Migration Project | Best Practices
AWS Summit Singapore - Managing a Database Migration Project | Best PracticesAmazon Web Services
 
LLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flowLLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flowNaoki (Neo) SATO
 
2015-12-02 - WebCamp - Microsoft Azure Logic Apps
2015-12-02 - WebCamp - Microsoft Azure Logic Apps2015-12-02 - WebCamp - Microsoft Azure Logic Apps
2015-12-02 - WebCamp - Microsoft Azure Logic AppsSandro Pereira
 
VSTS Migration Briefing
VSTS Migration BriefingVSTS Migration Briefing
VSTS Migration BriefingAngela Dugan
 

Similar to Publishing Data to REST APIs with Lightning Process Builder (20)

apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
 
DevOps on Windows: How to Deploy Complex Windows Workloads | AWS Public Secto...
DevOps on Windows: How to Deploy Complex Windows Workloads | AWS Public Secto...DevOps on Windows: How to Deploy Complex Windows Workloads | AWS Public Secto...
DevOps on Windows: How to Deploy Complex Windows Workloads | AWS Public Secto...
 
Building a DevOps Culture in Public Sector | AWS Public Sector Summit 2017
Building a DevOps Culture in Public Sector | AWS Public Sector Summit 2017Building a DevOps Culture in Public Sector | AWS Public Sector Summit 2017
Building a DevOps Culture in Public Sector | AWS Public Sector Summit 2017
 
Azure for SharePoint Developers - Workshop - Part 3: Web Services
Azure for SharePoint Developers - Workshop - Part 3: Web ServicesAzure for SharePoint Developers - Workshop - Part 3: Web Services
Azure for SharePoint Developers - Workshop - Part 3: Web Services
 
State of Infrastructure as Code - AutomaCon 2016
State of Infrastructure as Code - AutomaCon 2016State of Infrastructure as Code - AutomaCon 2016
State of Infrastructure as Code - AutomaCon 2016
 
AWS Summit Singapore Webinar Edition | Architecting a Serverless Data Lake on...
AWS Summit Singapore Webinar Edition | Architecting a Serverless Data Lake on...AWS Summit Singapore Webinar Edition | Architecting a Serverless Data Lake on...
AWS Summit Singapore Webinar Edition | Architecting a Serverless Data Lake on...
 
Using logic apps for dynamics 365 integration
Using logic apps for dynamics 365 integrationUsing logic apps for dynamics 365 integration
Using logic apps for dynamics 365 integration
 
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
 
Implementing Salesforce DevOps at a Logistics Firm to Deliver More Value.pdf
Implementing Salesforce DevOps at a Logistics Firm to Deliver More Value.pdfImplementing Salesforce DevOps at a Logistics Firm to Deliver More Value.pdf
Implementing Salesforce DevOps at a Logistics Firm to Deliver More Value.pdf
 
Managing Your Cloud Assets
Managing Your Cloud AssetsManaging Your Cloud Assets
Managing Your Cloud Assets
 
Lessons Learned Migrating Apps to Azure
Lessons Learned   Migrating Apps to AzureLessons Learned   Migrating Apps to Azure
Lessons Learned Migrating Apps to Azure
 
SFDC Lightning Demo
SFDC Lightning DemoSFDC Lightning Demo
SFDC Lightning Demo
 
Application Delivery Patterns for Developers - Technical 401
Application Delivery Patterns for Developers - Technical 401Application Delivery Patterns for Developers - Technical 401
Application Delivery Patterns for Developers - Technical 401
 
Application Delivery Patterns
Application Delivery PatternsApplication Delivery Patterns
Application Delivery Patterns
 
Accelerating your Tableau deployment in AWS
Accelerating your Tableau deployment in AWSAccelerating your Tableau deployment in AWS
Accelerating your Tableau deployment in AWS
 
Securing Systems at Cloud Scale with DevSecOps
Securing Systems at Cloud Scale with DevSecOpsSecuring Systems at Cloud Scale with DevSecOps
Securing Systems at Cloud Scale with DevSecOps
 
AWS Summit Singapore - Managing a Database Migration Project | Best Practices
AWS Summit Singapore - Managing a Database Migration Project | Best PracticesAWS Summit Singapore - Managing a Database Migration Project | Best Practices
AWS Summit Singapore - Managing a Database Migration Project | Best Practices
 
LLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flowLLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flow
 
2015-12-02 - WebCamp - Microsoft Azure Logic Apps
2015-12-02 - WebCamp - Microsoft Azure Logic Apps2015-12-02 - WebCamp - Microsoft Azure Logic Apps
2015-12-02 - WebCamp - Microsoft Azure Logic Apps
 
VSTS Migration Briefing
VSTS Migration BriefingVSTS Migration Briefing
VSTS Migration Briefing
 

Recently uploaded

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Recently uploaded (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Publishing Data to REST APIs with Lightning Process Builder

  • 1. Publishing Data to REST APIs with Lightning Process Builder Scott Coleman Principal Solutions Architect, Cloud Giants scott@cloudgiants.com @scottsalesforce alex@cloudgiants.com @KenneyAlexandra Alex Kenney Solutions Consultant, Cloud Giants
  • 2. Welcome to Dreamforce Why implement simple data integrations using Process Builder and Invocable Apex? • Maximum use of platform features, filling gaps with code when necessary • Using clicks instead of code increases maintainability and reusability Key takeaways • REST web service basics • A mostly clicks approach to simple integration • A process and some code that you can use right away! • How to decide if this approach is for you - this isn't the only way (and isn't always the best way) • Ideas about extending the solution to meet your specific needs Thanks for joining us!
  • 3. REST Web Services and APIs What is an API? • Application Programming Interface • Defines the interface between one component and second component that provides services for it What is REST? • Representational State Transfer • An architectural style that can be applied to APIs (most commonly on the web); a set of conventions or rules • Emphasis on lightweight payloads and predictable behaviors REST API examples • Slack webhooks • Google Maps Geocoding API • Salesforce REST API A (Very) High Level Introduction
  • 4. Calling Apex from Process Builder Process Builder - have you used it? You can call Apex methods from your process! • Powerful way to create mostly-declarative solutions • A chance for collaboration between admins and devs • Use the "Apex" action type in Process Builder, select the method to call, and specify the values to pass into the method There are rules for your Apex class and method. It must: • Method should be annotated with @InvocableMethod • Only accept one List as its input parameter (though it can be custom type - use @InvocableVariable on members of user-defined types) • Be static and public/global The Basics
  • 5. Slack Integration Demo Slack is a popular communication tool used by companies, project teams, other organizations Possible use case: Notify your team when a hot lead lands in Salesforce Let's run through a quick demo of this simple Salesforce to Slack integration
  • 6. Slack Integration Slack configuration • Define a webhook and specify which channel messages should appear in • Take note of the webhook address Responsibilities of our Process Builder process • Know when to send a notification (criteria) • Specify what data should be included in the notification • Specify the address of the Slack webhook to which the notification should be sent Configuration
  • 7. Slack Integration Process Builder Let's walk through our process!
  • 8. Slack Integration Not coupled to any particular object or webhook address • Labels, values, and address passed in by process • Same class can be used with any object that supports Process Builder • Make sure to create a Remote Site in Salesforce for https://hooks.slack.com Very simple implementation with basic capabilities • Data structure is flat - not hierarchical • Number of fields you can include in notification is limited • Optional record link can be included so user can get more details • Works great for most quick notifications Apex Class
  • 10. Extending the Solution Is this pattern right for you? • Great for productivity features - not the best solution for reliable messaging, guaranteed delivery, business critical scenarios Payload format • Slack's webhook uses a JSON (JavaScript Object Notation) payload, but your REST endpoint may use a different format • We're using a very flat data structure - maybe your target requires a hierarchical structure Authentication • Slack's webhook REST endpoint doesn't implement any authentication, but your target endpoint likely does • Consider using Named Credentials (Spring '15 feature) to make your code simpler (more on this later) Let us know how you extend the solution (or let us know if we can help!) • Session Chatter feed, Twitter, Email Meet your specific needs
  • 11. Salesforce-to-Salesforce Integration Demo Possible use case: Publish new accounts from one org to another Let's run through a quick demo of this basic Salesforce to Salesforce integration
  • 12. Named Credentials What are they? • A configuration item that allows you to define the credentials that should be used when making a callout to a particular external service, either per user or for all users Why are they useful? • Simplifies your Apex code by managing non-trivial authentication flows for you, like OAuth 2.0 • Keeps the endpoint address in one place, outside of your process and Apex code What else is needed to make this work in our use case? • A Connected App defined in the target org to grant access • An Auth Provider defined in the source org to be used by the Named Credential for authentication in the target org An Introduction
  • 13. Salesforce-to-Salesforce Integration Responsibilities of our Process Builder process • Similar to our first use case • Know when to send a notification (criteria) • Specify what data should be included in the notification • Specify the Salesforce API endpoint to which the notification should be sent (and the credentials to be used) • Used Named Credentials for this Configuration
  • 15. Salesforce-to-Salesforce Integration Not coupled to any particular object or org • Labels, values, named credential passed in by process • Same class can be used with any object that supports Process Builder Not appropriate in scenarios where data is business critical and we need guaranteed delivery • This approach is best for informational integrations and data that isn't business critical (productivity) Apex Class
  • 16. Salesforce-to-Salesforce Integration Apex Class Let's dive into the code and related authentication config!
  • 17. Resources Get the Process, Code, and Step-by-Step Instructions • Available at GitHub: https://github.com/scott-cloudgiants/df16-procbuilder-restapi Salesforce Documentation • Lightning Process Builder • https://help.salesforce.com/HTViewHelpDoc?id=process_overview.htm • InvocableMethod Annotation • https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_InvocableMethod.htm • Apex Web Services and Callouts • https://developer.salesforce.com/page/Apex_Web_Services_and_Callouts • Named Credentials as Callout Endpoints • https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_named_credentials.htm Blog Posts • Slack and Salesforce Integration by Christophe Coenraets - the inspiration for our approach! • http://coenraets.org/blog/2016/01/slack-salesforce-integration/ • Salesforce to Salesforce integration using Named Credentials in 5 lines by Jitendra Zaa - more inspiration! • http://www.jitendrazaa.com/blog/salesforce/salesforce-to-salesforce-integration-using-named-credentials-in-just-5-lines-of-code/
  • 19. Thank Y u Scott Coleman Principal Solutions Architect, Cloud Giants scott@cloudgiants.com @scottsalesforce Alex Kenney Solutions Consultant, Cloud Giants alex@cloudgiants.com @KenneyAlexandra