Documentation - Khoros Flow
  • Getting started
  • Triggers & Replies
  • Actions
  • Integrations
  • Guides
  • API

›Code How To​s

Guides

  • Overview
  • Learn

    • Beginner guide
    • Advanced guide

    Design How To​s

    • How to use timers
    • How to integrate with Zapier
    • How to increase web widget engagement
    • How to use Conditions
    • How to set parameters using buttons
    • How to send conversational reviews
    • Count sessions per Channel or Widget
    • How to use entities instead of multiple intents
    • How to handle multiple inbound messages
    • How to branch your chatbot
    • How to capture user input
    • How to change the language of your bot
    • How to clear the Flow web widget
    • How to create an Arabic speaking bot
    • How to create and manage multiple chatbots
    • How to create buttons
    • How to duplicate flows
    • How to export and duplicate a project
    • How to handle unknown input
    • How to use string templates
    • How to jump to the middle of a flow
    • How to loop flows
    • How to re-use intents
    • How to reset your password
    • How to schedule and broadcast chatbot messages
    • How to structure flows
    • How to use Business Hours
    • How to use carousels
    • How to use data to create context
    • How to use Quick Replies
    • How to pause a bot
    • How to send and receive files or attachments
    • How to deal with unexpected input
    • How to gather user feedback
    • How to track links
    • How to use WhatsApp click to chat links
    • How to accept payments
    • How to deflect calls to WhatsApp
    • How to delay replies
    • How to engage with customers using SMS
    • How to import contacts
    • How to test your WhatsApp chatbot
    • How to use Messenger m.me links
    • How to do multi-channel design

    Code How To​s

    • Code actions best practices
    • How to trigger channel specific flows
    • How to use math in a bot
    • How to create a location-aware bot
    • Create Parameters with Cloud Code Actions
    • How to use quick replies in code actions
    • How to add a delayed opening to the web widget
    • How to build a chatbot quiz for WhatsApp
    • How to catch API errors within Code actions
    • How to verify user input
    • How to check if an object property is undefined
    • How to create a dynamic opening based on the part of t…
    • How to create a Dynamic URL
    • How to create a Webview
    • Handle images in 3 steps
    • How to retrieve data from a database
    • How to connect with an external database
    • How to route back to the last flow
    • How to route your chatbot based on numeric input
    • How to send a confirmation email
    • How to send chatbot data to a database
    • How to send emails to multiple recipients
    • How to create Google maps images
    • How to use QR codes
    • How to use Javascript Comments in actions
    • How to send emails
    • How to store Parameters
    • How to capture and validate an address
    • How to find your Organization ID
    • How to work with dates
    • How to integrate with Wordpress
    • How to check if the user is on mobile or desktop
    • How to trigger bot events based on the page
    • How to combine functions in Javascript
    • How to set profile attributes

    Handover How To​s

    • Fallback
    • Chatbot Handoff How to nail the bot to human handoff
    • How to pause and resume a bot in Front
    • How to Enable or Disable Push Notification
    • How to hand over to a human agent
    • Send text versus trigger event
    • How to setup handoff with Front
    • THow to trigger flows inside Front

    Other

    • Audience
    • Projects
    • Analytics
    • Data retention

How to send a confirmation of receipt by email

Confirm a received message by email to your user

In some cases you might want to send an email to your customer of confirmation of receipt by email. A common example is when your chatbot creates a ticket in a CRM tool like Salesforce, Zendesk or Hubspot and you confirm that the ticket is received by email.

In this guide we show you how to:

  1. Check if we have the customers email address
  2. If not, ask and extract the email address
  3. If the customer doesn't provide a valid email address, ask again
  4. Send confirmation of receipt by email to the customer

1. Check if we have the customers email address

The first step is to check if we have the customers email address. We can do that by using the Condition trigger. Drag and drop it onto your canvas. The branch that you see will behave as an if/else statement.

If param email exists continue with the first branch, else, follow up with the second branch. For more info regarding conditions, have a look here.

Conditions chatbot

2. If not, ask and extract the email address

Let's say we don't have the customers' email address yet and the bot will continue with the second branch. That is the moment to ask and extract the email address. We do that by using the Any Text trigger. In this example, the name of the parameter is "email". In the right pane, you can select that this parameter should be an email address.

Conditions chatbot

3. If the customer doesn't provide a valid email address, ask again

Drag and drop a second any text next to Any text that should be an email. This parameter will be filled whenever the user input is not a valid email address. From there on we can loop back to the event on top.

Tip: provide an option to head back to a menu or intro to prevent customers from being stuck the flow.

Loop for email

4. Send confirmation of receipt by email to the customer

Now, we've received the customer's e-mail address and we can use an Action to send an e-mail from the Flow.ai Platform (supported at Pro and Enterprise Plans).

Loop for email

Drag and drop an Action onto your canvas. You can copy and paste the code below as an example.

async payload => {
  
  let emailadres = "-"
  
  if(Array.isArray(payload.params.email)) {
    emailadres = payload.params.email[0].value
  }
  
  //console.log(emailadres)

  toolbelt.email({
    to: emailadres,
    subject: 'Hello from Flow.ai', 
    message: `Hi and thank you for your message. Someone from flow.ai will get back to you as soon as possible. - Flow.ai Team`
  })
  
}

You can verify the process by using the try it out. You should receive an email in your inbox.

Email confirmation chatbot
← How to route your chatbot based on numeric inputHow to send chatbot data to a database →
  • 1. Check if we have the customers email address
  • 2. If not, ask and extract the email address
  • 3. If the customer doesn't provide a valid email address, ask again
  • 4. Send confirmation of receipt by email to the customer
Docs
Getting StartedBasic conceptsGuides
Platform
StatusSlack community
Resources
Blog
Copyright © 2021 Khoros Flow