2

We're looking for a way to integrate Craft Commerce with Salesforce. What are the options there?

Is there a Craft API to talk to? (I can't seem to be able to find it...)

And the other option is to write a plugin in Craft that communicates outwards to Salesforce, I suppose?

1

Is there a Craft API to talk to?

Yes, but it depends on what sort of API you're talking about and you'll need a Craft plugin no matter what.

At the PHP level, Craft has a service layer API that plugins can utilize.

If you're looking for a web service API where you can configure what gets exposed so that 3rd party apps can consume Craft data, there is the Element API plugin that works with any Craft elements (including plugin elements, like Orders, Products and Variants like in Commerce). Note that this is read-only and is not a REST API.

There currently isn't a native REST API in Craft, but feel free to add your comments to this feature request. It's also possible for a plugin to implement its own REST API using its own controller endpoints and authentication/authorization methods.

As far as consuming 3rd party web endpoints, Craft ships with Guzzle that a plugin can utilize, or it can use any other library it desires (or straight up cURL).

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.