function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CyberfireCyberfire 

Visualforce page with API to external webserver - possible?

What I'm trying to accomplish is have certain fields from our opportunities and/or accounts use an API through a visualforce page to automatically populate fields within an external web store.

 

From the user behavior, they navigate to an opportunity, click a custom button, and the external web store launches, with a variety of fields pre-populated with values from Salesforce.

 

I'm also curious if we can do the reverse as well - essentially take some of the data once the order is complete, and perform an upsert or update on the linked record with certain fields from the external web store.

 

I'm completely new to this, so any tips or documentation would be great!

paul-lmipaul-lmi
you wouldn't do this in the VF page, but rather in the Apex controller powering it.  Look at the developer documentation regarding the HTTP class.
infoweldernickinfoweldernick

For the first piece, if your web store will accept URL paramenters, you could accomplish this "integration" without any code at all, just a custom URL with merged fields from the Oppty.  

 

For the trip back in, you'll want to have the Salesforce.com Oppty Id (or some other External Id) stored in your web store so that you can then upsert back to SFDC when updates are made.  You'll need to write some code on the web store end to push the data back, either through the standard API or through an Apex Class exposed as a web service.

CyberfireCyberfire

Yea, I was using URL parameters, but now I've run out of character space for additional values (Salesforce limitation on the formula / code)

 

What kind of Apex Class or API would need to be written on the web store side? I know there must be some good documentation out there, but not sure where to look.

infoweldernickinfoweldernick

Here is a link to the API doc:

 

http://wiki.developerforce.com/index.php/Web_Services_API#API

 

Lots of good info and examples.  If your integration is more complex, you may want to consider a middleware instead of writing more code.  We like Jitterbit (open source) as our middleware of choice.  It plays well with web services and databases alike.

RamyaKrishnaRamyaKrishna

Hi

Can You please tell me the step by step procedure to create & use the Java Plugin in Jitter bit? If you have any sample Pulgin code please share it.

 

Thanks,

Ramya

RamyaKrishnaRamyaKrishna

Hi

Can You please tell me the step by step procedure to create & use the Java Plugin in Jitter bit? If you have any sample Pulgin code please share it.

Thanks,

Ramya