You need to sign in to do that
Don't have an account?
newguySF
send data to a REST API every time a new account is added to Salesforce
Hi folks,
Sorry for the total newbie question here regarding triggers, but here is my scenerio:
What are some of the options available to send data to a 3rd party REST API every time a new account is added to Salesforce?
I have been initially looking at code examples for triggers on account after insert. In addition to this, is there a way using the SFDC streaming API? Any ideas on What API usage is best practice + code examples would be much appreciated.
Thanks in advance!
You can create a workflow which automatically sends an Outbound message to the webservice, when an account is created.
For further information check this link: http://www.salesforce.com/docs/developer/cookbook/Content/workflow_om.htm
Hope this helps.
Regards,
Satish Kumar
Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.
Another link about the Workflow rules:
http://login.salesforce.com/help/doc/en/creating_workflow_rules.htm
Regards,
Satish Kumar
Thanks for the reply but, from my understanding, the Outbound Message action is SOAP only on workflow rules. Is that correct? I'm looking to send the message to a REST API.
Thanks for the help.
Well, in that case you would have to write an Apex class which calls a Webservice everytime a record is created.
You could also do some sort of Client Polling but that would periodically check for new records but that would be a strain on resources.
Regards,
Satish Kumar
Thanks again for all the help!