Answers.Body: <p>Generally speaking, it looks like you'd need to create a <a href="https://craftcms.com/docs/plugins" rel="nofollow noreferrer">Craft</a> <a href="https://pluginfactory.io" rel="nofollow noreferrer">plugin</a> that imported the <a href="https://developer.salesforce.com/page/PHP_Toolkit" rel="nofollow noreferrer">Salesforce PHP Tookit</a> library/classes.  From there you'd <a href="https://developer.salesforce.com/page/PHP_Toolkit_20.0_Query_Sample_(Enterprise)" rel="nofollow noreferrer">query</a> your Salesforce web endpoint for the data you're looking for.</p>
  
  <p>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 <code>Commerce_InstallSeeder</code> class in <code>commerce/Commerce/Seed</code>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-06T23:43:17.407Z
Answers.LastActivityDate: 2017-07-06T23:43:17.407Z
Answers.UserDisplayName: Brad Bell
Body: <p>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 <a href="https://developer.salesforce.com/page/PHP_Toolkit" rel="nofollow noreferrer">Salesforce PHP Toolkit</a> to effectively make REST API calls from my platform. </p>
  
  <p>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?</p>
  
Tags: <plugin-development><plugin-craftcommerce>
Title: Looking to export product listings from Salesforce and importing into Craft Commerce?
ThreadText: # Looking to export product listings from Salesforce and importing into Craft Commerce?
  
  (Asked by: username_0 on 2017-07-06)
  
  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](https://developer.salesforce.com/page/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?
  
  **Tags:** plugin-development, plugin-craftcommerce
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-07-06. Score: 1 | Accepted answer
  
  Generally speaking, it looks like you'd need to create a [Craft](https://craftcms.com/docs/plugins) [plugin](https://pluginfactory.io) that imported the [Salesforce PHP Tookit](https://developer.salesforce.com/page/PHP_Toolkit) library/classes. From there you'd [query](https://developer.salesforce.com/page/PHP_Toolkit_20.0_Query_Sample_(Enterprise)) 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`.
  
  
  ---
  
  