This feature may not be available in the Basic plan. To learn more, please contact your Mavenoid representative.
Similar to adding the assistant to your website, you can add the assistant to your mobile app. This allows users of your app to seamlessly benefit from features such as self-service troubleshooting and live support without needing to switch to a separate web browser app.
Note that this does still require the user to have a working Internet connection.
How it works
The assistant can be added to a web page by including a
<script> tag. By updating your app to open a webview (an in-app web browser) and display a landing page that includes the assistant's
<script> tag, the assistant can be viewed and interacted with from within your app.
You can't simply reuse the same
<script> tag, however. There are a few extra technical requirements to get the correct behavior within a mobile app. Some will need to be accounted for within your app while others will be handled within the
<script> tag provided by Mavenoid.
You will need to provide a landing page for your app's webview to access. Note that Android apps can use a local HTML file included within the app itself, while iOS apps will need to access an externally-hosted page.
This page should include only the following tags:
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
- The assistant's
<script>tag which will automatically open the assistant once the page is loaded. This will need to be provided by Mavenoid; you cannot reuse the one for adding the assistant to a normal website.
If you need to pass data from the app into the assistant, you can do so by adding it to the URL accessed by the webview. For example, if you need to pass a country code into the assistant, you can do so by having the app navigate the webview to a URL like the following:
This data will then be available within the flow and conversation transcript as form data.
Note that the fields to pass (in the above example,
country) will need to be coordinated with Mavenoid in advance so that they can be properly handled in the provided script.
Handling the close event
The app needs to be notified of the assistant's close event so that it can close the webview. Otherwise, when the user closes the assistant the webview will remain open on a blank page.
The preferred method for this is to have the app close the webview when it navigates to the special URL
close:. If necessary, a different URL can be used but will need to be coordinated with Mavenoid in advance so that it can be properly handled in the provided script. Alternately, the assistant can send a cross-frame message when closed that the assistant listens for and responds to by closing the webview; this also would need to be coordinated with Mavenoid in advance.
By default, links clicked within the webview will open within the webview. In most cases this is not the desired behavior; we recommend your app configure the webview to open links in the mobile device's default web browser app instead.