Introduction to Building E-Commerce
Solutions on Heroku and Salesforce
Scott Geosits, Trifecta Technologies Inc., Salesforce.com Solutions Architect and Team Lead
@scottgeosits
All about Trifecta Technologies
▪ IT Business Solutions Company
▪ Custom Enterprise and Highly Integrated Solutions
▪ Specializing in Salesforce, Mobile, and Web
▪ Engaged by leading brands across many industries
▪ 22+ years of Customer Success
Who is Varsity? We are cheerleading!!!
Leading provider of
apparel and accessories
to cheer and dance
teams across North
America
The Varsity Colors business story
Business Need:
•Create fully branded online
fundraising stores on demand
for school teams
•Leverage existing
Salesforce implementation
•Quick and simple setup and
configuration for users
Solution overview

In
te
gr
at
io
n
Ti
er

- A
S
4
0
0
i
S
e
r
i
e
s
E
R
P

Team Store
Microsites

Product
Catalog

heroku add-ons
heroku add-ons

database.com
Worker
Services
Microsite
Configuration

- A
d
o
b
e
S
c
e
n
e
7

- C
y
b
e
r

Environment
Configuration

Microsite
Admin

Varsity Legacy Platform

Adobe
Scene7

-AS400 iSeries ERP
-Order Management System
-CyberSource Payment
Gateway
Solution overview – Force.com

Product
Catalog

database.com

Microsite
Configuration

Adobe
Scene7
Solution Details – Force.com
Why we chose Force.com
▪ Varsity has embraced Force.com across all levels of the business
▪ Significantly lower development costs
▪ Workflow for store approvals
▪ Sales reps do most of their work in Salesforce
▪ Reporting on fundraising program sales
Force.com – Product catalog and store maintenance
▪ Product data sourced from corporate ERP system
▪ Administrators configure product data
▪ Markup and web content controlled by administrator
▪ Configure customizable product layers
▪ Adobe Scene 7 integration updates images immediately
▪ Color scheme groupings for easy maintenance
▪ Sales reps configure store style and content
▪ Catalog per school allows reps to select products for sale
▪ One click to publish site to Heroku
Force.com – Product catalog and store maintenance
Force.com – Order capture and dashboards
▪ Orders captured in both Salesforce and ERP
▪ Dashboards provide easy visibility to sales totals
Force.com – Best practices and lessons learned
▪ Salesforce pushes updates for products, accounts to Heroku
▪ Heroku integration via Salesforce REST API
▪ Be aware of governor limits!
▪

Script limits - this has been removed

▪

DML Statements / query limits

▪

Downstream trigger cascade effects and considerations

▪

Large complex data model can cause you to exceed limits

▪

External email limit exceptions

▪ Limit your API calls
▪

Use custom Apex REST services where appropriate to reduce API calls and define
transaction boundaries
Solution overview – Heroku

In
te
gr
at
io
n
Ti
er

- A
S
4
0
0
i
S
e
r
i
e
s
E
R
P

Team Store
Microsites

Environment
Configuration

heroku add-ons
heroku add-ons

Worker
Services

- A
d
o
b
e
S
c
e
n
e
7

- C
y
b
e
r

Microsite
Admin

Varsity Legacy Platform

Adobe
Scene7

-AS400 iSeries ERP
-Order Management System
-CyberSource Payment
Gateway
Solution Details – Heroku
Why we chose Heroku
▪ Customer facing application functionality
• Java gives us more flexibility for pure custom solution.
• Customer facing sites do not need full Salesforce capabilities and would be cost
prohibitive for user licensing.

▪ Integration
• Real-time processing on Heroku vs. scheduled jobs in Force.com.

▪ Service options
• Availability of more ready-to-go functionality via add-ons

▪ Scalability
• Start small and add dynos as the application grows
Team store and fundraising site
▪ School specific branding, style, and content
▪ Hundreds of school sites rendered via single set of CSS and HTML templates
Custom fundraising e-commerce solution
▪

Full cart and checkout e-Commerce functionality

▪

Adobe Scene 7 renders dynamic product images

▪

Social links allow shoppers to share items

▪

Custom Heroku authentication for customers
Heroku Application Structure
▪ Java / Spring MVC core
▪ Add-on services
▪

Cloudant storage

▪

Memcachier caching

▪

SendGrid email service

▪

