2

I have tried to connect Saleforce to salesforce for data syncronization using web services. This is what I followed.

1) I used partnerwsdl to login to the salesforce org B.

2)Created custom webservice in salesforce org B , which I consumed in Org A.

3)On the opportunity object I created after update trigger and pulled out the id's of the updated opportunity and passed on to the future method in the class and then queried opportunity object using those id's.Then I made a Callout to the custom Webservice and passed data as parameter for upsertion in the destination org.However,I have come to the conclusion that I can only send 10 records as my code makes a Callout for every updated opportunity record .Hence ,once 10 callouts are done means 10 methods are updated in the org B and no more processing is possible

Does that mean real time integration between salesforce and salesforce is not possible or is there something that I am missing.

or

Can I use scheduler in such a way that once trigger is fired, updated records are passed from trigger to class and then scheduler activates the class, which makes a callout to the webservice and then web service processes the records.I am thinking that if it is possible then I do not have to call webservice per record. I can run scheduler every hour and class will passes couple of records to the webservice at once.

Please do let me know of there is some other alternative.It looks like more of batch processing then real time integration is possible between Salesforce and Salesoforce

3
  • Can you detail a little more of your actual requirement? As user2451 mentioned, there is an actual feature called "Salesforce-to-Salesforce" that is designed for data sync. It has some shortcomings and gotchas but can work really well for many common requirements.
    – jkraybill
    Commented Jul 10, 2013 at 7:03
  • As of no we are trying to upsert an opportunity and then we will be upserting other child objects such as contact etc.I have already connected salesforce to salesforce using enterprise wsdl and i have sent an opportunity record to the other record for upsertion and it has worked fine,However,I am trying to store returned id as an external id but I am stuck at that.I have posted my code in the forum ,If u search with the heading:- Synching of data between two orgs ,you will know what basic steps I have taken
    – Sales
    Commented Jul 11, 2013 at 21:14
  • "Salesforce to Salesforce" isn't what you think it is. It doesn't use a WSDL at all. You can use it to do 1- or 2-way synch and for many cases it works better than doing custom work using web services. You also can automate it via some very simple triggers. Read about it here: wiki.developerforce.com/page/…
    – jkraybill
    Commented Jul 12, 2013 at 2:10

3 Answers 3

1

You can make 10 callouts per execution context; initiated from a single event/trigger.

Total number of callouts (HTTP requests or Web services calls) in a request

So if you are integrating in realtime on single record insert/updates and do not need to support bulk updates, (for example a user updates a single opportunity which triggers the callout,) then this should work.

You also need to work within the simultaneous callouts limit:

A callout request is limited to a maximum of 20 simultaneous requests to URLs with the same host. 

And the total future limit:

The maximum number of future method invocations per a 24-hour period is 250,000 
2
  • Oh Ok,so if trigger gets activated then within that trigger context I can make 10 callout's ,Is that correct?
    – Sales
    Commented Jul 11, 2013 at 21:04
  • Hi, yes exactly. Within each "activation" or execution of the trigger you can do 10 callouts.
    – dacology
    Commented Jul 11, 2013 at 22:39
1

The actual feature "SalesForce to SalesForce" accomplishes what you are describing and requires no Apex programming. You didn't say what kinds of orgs (Enterprise, etc) that you are

2
  • We want complete automation,things should happen in the background not that user has to press some button etc.Moreover,this will tell us if we can integrate salesforce with Sap and Peoplesoft etc
    – Sales
    Commented Jul 11, 2013 at 21:04
  • Yes, but you can build a Trigger using Salesforce to Salesforce that will auto share new records. Updates are always automatically shared with other org. There isn't a button someone needs to push in these cases. But if you were also using this as a testing ground for integration with other services like SAP, etc. then no, using Sf2Sf would not be a good direction to pursue.
    – ddeve
    Commented Jul 12, 2013 at 13:51
-1

Find the complete steps to implement the salesforce to salesforce synchromizations below at

http://blog.puthuvannam.com/?p=53

Regards, Satheeskumar Puthuvannam Technology Solutions

You must log in to answer this question.

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