Samples > Starter stores > Starter store enhancements > Social Commerce > WebSphere Commerce Dojo Enhancements API > Social Commerce services
Implement the Service Adapter API for new service providers
Social Commerce is delivered as a set of WebSphere sMash modules that provide a REST API interface which is called by the social content widgets. An adapter is a WebSphere sMash module that implements the Social Commerce Service Adapter API. Social Commerce uses the Service Adapter API to connect social content widgets with the following supported service providers: Pluck, Lotus Connections, and Bazaarvoice.
Each service provider has their own set of adapters that retrieve and store social content using their own APIs. You can add support for new service providers by implementing the Java interfaces within the Social Commerce Service Adapter API to support adapters that access content from those service providers.
Before you begin
- Review the API documentation for the following Java interfaces within the Social Commerce Service Adapter API:
- com.ibm.commerce.soccom.adapter.IProfileAdapter
- com.ibm.commerce.soccom.adapter.IBlogAdapter
- com.ibm.commerce.soccom.adapter.IPhotoGalleryAdapter
- com.ibm.commerce.soccom.adapter.IReviewAdapter
- Set up the development environment for WebSphere Commerce sMash:
- Install the sMash Eclipse plug-in. For more information about installing this plug-in, see the IBM WebSphere Commerce sMash Getting Started Guide.
- Start WebSphere Commerce Developer and switch to the Enterprise Explorer view.
- Select Window > Preferences to open the Preferences window.
- In the left pane, click WebSphere sMash to open the WebSphere Commerce sMash preference page.
- In the Zero home field, type the full path of the location where the sMash application runtime SocCore project is stored. For example, workspace directory/SocCore.
Implement the Service Adapter API for new service providers involves the following steps:
- Configure service adapters
After you create a service adapter, configure the new adapter in the SocApp project.
- Test service adapters
Start the SocApp application as a WebSphere sMash application to verify the local changes.
- Publish new WebSphere Commerce sMash applications
After testing the WebSphere sMash application, you can export and publish the service adapter project to the SocCore repository. Exporting the service adapter project creates an archive file that contains all of the classes and Web artifacts associated with the service adapter in the export directory of the project.
- Deploy new service adapters
Use the Administration Console to update the Social Commerce JEE application with new service adapters.
- Add support for new service adapters
To ensure compatibility with the social content widgets and the REST API, adding support for new service provider adapters involves configuring both the capabilities settings and the profile details in the SocApp/config/adapter.config file.
Related tasks
Related reference