Download - Introduction to Building E-Commerce Solutions on Heroku and Salesforce

Transcript
Page 1: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

Introduction to Building E-Commerce Solutions on Heroku and Salesforce

Scott Geosits, Trifecta Technologies Inc., Salesforce.com Solutions Architect and Team Lead@scottgeosits

Page 2: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

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

Page 3: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

Who is Varsity? We are cheerleading!!!

Leading provider of apparel and accessories to cheer and dance teams across North America

Page 4: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

The Varsity Colors business storyBusiness Need: •Create fully branded online fundraising stores on demand for school teams•Leverage existing Salesforce implementation•Quick and simple setup and configuration for users

Page 5: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

Solution overview

Microsite Admin

heroku add-ons

Team Store Microsites

Environment Configuration

Worker Services

heroku add-ons

Microsite Configuration

Product Catalog

database.com

Adobe Scene7

Varsity Legacy Platform -AS400 iSeries ERP-Order Management System-CyberSource Payment Gateway

Integration Tier- A

S400 iSeries ERP

- Adobe Scene 7

- CyberSource Payment Gateway

- S3 Static Web Resources

Page 6: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

Solution overview – Force.com

Microsite Configuration

Product Catalog

database.com

Adobe Scene7

Page 7: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

Solution Details – Force.comWhy 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

Page 8: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

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

Page 9: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

Force.com – Product catalog and store maintenance

Page 10: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

Force.com – Order capture and dashboards▪ Orders captured in both Salesforce and ERP▪ Dashboards provide easy visibility to sales totals

Page 11: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

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

Page 12: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

Solution overview – Heroku

Microsite Admin

heroku add-ons

Team Store Microsites

Environment Configuration

Worker Services

heroku add-ons

Adobe Scene7

Varsity Legacy Platform -AS400 iSeries ERP-Order Management System-CyberSource Payment Gateway

Integration Tier- A

S400 iSeries ERP

- Adobe Scene 7

- CyberSource Payment Gateway

- S3 Static Web Resources

Page 13: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

Solution Details – HerokuWhy 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

Page 14: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

Team store and fundraising site▪ School specific branding, style, and content▪ Hundreds of school sites rendered via single set of CSS and HTML templates

Page 15: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

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

Page 16: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

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

Page 17: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

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.)

Page 18: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

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

Page 19: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

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

Page 21: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

Scott Geosits

Salesforce.com Solutions Architect and Team Lead,@scottgeosits

Page 22: Introduction to Building E-Commerce Solutions on Heroku and Salesforce

Visit Us at Booth #1207 Moscone Center Expo North or Online at www.trifecta.com!