@doo-inc/react-native-widget
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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: 'test@example.com',
    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... */}
  );
};
Prop Default Type Description
baseUrl - String DOO installation URL
websiteToken - String Website channel token
colorScheme light String Widget color scheme (light/dark/auto)
locale en String Locale
isModalVisible false Boolean Widget is visible or not
closeModal - Function Close event
user {} Object User information about the user like email, username and avatar_url
customAttributes {} Object Additional information about the customer

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.

Package Sidebar

Install

npm i @doo-inc/react-native-widget

Weekly Downloads

0

Version

1.0.1

License

BSD-3-Clause

Unpacked Size

14.6 kB

Total Files

12

Last publish

Collaborators

  • doo-bot