OpenDialog Docs
opendialog.aiStart BuildingTalk to an expert
  • GETTING STARTED
    • Introduction
    • Getting ready
    • Billing and plans
    • Quick Start AI Agents
      • Quick Start AI Agent
      • The "Start from Scratch" AI Agent
        • Chat Management Conversation
        • Welcome Conversation
        • Topic Conversation
        • Global No Match Conversation
        • Supporting LLM Actions
        • Semantic Classifier: Query Classifier
      • A Process Handling AI Agent
  • STEP BY STEP GUIDES
    • AI Agent Creation Overview
    • Add a new topic of discussion
    • Use knowledge sources via RAG
    • Adding a structured conversation
    • Add a 3rd party integration
    • Test and tweak your AI Agent
    • Publish your AI Agent
  • CORE CONCEPTS
    • OpenDialog Approach
      • Designing Conversational AI Agents
    • OpenDialog Platform
      • Scenarios
        • Conversations
        • Scenes
        • Turns and intents
      • Language Services
      • OpenDialog Account Management
        • Creating and managing users
        • Deleting OpenDialog account
        • Account Security
    • OpenDialog Conversation Engine
    • Contexts and attributes
      • Contexts
      • Attributes
      • Attribute Management
      • Conditions and operators
      • Composite Attributes
  • CREATE AI APPLICATIONS
    • Designing your application
      • Conversation Design
        • Conversational Patterns
          • Introduction to conversational patterns
          • Building robust assistants
            • Contextual help
            • Restart
            • End chat
            • Contextual and Global No Match
            • Contextual FAQ
          • Openings
            • Anatomy of an opening
            • Transactional openings
            • Additional information
          • Authentication
            • Components
            • Example dialog
            • Using in OpenDialog
          • Information collection
            • Components
            • Example dialog
            • Using in OpenDialog
            • Additional information
          • Recommendations
            • Components
            • Example dialog
            • Additional information
          • Extended telling
            • Components
            • Example dialog
            • Additional information
          • Repair
            • Types of repair
            • User request not understood
            • Example dialog
            • Additional information
          • Transfer
            • Components
            • Example dialog
            • Additional information
          • Closing
            • Components
            • Example dialog
            • Using in OpenDialog
            • Additional information
        • Best practices
          • Use Case
          • Subject Matter Expertise
          • Business Goals
          • User needs
            • Primary research
            • Secondary research
            • Outcome: user profile
          • Assistant personality
          • Sample dialogs
          • Conversation structure
          • API Integration Capabilities
          • NLU modeling
          • Testing strategy
          • The team
            • What does a conversation designer do
          • Select resources
      • Message Design
        • Message editor
        • Constructing Messages
        • Message Conditions
        • Messages best practices
        • Subsequent Messages - Virtual Intents
        • Using Attributes in Messages
        • Using Markdown in messages
        • Message Types
          • Text Message
          • Image Message
          • Button Message
          • Date Picker Message
          • Audio Message
          • Form Message
          • Full Page Message
          • Conversation Handover message
          • Autocomplete Message
          • Address Autocomplete Message
          • List Message
          • Rich Message
          • Location Message
          • E-Sign Message
          • File Upload Message
          • Meta Messages
            • Progress Bar Message
          • Attribute Message
      • Webchat Interface design
        • Webchat Interface Settings
        • Webchat Controls
      • Accessibility
      • Inclusive design
    • Leveraging Generative AI
      • Language Services
        • Semantic Intent Classifier
          • OpenAI
          • Azure
          • Google Gemini
          • Output attributes
        • Retrieval Augmented Generation
        • Example-based intent classification [Deprecated]
      • Interpreters
        • Available interpreters
          • OpenDialog interpreter
          • Amazon Lex interpreter
          • Google Dialogflow
            • Google Dialogflow interpreter
            • Google Dialogflow Knowledge Base
          • OpenAI interpreter
        • Using a language service interpreter
        • Interpreter Orchestration
        • Troubleshooting interpreters
      • LLM Actions
        • OpenAI
        • Azure OpenAI
        • Output attributes
        • Using conversation history (memory) in LLM actions
        • LLM Action Analytics
    • 3rd party Integrations in your application
      • Webhook actions
      • Actions from library
        • Freshdesk Action
        • Send to Email Action
        • Set Attributes Action
      • Conversation Hand-off
        • Chatwoot
    • Previewing your application
    • Launching your application
    • Monitoring your application
    • Debugging your application
    • Translating your application
    • FAQ
    • Troubleshooting and Common Problems
  • Developing With OpenDialog
    • Integrating with OpenDialog
    • Actions
      • Webhook actions
      • LLM actions
    • WebChat
      • Chat API
      • WebChat authentication
      • User Tracking
      • Load Webchat within page Element
      • How to enable JavaScript in your browser
      • SDK
        • Methods
        • Events
        • Custom Components
    • External APIs
  • Release Notes
    • Version 3 Upgrade Guide
    • Release Notes
