Author: sammathie

How To Plan For Your Salesforce Implementation.

Have you already made the decision to move your business onto the Salesforce Platform? Maybe you are considering making the change but are overwhelmed with the scale of the project and unsure where to start. Whatever stage you are at in your journey this webinar is for you.

We cover considerations such as:

· Defining your stakeholders and getting the right people on board
· Deciding on the right goals for your business and where the biggest wins will come from
· Choosing the right partner to fit your needs
· Gathering and prioritising your needs
· Preparing your employees for change

Xenogenix Logo

Find Out More

If you’ve watched the webinar and would like to find out more about how we can help you with your implementation needs then fill out the form below and one of our consultants will be in touch shortly.

Xenogenix Logo

Salesforce Introduce Flow Action To Make HTTP Callouts to External Systems Without Code

Salesforce introduce Flow Action to make HTTP Callouts to external systems without code

In Summary:

  • No-Code Integration with External Systems: Salesforce now allows administrators to make HTTP callouts to external systems directly from Flow Builder, eliminating the need for custom Apex code.
  • Simplified Data Exchange: This feature enables real-time data integration, allowing Salesforce to pull or push data to external web services and APIs directly within automated processes.
  • Enhanced Automation Capabilities: By leveraging HTTP Callouts, Flows can now automate more complex business processes that require interaction with external data, significantly expanding Salesforce’s declarative automation power.

 With the Spring ’23 Release, Salesforce introduces a new Flow Action to allow admins to make HTTP Callouts to external systems without code (Beta).  Our expert  consultant and developer Paris has compiled this how to guide to show you how to put this into place in your organisation.

*Only a GET request is supported in this version. Admins must have the Manage Flow and Customize Applications permissions.  

In this example we will use an API provided by Amadeus. It allows us to search for Flights by destination and maximum Price. If you wish to follow along with this example, you need to create an account. That will allow you to get any API Keys needed and to access the API. 

STEP A. Create a Named Credential 

Prior to creating this callout Action, we need to create a Named Credential, which is used to define the Endpoint URL and the authentication parameters. Go to Setup > (Type in the Quick Find box) Named Credentials 

  1. Click on the External Credentials Tab and New. 2.
  2. Provide a Label and Name. 
  3. Choose Custom, on the Authentication Protocol dropdown. 
  4. In the Permission Set Mappings, click on New. 
  5. Either choose an existing Permission Set or create a New one (Users who need access to this Named Credential instance and the Callout Flow, will need to be assigned with this PS). 
  6. Click New on the Authentication Parameters box. 
  7. Give a Name. In the Value field, copy-paste the actual Bearer Key* value. 

  1. Press Save.
  2. In the Custom Headers, press New. 
  3. As Name write Authorization. 
  4. In the Value field, write this expression {!’Bearer ‘ & $Credential. ExternalCredentialName. AuthenticationParameterName}. 

  1. Click Save. 
  2. Go Back to the Named Credential Tab and press New. 
  3. Provide a Name and Label. 
  4. In the URL add the base URL, in our example: https://test.api.amadeus.com/v1/shopping/flight-destinations 
  5. Choose the External Credential we created. 
  6. Untick the Generate Authorization Header. 
  7. Tick the Allow Formulas in HTTP Header. 
  8. Press Save. 

*(This can be generated via your Amadeus Account in this link: https://developers.amadeus.com/self-service/category/air/api-doc/flight-inspiration-search/api-reference) 

1) Click on the API Explorer Tab, and in the URL box write: https://test.api.amadeus.com/v1) 

2)Click Get Access Token. 

3) Copy-Paste the value into the Value field in step g. (Keep in mind that this token expires after 30 mins). 

 

STEP B. Create HTTP Callout Flow 

  1. Create a Screen Flow and add an Action element 
  2. At the bottom left side of the popup, press on the Create HTTP Callout Beta button. 

 

  1. Give a Name (no spaces).  
  2. Choose the Named Credential we created. 
  3. Press Next. 
  4. In the next screen, provide a Label for this Action. 
  5. In the Method field, choose GET (Only GET requests are supported for now). 
  6. In the ‘Add Query Parameter Keys’ section:

          1st Pair: Key => origin, Data Type => String 2nd Pair: Key => maxPrice, Data Type => Integer 

  1. In the ‘Provide Sample Response’ section, click on New. 
  2. In this step we need to find the JSON Response which our API returns in our query and provide it here. Then SF will create a response APEX class that it will use each time to return our results. Most API Documentations provide example responses. (To get the response for this example follow this link: https://developers.amadeus.com/self-service/category/air/api-doc/flight-inspiration-search/api-reference. On the Documentation Tab, below the flight-destinations section, click on GET. This will open a Details window below. Scroll down in the Responses Section. The first response with Code 200 is the value we need to paste in our field. 

 

  1. Once you have pasted the JSON response into the field, click on Review. Press Done.  

  1. Press Done. 
  2. Provide a Label and a Name and click Done. 
  3. You should see Set Input Values in the Action screen, if not save the flow and then refresh the page. 
  4. Provide a value in the origin field, for example MAD. 
  5. Provide a maximum Price in the maxPrice field, for example 200. 
  6. Click on the Advanced and untick the Manually assign variables option. 
  7. Click Done. 

To display the results we can add a Screen Component. 

  1. Click on the plus icon after our Action, choose Screen. 
  2. Drop the Display Text component into the New screen area. 
  3. In the Insert Resource, click in the action, then in the 2XX parameter. This is where all the response data are saved. From there we can print any available data. 

 

Contact Us

If you would like to find out more about working with our development team or any of our other services drop us a message and we will be happy to set up a call with one of our experienced team.

Xenogenix Logo