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
salesforce intesalesforce inte 

Importing account info from salesforce to external app

Hi,
we want to import new account info from salesforce to our existing web application.
User can enter account info from both web application and salesforce.
How we can import only new accounts and how data duplication can be avoided
as user may enter diffrent account names in salesforce( test company inc) and web application(test company incorporation)
How we can check if record exists in salesforce while importing account info into web application database.
Amit Lohogaonkar
amit@varstreet.com
RickyGRickyG
Amit -

There are a few issues involved in your question.  As far as accessing data, you can access data in a Force.com object through our API, although I suspect you know that.

The larger issue has to do with recognizing duplicates companies.  The case that you cite does not really have a way for a computer to determine that the names are the same.  I guess you could write logic to check for all the cases, but that would probably not be worth the effort.

There are a couple of approaches you could take.  The first would be to assign a meaningful unique key, such as primary phone number.  Of course, users could have different primary phone numbers, either through multiple possibilities or simply typing mistakes.

You could also give users the opportunity to do a lookup on existing company names via a SOQL query.  For instance, the user could submit a query for companies with names like "test co" in your example, get the responses, and either select one of the values or enter a new company.  Once again, this depends on users properly searching and selecting the right company.

The Force.com platform does support the concept of an 'upsert', which updates a record if the unique key exists and inserts it if the unique key does not exist, but this is not the direction you want to move the data, nor will it solve the matching problems discussed.

Finally, you could have a custom object with the application or user name and the date and time last accessed, and you could select accounts added since that time.  Brute force, but it might get you where you want to go.

Hope this helps.

salesforce intesalesforce inte

Hi RickyG ,

Thanks for your suggestions.

We are using your api for inserting data and importing account info.

From data duplication point of view we can not check with the help of names or phone numbers.

In order to get real time data syncing can we ping salesforce database every 5-10 minutes without any issues like bandwidth or failure to retrieve data?

Please let me know if any new things are going to come up. We are currently using api version 10.0

 

Amit Lohogaonkar

amit@varstreet.com

 

RickyGRickyG
Amit -

There should be no issue with data retrieval failure, and the bandwidth issue is almost entirely dependent on what you are trying to do.  Retrieving a handful of records from the Force.com database should be no problem - downloading tens of thousands might be.

The core of the problem, though, lies in human/data interaction.  Although there is always something new coming up <g>, the real issue is getting your users to avoid needless data duplication - which is completely dependent on user procedures. 

Hope this helps.

salesforce intesalesforce inte
Thanks ricky, We got it. No data duplication by user allowed. Thanks Amit@varstreet.com