CloudAMQP Message Queueing

▪ Adobe Scene 7 dynamic image creation
▪ S3 static asset hosting
▪ New Relic monitoring
Heroku architecture constraints
▪ Web dynos must respond in 30 seconds or less
▪ Dynos must start up in 60 seconds or less
▪ Heap size
▪ 1x dynos get 512 MB, 2x dynos get 1024MB

▪ No session state
▪ Need persistence solution such as Cloudant

▪ No web server or filesystem
▪ S3 or similar solution for static assets (CSS, javascript, images, etc.)
Heroku – Best practices and lessons learned
▪ Caching strategy
▪

Frequently accessed pages pre-generated and cached for fast web dyno response

▪

Two level cache for header, footer, catalog and product HTML components
▪

Memcache provides fast primary lookup

▪

If item not present in memcache, retrieve from Cloudant if not dirty

▪

If dirty, request regeneration of HTML component

▪

Product and account information also cached in this manner

▪ Long running processes
▪

Use worker dynos, message queues and AJAX calls to check status on web pages

▪

Page generation, order completion
Heroku – Best practices and lessons learned
▪ Also use worker dynos for batch processing
▪

Integration worker to update Salesforce from AS/400 ERP

▪

Batch job to re-generate dirty HTML page components in the background

▪ Cloudant for session persistence
▪ Take advantage of add-on services to reduce implementation time
▪

No need to rebuild functionality

▪

Use developer level services for prototyping and development

▪ Throughput and scaling
▪

Java web dynos support multithreading – use this to boost your throughput
For more information…
▪ Heroku Dev Center
•

https://devcenter.heroku.com

•

Heroku is free to try and develop on – sign up for an account at http://www.heroku.com

▪ Salesforce REST API
•

http://www.salesforce.com/us/developer/docs/api_rest/

▪ Developer.force.com
•

http://developer.force.com/

▪ Trifecta Technologies
•

http://www.trifecta.com
Scott Geosits
Salesforce.com Solutions Architect and Team Lead,
@scottgeosits
Visit Us at Booth #1207 Moscone Center Expo North or Online at www.trifecta.com!

