@doo-inc/react-native-widget
v1.0.1
Published
React Native package to get connected with the DOO CX platform.
Downloads
77
Readme
DOO React Native Widget
A package to integrate DOO CX into your React Native mobile application for Android and iOS devices. DOO CX helps businesses automate routine tasks, optimize sales and customer service processes, and provide personalized interactions by seamlessly integrating AI with existing tools and workflows.
Installation
Run the command below in your terminal:
npm install --save @doo-inc/react-native-widget
This library depends on react-native-webview and async-storage. Please follow the instructions provided.
Usage
- Create a website channel in DOO dashboard.
- Replace
websiteToken
prop in the 'App.js' file as the following:
import React, { useState } from 'react';
import DOOWidget from '@doo-inc/react-native-widget';
// Any other imports...
const App = () => {
const [showWidget, toggleWidget] = useState(false);
const user = {
identifier: 'testing_user',
name: 'Testing User',
avatar_url: '',
email: '[email protected]',
identifier_hash: '',
};
const customAttributes = { accountId: 1, pricingPlan: 'paid', status: 'active' };
const websiteToken = 'websiteToken';
const baseUrl = 'https://cx.doo.ooo';
const locale = 'en';
const colorScheme='dark'
return (
{/* Add your view here... */}
);
};
The whole example is available in the /example
directory.
License
Copyright (C) 2024, DOO Technology Solutions. All rights reserved. This project is released under the BSD 3-Clause License.