0

New to Salesforce Connect, but not necessarily new to parsing JSON responses and utilizing webservices.

I am attempting a test connection to https://jsonplaceholder.typicode.com/comments with Salesforce Connect.

When utilizing ODATA 2.0 or 4.0 with type set to JSON and no authentication set, I receive the following error after clicking Validate and Sync:

This data isn't available because the associated table in the external data source can't be found. Contact your administrator for help. Attempted query URL: https://jsonplaceholder.typicode.com/comments/$metadata

When utilizing Simple Url I receive the following error after clicking Validate and Sync:

Simpleurl type external data sources do not support authentication

Why is Salesforce Connect auto-appending the $metadata to the call?

How do I need to configure Salesforce Connect to utilize an endpoint like this so that is translates into external objects?

2

First, the OData model is a protocol; it expects to be able to call sub-resources of the specified URL and get specific responses back. For example, $metadata returns a list of objects/fields available in the resource. There's examples of doing this on this trailhead. OData doesn't work on static files, unless you have all the files in a specific format.

Your best option would be a custom adapter. In this method, you specify Apex code to parse the resource (in your case, JSON), and this in turn allows you to use static files like you expect. There's quite a bit of text to read, which I won't replicate here, but you can also start here in the documentation and walk through the sample code and definitions.

1
  • Thanks, This set me straight, I initially received a completely incorrect explanation of ODATA.
    – S.B.
    Nov 28 '18 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.