Slide 1

Slide 1 text

Building LINE Chatbot Using Dialogflow Warit Wanwithu (Tan) Developer Relations, LINE Jirawat Karanwittayakarn (Tee) Tech Evangelist, LINE Maneewan Boontamtarn (Bee) Community Manager, LINE

Slide 2

Slide 2 text

• LINE API Ecosystem • LAB: Create first LINE Chatbot • LAB: Building LINE Chatbot using Dialogflow • LAB: Chatbot prototypes using LINE Bot Designer • LAB: Introduction to LIFF Agenda

Slide 3

Slide 3 text

Why LINE API?

Slide 4

Slide 4 text

Apps Available 4.6M 30 Average no. of apps on a phone 7-9 Average no. of daily-used apps Sources: Statista & TNS 2018 APPS OVERFLOW

Slide 5

Slide 5 text

Developer Source: Nielsen HIGHEST TIME SPENT ON APP IN THAILAND average time spent on smartphone average time spent on LINE platform mins/day mins/day 216 63 LINE IN THAILAND Source: Nielsen 44M LINE users

Slide 6

Slide 6 text

LINE API ECOSYSTEM LINE LINE Messaging API LINE Notify Your Website Your Chat BOT /Service LINE Login Rich Menu Quick Reply LIFF LINE Pay LINE Beacon LINE Things

Slide 7

Slide 7 text

LINE Login LINE Login lets people easily create an account for your app or website using their LINE accounts. You can integrate LINE Login into your iOS, Android, or web app.

Slide 8

Slide 8 text

LINE Notify Get notifications from LINE Notify's official account after connecting with your preferred web services. You can receive notifications from multiple services in groups or 1-on-1 chats.

Slide 9

Slide 9 text

LINE Beacon LINE Beacon is a new service that lets you receive coupons, information about sales and special messages on LINE via the official accounts of stores outfitted with Beacons (Bluetooth transmitters).

Slide 10

Slide 10 text

LINE Things An IoT platform from LINE

Slide 11

Slide 11 text

LINE Pay Grow your business with LINE Pay. A simple and secure way to pay. LINE Pay provides secure and trustworthy service through its compliance with PCI DSS

Slide 12

Slide 12 text

LIFF WebView that allows seamless integration between CHAT and WEB

Slide 13

Slide 13 text

Developer LINE MESSAGING API

Slide 14

Slide 14 text

● Be able to send messages to 1-on-1 chat or group chats ● Push and reply messages ● The perfect message type for every occasion The Messaging API lets you develop Chatbot between your service and LINE users. What is LINE Messaging API?

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

60K Active Bots

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

Developer BUILDING A BOT

Slide 25

Slide 25 text

When a user sends your bot a message, a webhook is triggered and the LINE Platform sends a request to your webhook URL. How it works LINE APP LINE Bot Platform 1.request 4.response Your Bot 2.webhook 3.API call

Slide 26

Slide 26 text

Webhook Event Object Message event Text, Image, Video, Audio, File, Location, Sticker Follow event Bot is added or unblocked Unfollow event Bot is blocked Join event Bot joins a group or room Leave event Bot leave a group or room Member join event User joins a group or room Member leave event User leaves a group or room Postback event User performs a postback action Beacon event User enters or leaves the range Account link event User has linked his/her LINE account with a provider's service account Device link event LINE Things device has been linked with LINE by a user operation Device unlink event LINE Things device has been unlinked from LINE by a user operation

Slide 27

Slide 27 text

Developer Reply with a message to users who interacts with your bot. Requires a reply token in the request Send reply messages LINE PLATFORM 1.message /event 4.message 2.webhook 3.Reply Your Bot

Slide 28

Slide 28 text

Developer Send messages directly to users whenever you want. Send push messages Your Bot 2.message 1.Push LINE PLATFORM

Slide 29

Slide 29 text

Message Type Text Sticker Image Video Audio Location

Slide 30

Slide 30 text

Advanced Messages Types Buttons Confirm Carousel Image Carousel

Slide 31

Slide 31 text

Imagemaps

Slide 32

Slide 32 text

Flex Message Menu Flight News Ticket Payment

Slide 33

Slide 33 text

When a user receives a message that contains quick reply buttons from a bot, those buttons appear at the bottom of the chat screen. Quick Reply

Slide 34

Slide 34 text

Rich Menu Rich menu API lets you display different rich menus to different users. You can create, link, and manage your rich menus programmatically.

Slide 35

Slide 35 text

LINE Bot Designer lets you prototype LINE bots faster and easier without any programming knowledge. LINE Bot Designer

Slide 36

Slide 36 text

Get LINE user profile information of users who interact with your bot in one-on-one and group chats. Get User Profile

Slide 37

Slide 37 text

Send messages in group chats and get information about the members of the group. Join Group Chats

Slide 38

Slide 38 text

Developer LAB: BUILDING A BOT

Slide 39

Slide 39 text

Developer https://manager.line.biz

Slide 40

Slide 40 text

Developer BMI Default Fallback Intent Default Welcome Intent BMI - custom BMI - custom - no BMI - custom - yes

Slide 41

Slide 41 text

Developer

Slide 42

Slide 42 text

1. Download Bot Designer: https://developers.line.biz/en/services/bot-designer/ 2. Image: https://lin.ee/duuVtyR 3. Rich Menu Maker: https://lineforbusiness.com/richmenumaker/ Before we start

Slide 43

Slide 43 text

LINE Bot Designer Download Here:

Slide 44

Slide 44 text

Create Rich Menu with Rich Menu Maker https://lineforbusiness.com/richmenumaker/

Slide 45

Slide 45 text

Developer LINE Front-end Framework (LIFF)

Slide 46

Slide 46 text

LINE Frontend-End Framework LIFF WebView that allows seamless integration between CHAT and WEB

Slide 47

Slide 47 text

ENHANCE CHATBOT

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

COMPACT TALL FULL MULTI VIEW SIZES

Slide 50

Slide 50 text

LET’S LIFF!

Slide 51

Slide 51 text

Steps to create LIFF 1. Prepare HTML, JS and CSS 2. Import LIFF SDK 3. Using LIFF API 4. Deploy 5. Register LIFF App

Slide 52

Slide 52 text

https://github.com/line/line-liff-starter

Slide 53

Slide 53 text

Prerequisite Install node.js $ node --version $ npm install -g firebase-tools $ firebase --version

Slide 54

Slide 54 text

Firebase Hosting https://console.firebase.google.com

Slide 55

Slide 55 text

4. Deploy $ cd Desktop $ mkdir liff-demo (Create new folder in Desktop) $ cd liff-demo $ firebase login $ firebase init copy index.html, liff-starter.js, style.css to ‘public’ folder $ firebase deploy

Slide 56

Slide 56 text

https://bit.ly/2ARgfbI

Slide 57

Slide 57 text

5. Register LIFF App https://developers.line.biz/console/

Slide 58

Slide 58 text

Dialogflow

Slide 59

Slide 59 text

Developer WHAT’S NEXT?

Slide 60

Slide 60 text

FREE! Online course https://www.skooldio.com

Slide 61

Slide 61 text

fb.com/groups/linedevth Medium.com/linedevth @linedevth Follow us youtube.com/c/LINEDevelopersThailand fb.com/linedevth