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
krish99krish99 

Pull Data From Third Parties by using salesforce features

HI,

      I want to pull the data from php[Accounts,contacts,opportunities,quotes,orders] and i want to save this data in salesforce. May i know how can i pull the data from php by using salesforce features.can any one provide me the sample code.
hitesh90hitesh90
Hi krish,

You have to create webservice in PHP to get the record.
and Use that webservice in SFDC to get the response using Http Callout and update data.

see Below reference sites For creating webservice:
http://www.codeproject.com/Tips/671437/Creating-Web-Service-Using-PHP-Within-10-Minutes
http://davidwalsh.name/web-service-php-mysql-xml-json

Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator & Advanced Administrator & Sales cloud consultant
My Blog:- http://mrjavascript.blogspot.in/
krish99krish99
@Hitesh90

      I want to connect to php from salesforce and i want to pull the data by using url's is this possible...?? as a salesforce developer.
hitesh90hitesh90
yes, It is possible.

You have to use Http callout for that. I have done same thing previously. 
Get php records in SFDC. it was in XML format and Parse that XML using XML Dom controller and update the records accordingly.
krish99krish99
@Hitesh90,

       Can you give me suggestions or sample code how to start this integration..??
hitesh90hitesh90
Follow the below steps for integration.

Step 1- Do you have already built webservice on PHP?
If yes, Go to step 2
If No, First create webservice in PHP
  reference: http://www.codeproject.com/Tips/671437/Creating-Web-Service-Using-PHP-Within-10-Minutes
                      http://davidwalsh.name/web-service-php-mysql-xml-json

Step 2 - Create one apex Controller in salesforce and use Http callout
    reference : http://wiki.developerforce.com/page/Apex_Web_Services_and_Callouts
                        see Topics :- Remote Site Administration and Security and HTTP Code Sample


Step 3 - Get the response from Http Callout and Parse it.
  reference : http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_xml_dom.htm

Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator & Advanced Administrator & Sales cloud consultant
Email :- hiteshpatel.aspl@gmail.com
My Blog:- http://mrjavascript.blogspot.in/