I am creating an managed application for salesforce appexchange listing.

App Functionality:

On certain update events a trigger will send a few non-critical information to a external server application which will process the information. The external server will be hosted in a domain let's say www.mysite.com. All the organizations which will install the managed application (let's say that number is 25 for this example) will communicate with this server.


  1. According to Salesforce governor limits, maximum number of concurrent callouts to a domain is limited to 20 across all orgs. So if in all the 25 orgs, an event is triggered simultaneously (at the same instant) that will make a callout to our server, we will get an CalloutException. So I would like to know how to handle it gracefully? Also I would want to send those failed callouts to our server (be it later), so what would be preferred way to achieve that?
  2. Second query is about the custom objects of our managed application. From what I have read, I have understood that if the objects are protected, the objects will not be visible from outside the managed application (please correct me if I am wrong). However, my understanding on this is hazy so if you could provide me with more information regarding hiding the custom application objects from the system administrator or the users of the org who will install the application, it will be very much helpful.
    Also, if I make the object protected, and if I want my server application to access the objects via the RESTFul webservices that salesforce provides for all custom objects, will my server application be able to access the protected objects?

Example: The custom objects is lets say CustomObject__c. If I make a request to Salesforce with proper access token for the object at endpoint


I can access the data.What if I make the object protected? Can I access the data from my server using this endpoint?

Please provide some information regarding object visibility .


  • last sentence in query 2 needs a question mark, but the system won't let me do it (too small).
    – Jagular
    Commented Oct 7, 2014 at 15:06

1 Answer 1


Regarding question #1, each of your customers is a separate tenant in salesforce.com and is therefore subject to separate limits. Limits are calculated by tenant/customer and not by package. On a related note, the maximum number of callouts is increasing in the Winter '15 release.

Regarding question #2, Custom Objects cannot be protected such that they are not visible to the customer. You may be referring to custom settings, which can be protected. Although they act like custom object in some ways, custom settings and custom objects are different and serve different purposes. Protected custom settings can only be accessed by apex code within the package, and not via the API. From the documentation:

If Privacy is defined as Protected, and the custom setting is contained in a managed package, the custom setting is not accessible using the API in either the developer organization or a subscribing organization.

  • Regarding the Q1. The host is defined by the unique subdomain for the URL, for example, www.mysite.com and extra.mysite.com are two different hosts. This limit is calculated across all organizations that access the same host. If this limit is exceeded, a CalloutException will be thrown. Refer link Q2. If I want to hide the custom objects from end-user, what do I have to do? I want to restrict system admin to use RESTFul api on our objects Commented Oct 7, 2014 at 15:33
  • I see what you mean re: #1 and I'm not 100% sure. If I find out more I'll post back.
    – greenstork
    Commented Oct 7, 2014 at 15:36

You must log in to answer this question.

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