This block allows users to share their live location or the address of a specific place. For instance, a customer can provide their address on an online shopping website to ensure their order is shipped to the correct location. This feature streamlines the process of entering shipping details, making it easier for users to share their address for deliveries.
Why use the location block?
This block ensures that the user's input is validated as a proper address. Users have two options for sharing their location with the bot, which are:
Two ways of sharing the address:
Users can view their live location on the map and simply drop a pin to indicate their address. This method is quick and convenient, especially when the exact location is not easily describable or when users prefer not to type out their address.
Users can manually enter their address details if they prefer or if the pin-drop method is not precise enough. This allows for greater accuracy and is useful in cases where users need to specify additional address information, such as apartment numbers or specific instructions.
Steps to create a location block
1. To add the Location block to the flow, click on the add block icon (+)
2. Choose Location under the Question Cards section.
If you try to close the block listing without saving the location block, all the unsaved changes will be lost permanently.
3. Add the Question in the question field.
4. Add a unique name for your block in the Block name field.
5. Input variable will auto-populate according to the added block name; you can change it if needed.
If you enter the name of an existing block for another block, the below error will be displayed.
6. Adjust the existing Validation Error Message to fit the context of your text block.
7 .Click on the Preview block option to see how the block would be displayed to the user.
8. If you are satisfied with the output, click Save.
- If this block is not mandatory for your user to answer, toggle 'on' the option to Skip Block. This option is not available for flows of WhatsApp, Telegram, and Facebook Messenger channels.
- If you want to keep this block as the end of your conversational flow, toggle 'on' the End block option.
Editing the location block
You can edit a location block whenever required, even after the flow is published or in the drafts section, by following these steps:
1. Open the flow and click on Edit.
5. Click Save.
6. Publish the flow.
Copy a location block
The Copy Block option can be used when you need to reuse a block that you previously created. You can copy that block and add it to your flow as it is or edit it according to your needs.
1. Click on the Location Block block you wish to copy.
2. Choose the Copy Block option; the block will be pasted on the clipboard.
3. When you require to paste that block, click the Add block icon (+).
The pasted block would appear on the block listing section and be stated as From Clipboard. 4. Edit the block if required or simply click Paste.
- The copied location block can be pasted multiple times. If you no longer need to paste it, you can clear the clipboard by clicking the close icon corresponding to the clipboard option.
- When copying an existing location block, all of its content, including any variables, will be copied as is. You can edit it as needed before adding it to the flow. Since the names of each block must be unique, the word '_copy' will be added to the copied blocks automatically; this can be changed if required.
- If you have copied a block and it is in the clipboard, deleting the copied block later will also remove it from the clipboard.
Deleting the location block
1. Open the flow and click on Edit.
2. Click on the Location Block, which you may have named differently.
3. Select Delete Block from the displayed options.
4. Confirm deleting the selected block by clicking on Yes, Delete it.
Use case
From the online store Zylker Electronics, a customer purchases a phone case. They added the address where they wanted the product to reach them. The order was delivered to the given address.
Examples of the location blocks in a flow
Sharing delivery address
User has to share their address with an online electronics to receive the product they ordered online.
Bot prompt: Please share your address to ship your package.
Input given in the builder: