0

I am selling a Java App that customers are installing on their server and now build a Salesforce app (Managed package) to integrate it. This means

  • The Salesforce App packages some Canvas elements to render UI from the Java app
  • The Java App needs to modify Salesforce data on behalf of the Salesforce User who triggered it through the Canvas-exposed UI. I planned on using packaging a Connected App for that.

enter image description here

I am struggling with those questions:

1) How to cope with dynamic Canvas endpoints

The problem is that Connected Apps and Canvas need predefined Endpoint URLs and I don't have them during package time. The Java app of one customer mights sit on www.acme.com and the next one on www.customer.com.

2) Will the Modifications made by the Java app through the Connected App be on behalf of the actual user?

This is what I want. If the Salesforce User clicks a button int Java UI displayed throught the Canvas and the Java app then uses a Salesforce API to modify data in Salesforce will this be some kind of super admin who does it or the actual user. Will it respect permissions and profiles?

3) What are the drawbacks of such an architecture compared to both systems having real REST APIs and each other just calling each others APIs.

  • 3
    I feel this might be an X-Y problem. You're currently stuck on a path that is likely a non-starter. I would think the Java app should be a Static Resource (hosted in Salesforce), with configurable REST API endpoints. – sfdcfox Jun 27 at 21:47
  • You are following me and have seen my attempts. :-( The reason for asking about potential solution details is that naming the business reasons behind it are even more vague. No time to provide a stable API on Java side. No time to recreate nice UI in Salesforce. The cheapest and fastest integration you can get which still passes Security Review. I was to shy to ask this... – Robert Sösemann Jun 27 at 21:52
  • BTW: I absolutely dont get what you mean with "the Java app should be a static resource in Salesforce". It's a Java WAR that customers install on their Tomcat in their datacenter. So the Canvas would have to connect to "www.UNKNOWN.com/myknownsubpath – Robert Sösemann Jun 27 at 21:54
  • Oh, I thought you were saying it was client-side Java (e.g. an applet). What your saying makes more sense now. I don't see any way you can write a packageable canvas app, nor pass a security review, since each client has their own server. I think you'd need to have at least some sort of basic API for your clients to install instead, and you'd host the central app on your server(s). – sfdcfox Jun 27 at 22:25

Your Answer

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

Browse other questions tagged or ask your own question.