5

We have use case where user would enter information on IVR system and based on that we would like to fetch user details and transfer it to the agent. While we can use standard SOQL query REST API that is provided by salesforce, we are contemplating if we should right custom REST API instead. While using standard SOQL query makes development faster but it requires caller to know the salesforce object details and things like that vs custom REST API all caller needs to know is the interface which hides salesforce details from caller.

I am interested in any recommendation between the two approaches.

1
  • 1
    You've outlined it pretty well yourself what pros and cons you have to decide between.
    – Adrian Larson
    Commented Dec 12, 2015 at 1:05

1 Answer 1

3

The answer really depends on many factors

1)Data volumes .How much data volumes are we querying against and how many rows are we retrieving or expecting at maximum

Out of box will be preferred if the following concerns apply:

2)Pagination need if large rows are returned

No custom code as out of box rest API provides pagination support.

Use of offset for custom build gono slow down API

3)availablity of apex developers if we need custom build .Lot of code to maintain in future

4)How flexible is the third party system that calls SFDC to write soql and parse XML or JSON.SFDC dev resources can write necessary soql for caller if needed

5)security -Custom services will allow you to be flexible(use with or without sharing) while standard will always follow platform sharing and security rules.

Out of box REST API definitely will have good performance .

3
  • 1
    Your recommendation on #1 is very ambiguous. In which case?
    – Adrian Larson
    Commented Dec 12, 2015 at 1:29
  • On performance ,maintainability and pagination recommending option 1 Commented Dec 12, 2015 at 1:35
  • Thanks Adrian for the details! It is going to be querying against 15 million records. At max we would expect 5-10 rows and in 70% of the cases 1 row. We would also be querying against the encrypted data.
    – adesai
    Commented Dec 14, 2015 at 18:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .