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
D0ubleStakkedD0ubleStakked 

implementing a background process in salesforce

Hi,
   I have an application that replicates data over to Salesforce periodically.
   I've currently implemented this as a background process in my application, and what I don't like is that it requires storing salesforce credentials inside of my application.
 
   What I'd like to do is to implement a background process in Salesforce, if possible, and let that background process initiate the replication.
 
   Is it possible to implement a background process in Salesforce? 
 
Thanks,
Brian
RickyGRickyG
Brian -

Why not use Data Loader to move the data into salesforce?  You can use an encrypted password, which should give you a much higher level of security.

Hope this helps.

- Rick Greenwald
Developer Evangelist
D0ubleStakkedD0ubleStakked

Thanks for the quick response, Rick.

Is the Data Loader something that would be available through the WebService API?

I'm not that familiar with the Data Loader, and I need the data to be replicated several times a day.

Thanks again,

Brian

RickyGRickyG
You can find out about Data Loader here

- Rick Greenwald
Developer Evangelist


D0ubleStakkedD0ubleStakked
Thanks Rick.  I'm reading through the Users Guide right now.
 
Even with the Data Loader approach, I have to store the login credentials in my client app, correct?
Is there anything available in salesforce that would let me trigger this action from within Salesforce?
 
-Brian
 
 
RickyGRickyG
With Salesforce SOA, you can access any Web service.  Create a Web service to access the data you wish to duplicate, and call away.
 
- Rick Greenwald
Developer Evangelist
D0ubleStakkedD0ubleStakked

Thanks Rick.  That's definitely the route that I am thinking.

For the "call away" part, if I want SFDC to call my webservice at regularly scheduled intervals throughout the day, is that possible?

I know that I can implement the call to my webservice within an S-Control and bind that to a custom button or link on the page, but the actually execution of that call is dependent upon the user clicking the button.  I'm hoping to avoid needing the SFDC user to initiate the call, and I also want to avoid storing any user credentials outside of SFDC.  

In the end, I may not be able to avoid storing user credentials in my app, and I'm ok with that.  It just adds complexity to the configuration.

Thanks again for all your help, Rick

-Brian

RickyGRickyG
Brian -

This article details how you can schedule a workflow to run at a specific time.  (Don't worry about the date granularity - in Summer '07, you can set a time-based workflow in terms of hours.)  Using this scheme, you could add the Salesforce SOA code as part of the trigger.

So crazy it just might work.

- Rick Greenwald
Developer Evangelist
D0ubleStakkedD0ubleStakked

Thanks Rick.

That's a great feature to have in SFDC.  I can see a lot of places where I'd like to use that.

Do you know if its possible to have those time-based workflow repeat automatically?  So "repeat every 2 hours after the Opportunity reaches a probability of > 80%"

-Brian

RickyGRickyG
I think you could do this using the same type of logic.  You could have a custom field whose update would trigger the action you wanted to run, and a time based workflow that would do a field update in two hours.  You would have to have the logic of the trigger check the condition each time and set the custom field to a specific value once the recurring workflows were no longer desired.  I haven't tried this, but it makes sense to me - let me know if you do implement this and it works. :manvery-happy:

But my guess is that you wouldn't want this to repeat indefinitely, so after a certain number of iterations, you would want to have a different type of action, like an escalation.

Hope this helps.

- Rick Greenwald
Developer Evangelist

Message Edited by RickyG on 08-20-2007 04:45 AM