Introduction to Building E-Commerce Solutions on Heroku and Salesforce

  • 1.
    Introduction to BuildingE-Commerce Solutions on Heroku and Salesforce Scott Geosits, Trifecta Technologies Inc., Salesforce.com Solutions Architect and Team Lead @scottgeosits
  • 2.
    All about TrifectaTechnologies ▪ IT Business Solutions Company ▪ Custom Enterprise and Highly Integrated Solutions ▪ Specializing in Salesforce, Mobile, and Web ▪ Engaged by leading brands across many industries ▪ 22+ years of Customer Success
  • 3.
    Who is Varsity?We are cheerleading!!! Leading provider of apparel and accessories to cheer and dance teams across North America
  • 4.
    The Varsity Colorsbusiness story Business Need: •Create fully branded online fundraising stores on demand for school teams •Leverage existing Salesforce implementation •Quick and simple setup and configuration for users
  • 5.
    Solution overview In te gr at io n Ti er - A S 4 0 0 i S e r i e s E R P TeamStore Microsites Product Catalog heroku add-ons heroku add-ons database.com Worker Services Microsite Configuration - A d o b e S c e n e 7 - C y b e r Environment Configuration Microsite Admin Varsity Legacy Platform Adobe Scene7 -AS400 iSeries ERP -Order Management System -CyberSource Payment Gateway
  • 6.
    Solution overview –Force.com Product Catalog database.com Microsite Configuration Adobe Scene7
  • 7.
    Solution Details –Force.com Why we chose Force.com ▪ Varsity has embraced Force.com across all levels of the business ▪ Significantly lower development costs ▪ Workflow for store approvals ▪ Sales reps do most of their work in Salesforce ▪ Reporting on fundraising program sales
  • 8.
    Force.com – Productcatalog and store maintenance ▪ Product data sourced from corporate ERP system ▪ Administrators configure product data ▪ Markup and web content controlled by administrator ▪ Configure customizable product layers ▪ Adobe Scene 7 integration updates images immediately ▪ Color scheme groupings for easy maintenance ▪ Sales reps configure store style and content ▪ Catalog per school allows reps to select products for sale ▪ One click to publish site to Heroku
  • 9.
    Force.com – Productcatalog and store maintenance
  • 10.
    Force.com – Ordercapture and dashboards ▪ Orders captured in both Salesforce and ERP ▪ Dashboards provide easy visibility to sales totals
  • 11.
    Force.com – Bestpractices and lessons learned ▪ Salesforce pushes updates for products, accounts to Heroku ▪ Heroku integration via Salesforce REST API ▪ Be aware of governor limits! ▪ Script limits - this has been removed ▪ DML Statements / query limits ▪ Downstream trigger cascade effects and considerations ▪ Large complex data model can cause you to exceed limits ▪ External email limit exceptions ▪ Limit your API calls ▪ Use custom Apex REST services where appropriate to reduce API calls and define transaction boundaries
  • 12.
    Solution overview –Heroku In te gr at io n Ti er - A S 4 0 0 i S e r i e s E R P Team Store Microsites Environment Configuration heroku add-ons heroku add-ons Worker Services - A d o b e S c e n e 7 - C y b e r Microsite Admin Varsity Legacy Platform Adobe Scene7 -AS400 iSeries ERP -Order Management System -CyberSource Payment Gateway
  • 13.
    Solution Details –Heroku Why we chose Heroku ▪ Customer facing application functionality • Java gives us more flexibility for pure custom solution. • Customer facing sites do not need full Salesforce capabilities and would be cost prohibitive for user licensing. ▪ Integration • Real-time processing on Heroku vs. scheduled jobs in Force.com. ▪ Service options • Availability of more ready-to-go functionality via add-ons ▪ Scalability • Start small and add dynos as the application grows
  • 14.
    Team store andfundraising site ▪ School specific branding, style, and content ▪ Hundreds of school sites rendered via single set of CSS and HTML templates
  • 15.
    Custom fundraising e-commercesolution ▪ Full cart and checkout e-Commerce functionality ▪ Adobe Scene 7 renders dynamic product images ▪ Social links allow shoppers to share items ▪ Custom Heroku authentication for customers
  • 16.
    Heroku Application Structure ▪Java / Spring MVC core ▪ Add-on services ▪ Cloudant storage ▪ Memcachier caching ▪ SendGrid email service ▪ CloudAMQP Message Queueing ▪ Adobe Scene 7 dynamic image creation ▪ S3 static asset hosting ▪ New Relic monitoring
  • 17.
    Heroku architecture constraints ▪Web dynos must respond in 30 seconds or less ▪ Dynos must start up in 60 seconds or less ▪ Heap size ▪ 1x dynos get 512 MB, 2x dynos get 1024MB ▪ No session state ▪ Need persistence solution such as Cloudant ▪ No web server or filesystem ▪ S3 or similar solution for static assets (CSS, javascript, images, etc.)
  • 18.
    Heroku – Bestpractices and lessons learned ▪ Caching strategy ▪ Frequently accessed pages pre-generated and cached for fast web dyno response ▪ Two level cache for header, footer, catalog and product HTML components ▪ Memcache provides fast primary lookup ▪ If item not present in memcache, retrieve from Cloudant if not dirty ▪ If dirty, request regeneration of HTML component ▪ Product and account information also cached in this manner ▪ Long running processes ▪ Use worker dynos, message queues and AJAX calls to check status on web pages ▪ Page generation, order completion
  • 19.
    Heroku – Bestpractices and lessons learned ▪ Also use worker dynos for batch processing ▪ Integration worker to update Salesforce from AS/400 ERP ▪ Batch job to re-generate dirty HTML page components in the background ▪ Cloudant for session persistence ▪ Take advantage of add-on services to reduce implementation time ▪ No need to rebuild functionality ▪ Use developer level services for prototyping and development ▪ Throughput and scaling ▪ Java web dynos support multithreading – use this to boost your throughput
  • 20.
    For more information… ▪Heroku Dev Center • https://devcenter.heroku.com • Heroku is free to try and develop on – sign up for an account at http://www.heroku.com ▪ Salesforce REST API • http://www.salesforce.com/us/developer/docs/api_rest/ ▪ Developer.force.com • http://developer.force.com/ ▪ Trifecta Technologies • http://www.trifecta.com
  • 21.
    Scott Geosits Salesforce.com SolutionsArchitect and Team Lead, @scottgeosits
  • 22.
    Visit Us atBooth #1207 Moscone Center Expo North or Online at www.trifecta.com!