Discover how a bimodal integration strategy can address the major data management challenges facing your organization today.
Get the Report →Edit and Search WooCommerce External Objects
Use the API Server to securely provide OData feeds of WooCommerce data to smart devices and cloud-based applications. Use the API Server and Salesforce Connect to create WooCommerce objects that you can access from apps and the dashboard.
The CData API Server, when paired with the (or any of 200+ other ADO.NET Providers), enables you to access WooCommerce data from cloud-based applications like the Salesforce console and mobile applications like the Salesforce1 Mobile App. In this article, you will use the API Server and Salesforce Connect to access WooCommerce external objects alongside standard Salesforce objects.
Set Up the API Server
Follow the steps below to begin producing secure WooCommerce OData services:
Deploy
The API Server runs on your own server. On Windows, you can deploy using the stand-alone server or IIS. On a Java servlet container, drop in the API Server WAR file. See the help documentation for more information and how-tos. You can find guides to deploying the API Server on Azure, Amazon EC2, and Heroku in the CData KB.
Connect to WooCommerce
After you deploy the API Server and the , provide authentication values and other connection properties needed to connect to WooCommerce by clicking Settings -> Connection and adding a new connection in the API Server administration console.
WooCommerce supports the following authentication methods: one-legged OAuth1.0 Authentication and standard OAuth2.0 Authentication.
Connecting using one-legged OAuth 1.0 Authentication
Specify the following properties (NOTE: the below credentials are generated from WooCommerce settings page and should not be confused with the credentials generated by using WordPress OAuth2.0 plugin):
- ConsumerKey
- ConsumerSecret
Connecting using WordPress OAuth 2.0 Authentication
After having configured the plugin, you may connect to WooCommerce by providing the following connection properties:
In either case, you will need to set the Url property to the URL of the WooCommerce instance.
You can then choose the WooCommerce entities you want to allow the API Server access to by clicking Settings -> Resources.
After determining the OData services you want to produce, authorize users by clicking Settings -> Users. The API Server uses authtoken-based authentication and supports the major authentication schemes. Access can also be restricted based on IP address; by default, only connections to the local machine are allowed. You can authenticate as well as encrypt connections with SSL.
Follow the steps below to connect to the feed produced by the API Server.
URL: Enter the URL to the OData endpoint of the API Server. The format of the OData URL is https://your-server:your-port/api.rsc. Note that plain-text is suitable for only testing; for production, use TLS. Select JSON in the Format menu.
After you have created the external data source, follow the steps below to create WooCommerce external objects that reflect any changes in the data source. You will synchronize the definitions for the WooCommerce external objects with the definitions for WooCommerce tables.
After adding WooCommerce data as an external data source and syncing WooCommerce tables with WooCommerce external objects, you can use the external objects just as you would standard Salesforce objects.
Create a new tab with a filter list view:
Display related lists of WooCommerce external objects alongside standard Salesforce objects:
You can use the following checklist to avoid typical connection problems:
Ensure that the server you are hosting the API Server on is using TLS 1.1 or above. If you are using the .NET API Server, you can accomplish this by using the .NET API Server's embedded server. If you are using IIS, TLS 1.1 and 1.2 are supported but not enabled by default. To enable these protocols, refer to the how-to on MSDN and the Microsoft technical reference.
If you are using the Java edition, note that TLS 1.2 is enabled by default in Java 8 but not in Java 6 or 7. If you are using these earlier versions, you can refer to this this Oracle how-to.
Authorize API Server Users
Connect to WooCommerce Data as an External Data Source
Synchronize WooCommerce Objects
Access WooCommerce Data as Salesforce Objects
Troubleshooting