Skip to main content

#External Service2 utenti parlano di questo argomento

In my Salesforce org, I have configured Named Credentials and External Credentials using the OAuth 2.0 Client Credentials with Client Secret Flow to connect to an external system.

Since our org is highly configuration-driven and relies heavily on Flows, I was hoping to use External Services so that the integrations could be invoked easily from Flow.

However, I haven't been able to find any documentation or articles explaining how External Services work with Named Credentials and External Credentials that are configured using the Client Credentials Flow.

I have registered an External Service using the Named Credential mentioned above. When I try to invoke the External Service action from a Flow, it prompts for an Authorization parameter. I assume this parameter expects an access token, but I'm not sure how that token should be supplied through Flow, especially since the authentication is already configured through the Named Credential and External Credential setup.

Has anyone implemented this successfully or can provide guidance on the correct approach? Any help would be greatly appreciated.

 

Can I use external services use while using Client Credential Flow?

 

#Devloper  #External Service  #OAuth 2.0

1 risposta
  1. 1 set, 10:25

    Hi @Neha Chandra

     

    Good news, this is solvable, and it's almost certainly a schema issue, not a fundamental limitation. 

    Root cause: With Client Credentials Flow, the Named Credential/External Credential is supposed to fetch and inject the token automatically you should never need to supply it manually. The fact that Flow is prompting for an "Authorization" input almost always means the OpenAPI schema you registered for the External Service explicitly defines Authorization as a header parameter (common when a schema is auto generated from Postman/Swagger export, which bakes in an Authorization header as part of the spec). External Services then dutifully surfaces that as a required input on the Flow action even though the Named Credential is already handling auth underneath it. 

    Fix: 

    1. Open the OpenAPI schema registered on your External Service (Setup → External Services → your service → Actions/Schema).
    2. Find the Authorization header parameter definition on the relevant operation(s) remove it entirely or set it to required: false and don't map it in Flow.
    3. Re-save/re validate the External Service so it regenerates the invocable action without that input.
    4. Separately, confirm on the External Credential itself: the Principal has "Generate Authorization Header" (or equivalent auto-token-injection setting) enabled, and the running user has access via External Credential Principal Access (Setup → your External Credential → Edit Principal Access, or Permission Set External Credential Principal Mappings pre-Winter '25 style naming).

    Once the schema no longer declares Authorization as a parameter the Flow action should drop that input field and the Named Credential will inject the token transparently on every callout same as it would in Apex. 

     

    If after removing it from the schema Flow still prompts, double check you're invoking the action through

    External Services (not a raw HTTP Callout element

    pointed at the Named Credential with a manually-built header) those are two different Flow elements and it's easy to end up on the wrong one when troubleshooting. 

     

    I hope you find the above information helpful. If it does, please mark it as Best Answer to help others too.

0/9000

I went to YouTube and I did not find much of a discussion on the recent data breach incidents. I think it is very important we discuss these incidents and prepare our orgs for potential threats. Here is a video I made explaining my take:

How Did Hackers Steal Salesforce Data?

https://youtu.be/fEMeBiR6IY4#Security #External Service #External Application
3 commenti
0/9000
3 risposte
0/9000

In Salesforce External Datasource we are trying to Consuming Mule Application via Odata. As part of this, client requirement is for one of the field datatype is IndirectLookup which links to Opportunity Table field. In Mule 4, while creating odata raml, i need to know how to handle IndirectLookup datatype. I tried with datatype as text it failed as below field type doesn't match. In Salesforce : "IndirectLookup". In data source : "Text". Please let me know fix for it. Thanks

How to handle IndirectLookUp datatype in Odata Service Metadata(odata.raml) for Mule 4

#MuleSoft #External Service   #Salesforcecommunity #Salesforce #Metadata

1 risposta
0/9000

When I try to debug the flow, I got this Error.

  • Unfortunately, there was a problem. Please try again. If the problem continues, get in touch with your administrator with the error ID shown here and any other related details.

#Salesforce Flow #Flow #External Service

1 risposta
  1. 9 nov 2023, 09:36

    Hi @Pratik Patil,

    These errors can be hard to debug. The best way to get a quick turnaround on this.

     

    First Method: Set-up the debug log for the user who is getting this error.

    Try to reproduce the error and analyze the debug log to check the root cause.

     

    Second Method: If the debug log won’t give you much information about this error then you have the only way to resolve it in less time which is to log a case with Salesforce support.

    Please share the below information on your case to get a quick response on it.

    • Login access to your affected org(in which the issue is occurring).
    • Complete the steps to reproduce the error again.
    • Complete the error message with the error ID.
    • Attach the snapshot of the error on the case
    • Provide your availability hours.
    • Date and time when the error occurred the first time.

    Support will track the stack trace at your org instance try to find out the root cause of the error and suggest the appropriate solution for the error.

    The above information will help them to filter out the server logs.

     

    If still facing errors kindly share the flow error screenshot along with the error screenshot.

     

    I hope this helps!

     

    Thanks

    Saurabh

0/9000

I'm using External Services with Flow and the repsonse I'm receiving back from the 3rd party system isn't being accepted for some reason. All the fields are mapped successfully

 

Dummy data below

 

Unable to map response for output parameter 200 of invocable action SFRequestPersonDetailsv2.SFRequestPersonDetailsOperation. Received response: {"ResponsePersonDetails":{"Person_Reference":"25161614990003","Title":"Mr","Other_Title":null,"Forenames":"David","Surname":"Office","Date_of_Birth":"1893-02-07Z","National_Insurance_Number":null,"Deceased":false,"Date_of_Death":null,"Home_Tel":null,"Mobile":"07805198","Work_Tel":null,"Email":"office.david@gmail.com","NoK_Name":null,"Nok_Contact_Details":null,"Relationship":null,"OnTenancy":true,"MainContact":true,"TenancyReference":"20109671"}}

 

I can't understand why the values aren't being accepted

 

#External Service #Flow

2 risposte
  1. 10 nov 2023, 13:24

    I saw that, but the only solution suggest was something about special characters. It doesn't explain why it was working a few days ago.

     

    But, then I noticed a 'Z' a the end of the date field. No idea why that suddenly started being sent by the 3rd party system.

     

    So, in summary. it was data being sent in the incorrect format

0/9000

Integrate APIs Faster and Effectively with External Services

 

Ready to integrate faster? Learn about External Services, a feature that transforms OpenAPI end points into invocable actions that you can call from low-code tools and also from code.

 

Integrate APIs Faster and Effectively with External Services Ready to integrate faster?

Session Materials - coming soon (9/14/23)

  • PDF
  • Demo
  • Sample Flow for External Service
  • Sample Open API 3.0 Specification

 

#Integration #External Service #Whatsapp #Flow

0/9000

If you're familiar with the Twilio Verify API, it uses basic authentication to send a One-Time PIN, and there is no token process.  In order to use the Twilio Verify API as an External Service, I had to create a Legacy Named Credential that uses Anonymous Authentication.  To further complicate things, the basic requirements are to send a URL Encoded 'To' address (phone number/email) and 'Channel' (SMS, Email, Phone, WhatsApp).

 

I wrote a quick RAML and posted it in our Mulesoft API Exchange, it imported nicely, and I'm able to add the Auth parameter and ServiceID, but I can't get any parameters to show up in the Flow Action for the 'To' and 'Channel' values.  It's a pretty weird use case, not exactly fitting current External Service functionality, but any insight is welcome!

 

#Flow #External Service #Twilio

2 risposte
  1. 28 giu 2023, 21:06

    Dug through this with one of my Salesforce SMEs.  Here are the fixes:

    • Change Named Credential to password auth
    • Remove Auth header from External Service
    • Use the Apex Defined variable for the URL encoded parameters and pass that to the 'generated' field on the Action.  This is what I initially overlooked.
    • Do not specify any responses in the API spec in Mulesoft Exchange

    For whatever reason, defining responses in the API spec caused Salesforce to fail parsing the response every time.

0/9000

I'm getting a very non-specific error when I try to import an API from our Mulesoft API Gateway.  Any idea what's causing this?  I suspect it's because the URL is blank on the import page, but I have a BaseUri specified in the Mulesoft Exchange RAML.  What am I missing?

 

Non-Specific error when importing API

 

ExternalServicesImportError.png #Enhanced External Services #External Service #Use External Services #MuleSoft Integration

1 risposta
  1. 7 giu 2023, 15:53

    There is an issue with how our Enterprise writes our OAS.  We are only using Mulesoft Gateway Proxy, and importing our OAS to be used in the Mulesoft Exchange catalog.  Each of our OAS generating the error would need to be rewritten to comply with the specific Mulesoft formatting needed by the connector.

0/9000

Salesforce Summer 22 Development Features You Can't Miss  Welcome to #Summer22Treasure ! In this release, you will find lots of new features and new enhancements related to Lightning Experience, Salesforce Flow, Lightning Web Component, Apex, Experience Cloud, and APIs. In this video, I have focused on some of the powerful, important development features which we all should know as this will help us to write more secure and effective code.  #Release Readiness #External Service #LWC #LWC Development  ▬ Contents of this video ▬▬▬▬▬▬▬▬▬▬ ✅ - Secure Apex Code with User Mode Database Operations (Beta) ✅ - Overloads Aren’t Allowed on @AuraEnabled Methods ✅ - Call Invocable Actions from Apex (Developer Preview) ✅ - Call External Services Registrations from Apex ✅ - Call External Services Registrations from Flow

 

Youtube Link: https://youtu.be/jQxR8bwjT54

 

Salesforce Summer 22 Development Features You Can't Miss Welcome to ! In this release, you will find lots of new features and new enhancements related to Lightning Experience, Salesforce Flow, Lightni

 

@The Blog Group @Developer Group, Kitchener, CA @Admin Group, Jaipur, IN @Kolkata User Group @Kolkata User Group, India @Toronto Salesforce Developer Group @Admin Group, Bikaner, IN @* Release Readiness Trailblazers *@New Delhi User Group @* Salesforce Administrators *@* Salesforce Developers *@Developer Group, Dhaka, BD

0/9000