Skip to main content

#Enhanced External Services0 debatiendo

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 respuesta
  1. 7 jun 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

I am trying to callout to the Stripe charge search api to find a charge based on a metadata value.  This is the api doc https://stripe.com/docs/api/charges/search.  I used Swagger Inspector to do the callout to get the sample json response.  When I plug the response into the new http callout action I get this error message Specify at least one variable or element for your List data type and try again.

 

I am a novice when it comes to json.  I was hoping someone here could help me with my response to let me know what I need to do to make this work. 

 

Here is the sample response.  All data is test data. #Flow #Enhanced External Services #Automation

{

"object": "search_result",

"data": [

{

"id": "ch_3MPY2AAFKzBRZEPq3Lo7im0H",

"object": "charge",

"amount": 280917,

"amount_captured": 280917,

"amount_refunded": 0,

"amount_updates": [],

"application": "ca_1pvP3rYcArUkd3InUnImFI9llOiSIq6k",

"application_fee": null,

"application_fee_amount": null,

"balance_transaction": "txn_3MPY2AAFKzBRZEPq3TQ2Vg7x",

"billing_details": {

"address": {

"city": "Queens",

"country": "US",

"line1": "123 Main Street",

"line2": null,

"postal_code": "11354",

"state": "NY"

},

"email": "customer@test.com",

"name": "Test Customer",

"phone": null

},

"calculated_statement_descriptor": "CAPITAL PRIDE ALLIANCE",

"captured": true,

"created": 1673557803,

"currency": "usd",

"customer": "cus_N9rlenBRAEC6u7",

"description": "Payment for invoice(s) CPA-INV-3246",

"destination": null,

"dispute": null,

"disputed": false,

"failure_balance_transaction": null,

"failure_code": null,

"failure_message": null,

"fraud_details": {},

"invoice": null,

"livemode": true,

"metadata": {

"EmailAddress": "customer@test.com",

"Invoice number": "CPA-INV-3246",

"OrgCode": "!Zr47q",

"OrgName": "Capital Pride Alliance, Inc",

"fee": "79.17"

},

"on_behalf_of": null,

"order": null,

"outcome": {

"network_status": "approved_by_network",

"reason": null,

"risk_level": "normal",

"seller_message": "Payment complete.",

"type": "authorized"

},

"paid": true,

"payment_intent": "pi_3MPY2AAFKzBRZEPq31ncGu7D",

"payment_method": "pm_1MPY2BAFKzBRZEPqceiQCuZG",

"payment_method_details": {

"card": {

"brand": "mastercard",

"checks": {

"address_line1_check": "pass",

"address_postal_code_check": "pass",

"cvc_check": "pass"

},

"country": "US",

"exp_month": 6,

"exp_year": 2027,

"fingerprint": "L3vBPIWBEzwkifFA",

"funding": "credit",

"installments": null,

"last4": "9999",

"mandate": null,

"network": "mastercard",

"three_d_secure": null,

"wallet": null

},

"type": "card"

},

"receipt_email": "customer@test.com",

"receipt_number": "1991-1726",

"receipt_url": "https://pay.stripe.com/receipts/payment/test",

"refunded": false,

"refunds": {

"object": "list",

"data": [],

"has_more": false,

"total_count": 0,

"url": "/v1/charges/ch_3MPY2AAFKzBRZEPq3Lo7im0H/refunds"

},

"review": null,

"shipping": null,

"source": null,

"source_transfer": null,

"statement_descriptor": null,

"statement_descriptor_suffix": null,

"status": "succeeded",

"transfer_data": null,

"transfer_group": null

}

],

"has_more": false,

"next_page": null,

"url": "/v1/charges/search"

}

2 respuestas
  1. 20 ene 2023, 18:16

    You're getting that error because your sample has some empty lists []. Specifically:

    "amount_updates": [],

    "data": []

     

    Empty lists aren't supported. Without it, the structure isn’t defined and we can’t parse the callout’s JSON response into Apex defined types which makes it usable within Flow.

      

    Once you clear that error you’ll also receive the following error because looks like there are 17 fields with null value:

    Something's not right with the value specified for field null. Check it and try again.

     

    Null values are currently not accepted during Beta. To resolve, replace all instances with a sample value in the format that's expected (if a number supports decimal be sure to include a decimal in the sample).

0/9000
Ben Merven ha preguntado en External Services

I'm trying to get the Raisely API to work with External Services. The api is published in OpenApi 3.0 here: https://api.raisely.com/v3/api-docs

 

I am trying to post a login attempt. But I get an error in the flow debug which says "Error Occurred: Unable to map response for output parameter 200 of invocable action RaiselyV3.postLogin".

 

The thing is, I can see the full json response being sent back and it looks correct (ie the body of the response has all the correct values, including the bearer token, which is what I'm trying to get). In other words, the call out works fine.

 

I've run debug logs and there is no additional info there. I've tried playing around with the schema a bit to see if I can get to work, but to no avail.

 

What does this error mean exactly? Is this likely a problem with the External Service or with the API spec?

 

#Enhanced External Services

11 respuestas
  1. 21 sept 2022, 22:40

    I spent a bit more time on it bit couldn’t get it working. Haven’t had time to investigate any further. I’m waiting for the winter release to see if that helps, otherwise will raise a ticket.

    Broadly I really like the concept. But in practice, I find it cumbersome. Particularly authentication. It’s so convoluted to get working. The fact that I can setup postman to work seamlessly with the Raisely api in about 10 mins but just can’t get ES to work at all is frustrating. I appreciate the direction ES is going but I hope the product team focus on introducing/enhancing some features that would make it easier (and more successful) to use (eg: better error and debug logs, support for more authentication methods and simpler setup, ability to edit the apex-actions and apex-defined variables that get created).

0/9000

Really simple Authorisation Header for lots of @External Services.  

Password Authentication Named Credentials will always encode the username:password.

It would be ideal if the username field was not mandatory so that just the password is encoded to create the encodedkey for the Authorisation Header.

 

Any way to do this declaratively?

 

#Enhanced External Services #Named Credentials

4 respuestas
  1. 7 sept 2022, 15:28

    Thanks @Ross Belmont - this is EXACTLY what is needed to unlock the potential for External Services.   This is a game changer for no-code / low-code pioneers. Thanks!!  

     

    We have 3 services we wish to integrate using this Custom Protocol capability and I'll let you know how we get on.  Thanks again.   S

0/9000

Hi @External Services ,

 

Was anyone able to set an HTTP header (x-api-key) to a POST request with enhanced external services. Official docu suggest that it should be possible: "...send parameters as headers within the HTTP requests...".

 

https://developer.salesforce.com/forums/?id=9062I000000g6WgQAI suggests it could work, but can't get it to work.

 

Anyone able to share an example? This is lacking in the official docu.

8 comentarios
  1. 26 abr 2020, 19:32
    @Petr Svestka

    I was just wondering if instead of using Path "/dir-stuff/" in your json, that instead you tried having the Named Credential with "URL/dir-stuff" and then in your JSON the Path was now "/". So if the same limitations also apply to the Named Credentials or not.

    It would require a different Named Credential for each Path that had the dash though.

    Since Summer '20 is coming shortly and KI shows fixed I understand waiting of course.

0/9000

Hi 

I love Enhanced External Services - but I'm stuck and I can't find anyone that can help me.   I'm stuck with a flow that uses Apex-defined data types. Does anyone have any advice on how I can get some help as I can't get my flow to achieve the desired outcome.      If anyone can help me it would be really appreciated and allow me to build lots more flows once I have got over this hurdle.

1 comentario
0/9000