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
DanSykesDanSykes 

I need to send contact data to web service what is the best way to do this?

Hi Guys,
Here is my issue and what i want to achieve, was wondering if anyone could give me some advice on the best way to this and possibly point me in the direction of/give me an example of how to do this.
 
What i have is a button on the contact view where it pushes the selected contacts to the next page from here i have the id's of the contacts i want to send.  The new page will just be used as a processing data page but behind the scenes i need to get all of the contact records data and push it up to the web service.  I don't think there is a way i can do this using outbound messaging as i want to send the contacts that are selected on the previous page rather than a workflow rule kicking off the send.
 
So i my questions are:
1) What is the best way to send up all of this data to my web service? (Bearing in mind there could be a lot of contacts selected - 1,000's)
2) Should i send a message to my webservice then use the webservice to create a connection to extract the data to it OR create a link to my web service in the salesforce form then send the data to my web service direct?
3) What is the best format to send my data in? 
4) Are there any kind of Dataset kind of objects where i could get all of the data then do a big send? As there is a lot of it i have read about GZipping but not really to sure the details of this? Or is it best to send one contact at a time in an xml type format to split the fields up?
 
Any suggestions Welcome.
Thanks
Kev
 
 
werewolfwerewolf
Should i send a message to my webservice then use the webservice to create a connection to extract the data to it?

Yes!  This is the method I would choose.  That way you don't have to worry about hitting random limits.  The best thing to do is either send a workflow outbound message or a Salesforce SOA message to your external system, both of which would be SOAP protocol calls (SOA being more flexible but a bit harder to set up).  Send nothing more than the IDs of the contacts, or if there's some automated way to identify the contacts via a query then don't even send that, just send a message to your external system that says "go get the contacts."  Then have your external system query Salesforce.com using Salesforce.com's web services API to get the rest of the data on the contacts.