In the last article is about overview of Social Commerce. In the entry, our goals is to share the basic configuration steps to configure social commerce.
Architecture Diagram
- Social commerce not part of WC EAR, provided separately by sMash
- Rendered Store Page with Catalog Content – provided by WC as HTML
- Static Social Content for Search Engines – viewable in <noscript>, ie: with Javascript turned off
- WC JSPs will access content directly from sMash
- gets cached with JSP
- Social Content Widget – provided by sMash, talk to sMash using HTTP + JSON
- Separated widgets from service providers
In sMash
- REST API – front door for widgets
- Service Adapter API – Java API
- Service Adapter Implementations –
- Pluck – HTTP + JSON
- Lotus Connections – HTTP + ATOM
- Bazaarvoice – HTTP + XML
Store Page Components
- Social Content Widgets
- Static Social Content (SEO)
- Precision Marketing Integration
Social Content Widgets
- Built with Dojo 1.3 – IBM Strategic Javascript library
- Dynamically render most recent social content
- Highly interactive with no page transitions
Sample Blog Widget
<div
dojoType=”ibm.social.Blog”
id=”BlogWidget”
title=”My Sample Blog”
resourceId = “SampleResourceId”>
</div>
- Resourced – must identify a unique item in store.
ie, subcategory:
${WCParam.storeId}_${WCParam.catalogId}_${WCParam.categoryId}
- product resourceId might be:
${product.partNumber}
CSS for Widget Customization
Static Social Content
- Cached social content data that is rendered using <noscript> tag
- Slightly stale content
- Can be indexed by search engines
- Same look as the dynamic widget view
Precision Marketing Integration
- Social content widgets publish activity events whenever shoppers create social content
- Guest shoppers not tracked
- Two AJAX requests, one to promotions engine, and the other to sMash
WebSphere sMash Application
- Overview
- Standalone web server that provides Dojo widgets, REST API, and SEO content for Social Commerce
- Runs in a different process from Commerce WAS process
- Requires IHS reverse proxy config to maintain same hostname:port for store pages and social commerce services
- sMash is stateless, no session
User Authentication
- uses LTPA
- sMash and WC share key file
- token store in cookie and passed between sMash and WC
Configuration
- CLI not required
- Sample Adapter Configuration
- REST API
- Isolates widgets from service providers
- service types:
- Blogs, photo galleries, ratings and reviews, user profiles
- HTTP + JSON:
- stateless server, readable URLs, allows caching of social content
- Service Adapter API
- Java API
- clearn interface between REST API and individual service providers
- allows developers to plugin adapter implementations without modifying widgets or REST APIs
Adapter Implementations
- Pluck
- Blogs, Gallery, Profile
- Third party
- Bazaarvoice
- Reivews
- Third party
- Lotus Connections 2.5
- Blog, Photo Gallery, Profile
- Hosted and maintained by merchant
Administration
- Social Commerce application is mnaged and updated using WAS, includes MBean
- Start and stop
- Query status
- Generate and manage proxy configuration
- MBean invokes with wsadmin
- MBean uses sMash CLI under covers
Development Environment
- Social Commerce customization and development is done with Commerce Toolkit
- WCIntegrationWizard tool used to enable and configure SC development environment
- SocCore – sMash CLI
- SocApp – sMash application
- soccom – Social Commerce EAR
- SocDevProxy – development only proxy
- SocMgmtProxy – MBean
Runtime Environment
- WCIntergrationWizard – enable/config in runtime as well
Enabling and Configuring Social Commerce
- Configuring WC Developer
- Customize external adapter config – planning step
- Import projects
- Update adapter config in project
- Publish social commerce add-on sar file
- Verify
- Configuring WC Server
- Customize external provider adapter config file
- Enable social commerce EAR file
- Run WCIntegrationWizard (runs config_ant under covers) or config_ant -DfeatureName=social-commerce
- Modify IHS config
- Publish social commerce add-on SAR file
- Verify service providers with social content
- User profiles, photo galleries, category blogs:
- Pluck: SiteLife service
- Lotus Connections V2.5
- Product reviews:
- Bazaarvoice: Ratings & Reviews service
Adapter config file location
- Starts empty, so if forget to edit, nothing happens
- Developer
<wc>/components/social-commerce/config/
adapter.config (empty)
adapter.config.template
- After importing: socapp project – config directory
- Server
<wc>/components/social-commerce/config/
Customizing adapter config file
- Provider selection
/config/soccom/adapter/blog = “pluck” (or “lc”)
/config/soccom/adapter/photoGallery = “pluck” (or “lc”)
/config/soccom/adapter/profile = “pluck” (or “lc”)
/config/soccom/adapter/review = “bv”
- Pluck
/config/soccom/pluck/server = “pluckstage.yourdomain.com”
/config/soccom/pluck/sharedSecret= “”
/config/soccom/pluck/adminUser = “adminuser”
- Bazaarvoice
/config/soccom/bv/serverURL = “http://72.2.xx.yy/bvstaging/nnnn“
/config/soccom/bv/clientCode = “zzzzzzz”
/config/soccom/bv/sharedKey = “key”
- Lotus Connections
/config/soccom/lc/server = “LC SERVER HOSTNAME”
/config/soccom/lc/tdiServer = “TDI SERVER HOSTNAME”
/config/soccom/lc/scopeHandle = “LC SCOPE HANDLE”
/config/soccom/lc/adminUser = “LC ADMIN ID”
/config/soccom/lc/adminPassword = “LC ADMIN PASSWORD”
/config/soccom/lc/restAdminUser = “LC REST ADMIN ID”
/config /soccom/lc/restAdminPassword = “LC REST ADMIN PASSWORD”
Integration Wizard enablement
- WCIntegrationWizard
Input
adapter.config
instance name
database password
user registry – database or LDAP
Output
Installed soccom EAR
IHS rpoxy rules fragment file: <WCINSTANCE>/temp/proxy.config
Log
<WCINSTANCE>/logs/enablesocial-commerce<TIMESTAMP>.log
** Only IHS works with social commerce
Social Commerce Problem Determination
- Trace com.ibm.commerce.soccom.*
- Starting and stopping the soccom_<instance> application in WAS will start/stop sMash runtime
- sMash runtime uses about 57 MB of memory (very lightweight)
- sMash logs: <SocAppProject>/logs (refresh project to see logs)
- Access – looks like IHS access logs
- Error – summary of errors
- Trace – without trace enabled, looks identical to error log.
- Troubleshooting basic configuration checklist:
- Enabled social commerce application
- Configured adapters
- Published madisons store add-on
- Configured ihs proxy
- Troubleshooting
- has sMash runtime started? verify java.exe (<100MB) exists
- start sMash manually
set JAVA_HOME=<>
cd <SocCore>
zero update
cd <SocApp>
<SocCore>/zero update
<SocCore>/zero resolve
<SocCore>/zero start
- Make sure JSP cache is cleared
- Cannot view any social content, but pages show correct tabs
- Verify external provider: accessible, operational,
- Check parameters in adapter.config
- Store users can view, but cannot post (make sure user is logged in)
Stay tuned for the next topic – Data Load Tools
New data load tools allow for efficient loading of catalog, pricing and inventory information into WebSphere Commerce database.