I've been trying to find an approach where one could import product listings from Salesforce directly into one of my product types in Craft Commerce. It seems like my only option at this point is to write a plugin that can accomplish this. I recently found a post that mentioned that I would need to use the Salesforce PHP Toolkit to effectively make REST API calls from my platform.

The only issue is I don't know exactly where to start. Can anyone provide some suggestions or advice on how to handle this problem?

1 Answer 1


Generally speaking, it looks like you'd need to create a Craft plugin that imported the Salesforce PHP Tookit library/classes. From there you'd query your Salesforce web endpoint for the data you're looking for.

Once the data gets back, you'd programatically create the products using Commerce's service layer API. You can see any example of that Commerce uses itself to populate default content on a fresh installation in the Commerce_InstallSeeder class in commerce/Commerce/Seed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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