Albanian Dreamin a Community Powered Conference to activate, empower and strengthen the Salesforce potential through assistance, education, networking and knowledge sharing to improve the workforce and professionalism in Albania.
3. #ALD2024 27 APRIL 2024
Karine IOST
Salesforce enthusiast since 2020
Salesforce Consultant at Accenture Fundation
Admin certified
Volunteer at French Touch Dreamin
2022
2023
4. #ALD2024 27 APRIL 2024
Thierry TROUIN
Salesforce Architect at Orange Business
13 years old on Salesforce ecosystem
10 Salesforce Certifications + 3 partners
Certifications
Group Leader at Toulouse Salesforce User
Group
Certified Instructor (Salesforce Administrator)
Salesforce MVP since 2021
French Touch Dreamin Co-Organiser
Speaker on Salesforce Events
x3
x2
x5
5. #ALD2024 27 APRIL 2024
Agenda
1. Definition
2. Uses Case
3. Tools and Features
4. Setup
5. Conclusion
7. #ALD2024 27 APRIL 2024
Definition
API = Application Programming Interface
API is a way for two or more programs or components to communicate with each other.
It is a software interface, offering a service to other software.
API
Request
Request
Response Response
Client / Application
Base de données
9. #ALD2024 27 APRIL 2024
Use Case
Some examples of API use
Today’s or
week’s weather
List of public
holidays for the
current year
Automatically
update an
exchange rate
List of city in an
area
Official bulletin of
civil and
commercial
announcements
10. #ALD2024 27 APRIL 2024
Use Case
Our company has a needs : Retrieve the public holidays in France for the
year 2024.
11. #ALD2024 27 APRIL 2024
Use Case
How can
I answer it ?
Our company has a needs : Retrieve the public holidays in France for the
year 2024.
12. #ALD2024 27 APRIL 2024
Use Case
How can
I answer it ? The site
« https://api.gouv.fr »
offers us a free API listing
public holidays.
Our company has a needs : Retrieve the public holidays in France for the
year 2024.
14. #ALD2024 27 APRIL 2024
Tools & Features
Tools :
https://swagger.io
https://api.gouv.fr/documentation/jours-feries
https://www.salesforce.com
15. #ALD2024 27 APRIL 2024
Tools & Features
Tools :
Salesforce Features :
https://swagger.io
https://api.gouv.fr/documentation/jours-feries
https://www.salesforce.com
Named
Credentials
Flows
(screen)
External
Services
Remote
Site Settings
17. #ALD2024 27 APRIL 2024
Setup - Identify our API
Access the URL « https://api.gouv.fr/documentation/jours-feries »
to view the API documentation
I chose
an API
18. #ALD2024 27 APRIL 2024
Setup - Identify our API
Access the URL « https://api.gouv.fr/documentation/jours-feries »
to view the API documentation
Here the
API URL
19. #ALD2024 27 APRIL 2024
Setup – Set connection
Add the Url « https://calendrier.api.gouv.fr » into the list of « Remote Site Settings »
List of authorized
sites from
Salesforce
20. #ALD2024 27 APRIL 2024
Setup – Set connection
Click the « New Legacy » button to set the API connection in Salesforce
21. #ALD2024 27 APRIL 2024
Setup – Set connection
Enter the « Name » and « URL » https://calendrier.api.gouv.fr that corresponds to the API
22. #ALD2024 27 APRIL 2024
Setup – Load API
Click the « Add an External Service » button to add the API schema.
23. #ALD2024 27 APRIL 2024
Setup – Load API
Select « From API Specification »
25. #ALD2024 27 APRIL 2024
I have an error
about the
format
Setup – Load API
Enter the information
26. #ALD2024 27 APRIL 2024
Setup – Load API
Enter the information
The schema provided by the site (YAML)
is not compatible with Salesforce (JSON)
You must use a conversion tool (swagger)
27. #ALD2024 27 APRIL 2024
Setup – Load API
Let’s go to the swagger site « https://swagger.io/ »
28. #ALD2024 27 APRIL 2024
Setup – Load API
Click on the link to view the communication schema
https://api.gouv.fr/documentation/jours-feries API Schema
29. #ALD2024 27 APRIL 2024
Setup – Load API
Click on the « File » menu
Click on the « Import URL » menu
Paste the API URL « https://calendrier.api.gouv.fr/jours-feries/openapi.yml »
30. #ALD2024 27 APRIL 2024
Setup – Load API
Click on the « File » menu
Click on the « Convert and save as JSON » menu
The file is automatically saved on our PC
31. #ALD2024 27 APRIL 2024
Setup – Load API
Select « Upload from local »
Click on the « Upload Files » button
32. #ALD2024 27 APRIL 2024
Setup – Load API
Select « Upload from local »
Click on the « Upload Files » button
34. #ALD2024 27 APRIL 2024
Setup – Load API
Click on the « Finish » button to save the « External Service »
Summary of
Operations in the
external service
35. #ALD2024 27 APRIL 2024
Setup – Load API
Well done, you have configured your service.
36. #ALD2024 27 APRIL 2024
Setup – Designing the Screen Flow
In Setup
Click on the « Flows » menu
Click on the « New Flow » button
Select « Screen Flow »
37. #ALD2024 27 APRIL 2024
Setup – Designing the Screen Flow
Step 1 :
● Add the Screen component
Get the
current year
38. #ALD2024 27 APRIL 2024
Setup – Designing the Screen Flow
Add the « Number » component to input the year
Click on « Defaut Value » then click on « New Resource »
39. #ALD2024 27 APRIL 2024
Setup – Designing the Screen Flow
Creating a resource to get the current year by default
Input the name « ThisYear »
Select the data type « Number » without decimal
Use the function TODAY() to retrieve the today’s date
Use the function YEAR() retrieve only the year of our date
YEAR( TODAY() )
40. #ALD2024 27 APRIL 2024
Setup – Designing the Screen Flow
The 1st form is created
41. #ALD2024 27 APRIL 2024
Setup – Designing the Screen Flow
Step 2 :
Add the « Action » component
Retrieving
public holidays
42. #ALD2024 27 APRIL 2024
Setup – Designing the Screen Flow
Add an action
In menu, select « JourFeries »
Click on « getZoneAndAnnee »
Name of our
External Service
Created just
before
Public holiday’s
recovery function
name
43. #ALD2024 27 APRIL 2024
Setup – Designing the Screen Flow
Input the action « Label »
Select the « txtAnnee » corresponding to the text box of the 1st form
Create the « Zone » constante with « metropole » value
44. #ALD2024 27 APRIL 2024
Setup – Designing the Screen Flow
Step 3 :
Add a « Screen » component
The result screen
45. #ALD2024 27 APRIL 2024
Setup – Designing the Screen Flow
Add the « Display Text » component and name it « txtResultat »
In the « Resource Picker » area
Click on « Outputs from GetJoursFeries »
Click on « 200 » (which corresponds to our result)
Delete the point « . » at the end of the « {!GetJoursFeries.200} »
variable
46. #ALD2024 27 APRIL 2024
Setup – Designing the Screen Flow
The 1st screen
shows the
current year
The 2nd screen
shows the result
48. #ALD2024 27 APRIL 2024
Conclusion
Steps Action Comments
Step 1 Identify our API https://api.gouv.fr/documentation/jours-feries
Step 2 Set connection into Salesforce Remote site + Named Credential
Step 3 Load API into Salesforce External Services (+ swagger)
Step 4 Designing the Screen Flow Flow