1

I have a softphone application in salesforce that uses websocket to connect to a CTI service running on a server. The customer may need to connect to different server for the service.

Eg: Customer 1 needs to connect to service running on cust1.server.com. So the websocket URL for Customer 1 will be wss://cust1.server.com:1000

Customer 2 needs to connect to service running on cust2.server.com. So the websockt URL for Customer 2 will be wss://cust2.server.com:1000

So when a customer installs the application from Salesforce marketplace, I want to let the customer enter the URL before they use the application. In the application, I want to check the value set by the customer and connect to that URL.

What would be the best way to store information like that in Salesforce?

I have read this article on Custom Settings. But I don't think this will help because if the custom settings is part of managed package then it can't be edited. Also once the custom setting is saved, its value cannot be changed.

2 Answers 2

2

Custom Settings can be edited by administrators if set to Public. When set to Protected, you can still write a Visualforce page to insert/update these settings if you prefer to enforce business logic (e.g. checking the URL).

For a Call Center, you would typically want to create a CallCenter definition instead of using Custom Settings, which is designed to be used by CTI integrations. In particular, the adapterUrl can be configured for each client to use the appropriate adapter. You'll want to read more about Open CTI for additional information on how you should be designing your system.

0

You need to use Protected Custom Settings and create a visualforce page to capture user entry during installation.

For more information, refer Storing Sensitive Data

Protected Custom Settings

Custom settings enable application developers to create custom sets of data, as well as create and associate custom data for an organization, profile, or specific user. However, setting the visibility of the Custom Setting Definition to “Protected” and including it in a managed package ensures that it’s only accessible programmatically via Apex code that exists within your package. This is useful for secrets that need to generated at install time or initialized by the admin user.

Unlike custom metadata types, custom settings can be updated at runtime in your Apex class, but cannot be updated via the Metadata Api.

In order to allow authorized users to create and update sensitive information in the UI, create a Visualforce page that only accepts input and does not render the value back on the page. The “transient” keyword should be used to declare instance variables within Visualforce controllers to ensure they are not transmitted as part of the view state.

Finally, configure the security settings for this page to ensure it’s only accessible by limited profiles on an as needed basis.

You must log in to answer this question.

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