Powered by GitBook
On this page
  • What is a location message?
  • When to use location messages
  • How to create a location message
  • Via the custom message in Message Editor
  • How to use location messages
  • Storing, Retrieving and Displaying Location Information
  • How to construct a location message
  1. CREATE AI APPLICATIONS
  2. Designing your application
  3. Message Design
  4. Message Types

Location Message

This page describes where to use and find a location message type

PreviousRich MessageNextE-Sign Message

Last updated 9 months ago

What is a location message?

A location message is a message type that allows you to ask the user for their location. The user will then be able to open up a map and submit their location, or drag the map to whatever location they want to submit

When to use location messages

A location message is best used when you need to get the users exact location, for example when having them input their personal data such as address. It could also be used if the user is having a problem, such as a car breakdown, and needs to share where they are in order to get help.

How to create a location message

Via the custom message in Message Editor

  • Open your OpenDialog application

  • Select the Scenario that you wish to edit

  • Select Design from the left hand panel and select Messages

  • Go into the message that you want to add a message block to

  • Add a 'Custom Message' block

  • Select 'location message' from the drop down

  • Add in your own text to the fields you want to customise

  • To preview your message, go to the Preview section

XML Snippet

<location-message>
    <text>text</text>
    <callback>callback</callback>
    <attribute_name>location</attribute_name>
    <api_key>google_maps_api_key</api_key>
</location-message>

The location message type sets an attribute called <location>

If you want to use a different attribute name, this is possible you must register this attribute name via the dynamic attributes page first, before using it in the location message XML.

If you do not register this new attribute first, this will cause the message to fail and you will get a no-match in your conversation.

How to use location messages

Saving a message: Always remember to hit 'Save Message' before closing or navigating away from the edit screen.

Storing, Retrieving and Displaying Location Information

Location information is stored in an attribute of type Location. If you haven't configured a new attributes then you could use a built-in attribute called Location (which is also of type Location). Alternative you can create a new attribute and set the type to Location.

Once you've create the new attribute set that attribute name in the XML mentioned above.

Once a user has submitted some location information this is stored in an attribute of type Location. The structure of the information stored is as the example below:

user_address: {
    "formatted_address":"31 Ufford St, London SE1 8LJ, UK", 
    "postal_code":"SE1 8LJ", 
    "line_1":"31", 
    "line_2":"Ufford Street", 
    "province":"England", 
    "country":"United Kingdom", 
    "lat":51.50252510000001, 
    "lng":-0.1060668 
}

The attribute is called user_address in this case.

In order to display some of this information back to the user (for example, in order to ask them to confirm it), you can access the various fields in the following format from within a message

Ok - we have your new address as {user.new_address['formatted_address']}. 
Is this correct?

Please pay attention to how formatted_address is enclosed in single quotes and square brackets. You can access any of the components of the address in the same way.

How to construct a location message

Navigate to the and create a Custom Message. Copy the at the bottom of this page into the black box, or select location-message from the drop down, and your chat message will appear in the Preview panel.

Fill in the template with the of your particular message and when you are happy with it make sure to save your message and test it in the Test Preview chat window.

When structuring a message, you are able to use multiple different message blocks together to create the message that you are looking for. However, when it comes to ordering and structing these, there are some rules that need to be followed. To learn more about this, please head to the page for more information.

For all message types, a key element to take into consideration is Accessibility, especially for messages that include customisation with multimedia types such as buttons, images and links. For all information on accessibility within OpenDialog, please click .

Constructing Messages
here
Message Editor
XML snippet
properties
A user can click the button at the bottom to open a map
Example of the map view where a user can select their location
An example of a message when a user has submitted their location
How to create a location message in the custom message block
Creating an attribute of type attribute