Are we talking Salesforce or Oracle Apex Salesforce here?
If it's the latter you can use the ORDS (Oracle Rest Data Services) to build your web API.
I have a fairly large, existing application. I need to start sharing data between Salesforce and my app.
Receiving Salesforce data:
To receive data, would I simply create a webhook? Like..
https://myapp.com/api/webhook/salesforce
This is how I do it with Stripe. I use a webhook to listen for events and receive data.
But similar to Stripe, how do I create the API key? Do I need to do this? I'm assuming I would get this info from Salesforce.
Sending data to Salesforce: Then the reverse of this? Sending data to Salesforce. I get that I would create a Post Request and send the data via a Salesforce endpoint, but how do I get started building something like this?
I'm not expecting anyone to break it all down for me. But rather point me in the right direction on my path to learning how to do this. I tend to make things more harder than they really are. I feel this might be the case.
In my existing app, what is the best way to do something like this? I'm researching API crash courses and articles, but not even sure if I really need an API.
Are there any real world scenarios courses that explain how to do this with Laravel? Any good packages I should look in to.
Any help or tips would be greatly appreciated. Currently using Laravel 8.
oh good. salesforce may let you modify the webhook attributes, idk. but often you use the webhook to trigger your own call to their API to get the UpdateRecord. So on to the questions...
Do I send the data via my controller
What helped me was looking at external services like MVC where the service is the M. So it is just another place to get data. I make a services folder add em there... services/salesforce and then a couple of methods, one for the setup, one to map the response, and then whatever methods.. getRecord()
there's no pride in authorship...
public function handleUpdateRecord($payload): \Illuminate\Http\JsonResponse {
Log::info('Hit the UpdateRecord method');
// or queue a job
$updatedRecord = (new Salesforce)->getRecord($payload['data']['attributes']['id']);
// Do Logic to Update the Record
...
Do I need to create a resource
not sure what you mean here.
What are Headers? Do I need Headers
Common to just use Laravel's guzzle wrapper and you can do whatever salesforce dictates.
Do I need to create an authenticated link to give Salesforce. If so, How?
whatever auth they require you can make a question for or find a quick answer searching.
Please or to participate in this conversation.