Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Conversational Commerce and Magento 2: Breaking new ground with Facebook, Alexa, and Slack

1,221 views

Published on

In this presentation given at ZendCon 2016 I detail the approach to building worthwhile conversational commerce experiences for Alexa and Facebook Messenger on Magento 2.

Published in: Technology
  • D0WNL0AD FULL ▶ ▶ ▶ ▶ http://1lite.top/nDHmm ◀ ◀ ◀ ◀
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • My brother found Custom Writing Service ⇒ www.HelpWriting.net ⇐ and ordered a couple of works. Their customer service is outstanding, never left a query unanswered.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • I just discovered this and suggest you see this immediately. There are over 16,000 woodworking plans that comes with step-by-step instructions and detailed photos 》》》 https://url.cn/ktFCrsHZ
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • D0WNL0AD FULL ▶ ▶ ▶ ▶ http://1lite.top/nDHmm ◀ ◀ ◀ ◀
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Conversational Commerce and Magento 2: Breaking new ground with Facebook, Alexa, and Slack

  1. 1. Conversational Commerce and Magento 2 Breaking new ground with Alexa, Facebook and Slack Conversational Commerce: Magento, Facebook and Alexa | October 2016 1
  2. 2. @philwinkle github.com/philwinkle Conversational Commerce: Magento, Facebook and Alexa | October 2016 2
  3. 3. @magetalk Conversational Commerce: Magento, Facebook and Alexa | October 2016 3
  4. 4. Conversational Commerce: Magento, Facebook and Alexa | October 2016 4
  5. 5. somethingdigital.com/careers Conversational Commerce: Magento, Facebook and Alexa | October 2016 5
  6. 6. What is Conversational Commerce? (C12L) Conversational Commerce: Magento, Facebook and Alexa | October 2016 6
  7. 7. What is it not? C12L is not about shopping online in a chat bot. It is about creating opportunities to engage with customers in an asynchronous way Conversational Commerce: Magento, Facebook and Alexa | October 2016 7
  8. 8. So then what is Conversational Commerce? — Conversational, when done well, is assistive — It is engaging — It is helpful — It creates value Conversational Commerce: Magento, Facebook and Alexa | October 2016 8
  9. 9. C12L Commerce This is not a new concept. "Bots" have been around for ages. What is new is that we can now interact with them outside of our traditional desktop computer contexts. Conversational Commerce: Magento, Facebook and Alexa | October 2016 9
  10. 10. We shouldn't be repurposing APIs for every medium. Each medium excels in its own particular niche given its audience. Conversational Commerce: Magento, Facebook and Alexa | October 2016 10
  11. 11. — Not for all contexts — Alexa: Store Insights / Administration — Slack: Developer Support — Facebook: Consumer Conversational Commerce: Magento, Facebook and Alexa | October 2016 11
  12. 12. Why not Alexa for purchasing on Magento? — API could be used, so it's possible — Purchase decisions are hard — Predciated on choice — Search and browse is impossible via spoken word — Write one API, use it many places... Conversational Commerce: Magento, Facebook and Alexa | October 2016 12
  13. 13. Why would we want this? — We're moving away from Visual UI — Spoken word is the fastest way to communicate (send) — Written text is the fastest way to consume Conversational Commerce: Magento, Facebook and Alexa | October 2016 13
  14. 14. We're becoming increasingly distracted Conversational Commerce: Magento, Facebook and Alexa | October 2016 14
  15. 15. What kind of change does this mean for businesses? — Change of jobs and expertise — Fewer creative arts, more communications — Call trees replaced by chat trees — Asynchronous, on your time === 24/7 Conversational Commerce: Magento, Facebook and Alexa | October 2016 15
  16. 16. Obvious commerce applications — Beyond the purchase: — Status, update, cancel, replacement — Reorder — 1-click, ephemeral Conversational Commerce: Magento, Facebook and Alexa | October 2016 16
  17. 17. Challenges Conversational Commerce: Magento, Facebook and Alexa | October 2016 17
  18. 18. Challenges — Fragmented APIs mean lots of boilerplate code to interact with your store capabilities — For Magento this is likely REST API — Different UIs mean different skillsets Conversational Commerce: Magento, Facebook and Alexa | October 2016 18
  19. 19. Technologies Conversational Commerce: Magento, Facebook and Alexa | October 2016 19
  20. 20. — Alexa — Facebook — Slack Conversational Commerce: Magento, Facebook and Alexa | October 2016 20
  21. 21. Alexa Upside: — Robust API — Geared toward commerce (future) — Rapid dev — 3rd party consumer — FREE (Raspberry Pi) — BYOL(anguage) Conversational Commerce: Magento, Facebook and Alexa | October 2016 21
  22. 22. Alexa (cont.) Downside: — Physical devices (right now) — Lower adoption with dependence on physical devices Conversational Commerce: Magento, Facebook and Alexa | October 2016 22
  23. 23. Thankfully — Serverless.js — Alexa App on Node.js Conversational Commerce: Magento, Facebook and Alexa | October 2016 23
  24. 24. Developer boilerplate without Alexa App: exports.handler = (event, context, callback) => { try { console.log(`event.session.application.applicationId=${event.session.application.applicationId}`); /** * Uncomment this if statement and populate with your skill's application ID to * prevent someone else from configuring a skill that sends requests to this function. */ /* if (event.session.application.applicationId !== 'amzn1.echo-sdk-ams.app.[unique-value-here]') { callback('Invalid Application ID'); } */ if (event.session.new) { onSessionStarted({ requestId: event.request.requestId }, event.session); } if (event.request.type === 'LaunchRequest') { onLaunch(event.request, event.session, (sessionAttributes, speechletResponse) => { callback(null, buildResponse(sessionAttributes, speechletResponse)); }); } else if (event.request.type === 'IntentRequest') { onIntent(event.request, event.session, (sessionAttributes, speechletResponse) => { callback(null, buildResponse(sessionAttributes, speechletResponse)); }); } else if (event.request.type === 'SessionEndedRequest') { onSessionEnded(event.request, event.session); callback(); } } catch (err) { callback(err); } }; Conversational Commerce: Magento, Facebook and Alexa | October 2016 24
  25. 25. With Alexa App: 'use strict'; var rp = require('request-promise'); var alexa = require('alexa-app'); var app = new alexa.app('sample'); var options = require('config'); app.intent('SalesVolumeIntent', function(request, response) { options.uri = 'http://c12l.philwinkle.com/index.php/rest/V1/admin/sales/totals/today'; rp(options) .then(function (res) { response.say("Your sales for today are currently " + res.grand_total + " dollars"); response.send(); }); return false; }); exports.handler = app.lambda(); Conversational Commerce: Magento, Facebook and Alexa | October 2016 25
  26. 26. Siri Upside: — Billions of devices (literally) — Soon in our ears (thanks Airpods) Downside: — Swift / App dev focus Conversational Commerce: Magento, Facebook and Alexa | October 2016 26
  27. 27. Implementation details Conversational Commerce: Magento, Facebook and Alexa | October 2016 27
  28. 28. Alexa Taxonomony Conversational Commerce: Magento, Facebook and Alexa | October 2016 28
  29. 29. Utterances Utterances is the phrase that maps to an intent to process a request CheckStoreOnline is my store online CheckStoreOnline are you online CheckStoreOnline if it is online CheckStoreOnline status CheckStoreOnline current status Conversational Commerce: Magento, Facebook and Alexa | October 2016 29
  30. 30. Intents and Slots An intent allows you to map a phrase or phrases to a static function CheckStockLevel how many {item} are in stock CheckStockLevel how many {color} {item} are in stock CheckStockLevel how many {item} do I have CheckStockLevel how many {color} {item} do I have CheckStockLevel what is the stock level of {item} CheckStockLevel what is the stock level of {color} {item} Conversational Commerce: Magento, Facebook and Alexa | October 2016 30
  31. 31. Skill A skill is a group of utterances which represent common functionality. Essentially, an "app", for Alexa. Conversational Commerce: Magento, Facebook and Alexa | October 2016 31
  32. 32. Conversational Commerce: Magento, Facebook and Alexa | October 2016 32
  33. 33. Serverless = Stateless Because Alexa runs Lambda functions it is inherently stateless. State can be stored either - as a long-running session with multi-step question and answer workflows - stored in DynamoDb for later retrieval Conversational Commerce: Magento, Facebook and Alexa | October 2016 33
  34. 34. Conversational Commerce: Magento, Facebook and Alexa | October 2016 34
  35. 35. Magento 2 REST APIs Conversational Commerce: Magento, Facebook and Alexa | October 2016 35
  36. 36. Interesting endpoints to consume for logged-in customers: Quote REST API: GET /V1/carts/mine GET /V1/carts/mine/items GET /V1/carts/mine/payment-methods GET /V1/carts/mine/selected-payment-method GET /V1/carts/mine/shipping-methods GET /V1/carts/mine/totals Conversational Commerce: Magento, Facebook and Alexa | October 2016 36
  37. 37. Use tokens for customer- authenticated REST Conversational Commerce: Magento, Facebook and Alexa | October 2016 37
  38. 38. Generate a token: /rest/V1/integration/customer/token Conversational Commerce: Magento, Facebook and Alexa | October 2016 38
  39. 39. Example: curl -X "POST" "http://c12l.philwinkle.com/index.php/rest/V1/integration/customer/token" -H "Content-Type: application/json" -d $'{"username":"philwinkle@gmail.com", "password":"asdf;lkj1234"} ' Conversational Commerce: Magento, Facebook and Alexa | October 2016 39
  40. 40. Get cart totals: curl -X "GET" "http://c12l.philwinkle.com/index.php/rest/V1/carts/mine" -H "Authorization: Bearer 3g43lph2w0lcfh6719ltaa0fiml6sma1" -H "Content-Type: application/json" Conversational Commerce: Magento, Facebook and Alexa | October 2016 40
  41. 41. Things that help — Having an Alexa Device — https://echosim.io/ — Testing tools in AWS Lambda Available — Testing tools in Developer Portal — Paw / REST testing tool Conversational Commerce: Magento, Facebook and Alexa | October 2016 41
  42. 42. Facebook Messenger Conversational Commerce: Magento, Facebook and Alexa | October 2016 42
  43. 43. Messenger Messenger's approach is vastly different and is essentially the same experience as creating a Conversational Commerce: Magento, Facebook and Alexa | October 2016 43
  44. 44. Upsides — Fit for commerce — Cards — Long interactions — Initiate / Push — Customer Matching (phone #) — Can use any language — XMPP should be familiar Conversational Commerce: Magento, Facebook and Alexa | October 2016 44
  45. 45. Downsides — XMPP is limiting, requires persistence — We emulate more human-like qualities via text so we have to fake interactions and pauses Conversational Commerce: Magento, Facebook and Alexa | October 2016 45
  46. 46. Top 3 tips to creating engaging bot experiences1 1. Don't be dense 2. Have a vibe 3. Speak, don't print 1 GARY LEVITT, YOLA; VENTUREBEAT SEPTEMBER 2016 Conversational Commerce: Magento, Facebook and Alexa | October 2016 46
  47. 47. 1. Don't be dense Bad: Me: help. Bot: I can help by answering simple questions about how Chatbot works. I’m just a bot, though! If you need more help, try our Help Center for loads of useful information about Chatbot... ``` Conversational Commerce: Magento, Facebook and Alexa | October 2016 47
  48. 48. 1. Don't be dense Better Me: help. Bot: Help is here, Gary! Bot is typing… Bot: Ask me a simple question. Me: how to I blah blah blah? Conversational Commerce: Magento, Facebook and Alexa | October 2016 48
  49. 49. Don't be dense 1. Constructing a concise chronological narrative helps reduce denseness. When content is in little chunks, it’s easier to process. 2. When your chatbot provides the right forms and buttons at the right time, it can outperform its visual interface counterpart. 3. Combining concepts or distinct sets of details in one response causes mental static, and should be Conversational Commerce: Magento, Facebook and Alexa | October 2016 49
  50. 50. 2. Have a Vibe Conversational Commerce: Magento, Facebook and Alexa | October 2016 50
  51. 51. Have a Vibe 1. Break up your communication into parts based on their functions: actions, greetings, goodbyes, thankyous, updates, loading, processing, intros, descriptions, notifications, etc. 2. Pick one or two parts and — while keeping all other parts neutral, concise, and direct — make that part a little zesty or animated. Conversational Commerce: Magento, Facebook and Alexa | October 2016 51
  52. 52. 3. Speak, don’t print In short, emulate typing and build in pauses. You can split-test engagement based on pause time for a more data-centric approach. Conversational Commerce: Magento, Facebook and Alexa | October 2016 52
  53. 53. Messenger Differentiators Conversational Commerce: Magento, Facebook and Alexa | October 2016 53
  54. 54. Messenger Differentiators The key differentiators for Messenger are: — A robust interaction platform: — Card types — Media — Video — Interaction Conversational Commerce: Magento, Facebook and Alexa | October 2016 54
  55. 55. Downsides — No discernment of "intent" like in Alexa — Developer left to parse intent from AI human language engine Conversational Commerce: Magento, Facebook and Alexa | October 2016 55
  56. 56. Intent generation Conversational Commerce: Magento, Facebook and Alexa | October 2016 56
  57. 57. Welcome screen Conversational Commerce: Magento, Facebook and Alexa | October 2016 57
  58. 58. Rich cards Conversational Commerce: Magento, Facebook and Alexa | October 2016 58
  59. 59. Prompt / Push Conversational Commerce: Magento, Facebook and Alexa | October 2016 59
  60. 60. Push a message Your package has shipped curl -X POST -H "Content-Type: application/json" -d '{ "recipient":{ "id":"USER_ID" }, "message":{ "text":"hello, world!" } }' "https://graph.facebook.com/v2.6/me/messages?access_token=PAGE_ACCESS_TOKEN" Conversational Commerce: Magento, Facebook and Alexa | October 2016 60
  61. 61. Q&A Conversational Commerce: Magento, Facebook and Alexa | October 2016 61
  62. 62. Thank you! Conversational Commerce: Magento, Facebook and Alexa | October 2016 62

×