matcha-react-lib

2.1.0 • Public • Published

Matcha React lib

Usage

  1. Install: $ npm install -S matcha-react-lib
  2. Use in your React project:
import { MatchaAdvisor } from "matcha-react-lib"

const MyMatchaAdvisor = () => <MatchaAdvisor clientId="my-client-id" />
export default MyMatchaAdvisor
  1. Configure it:
  • Mandatory parameters:

    • clientId : Your Matcha webchat token. It is different from API identifiers.
  • Optional parameters:

    • newTab : Boolean (default false). By default, when the user clicks on a wine, the chatbot opens the wine page in the same tab. To open in a new tab, enable this property, without value: <script [...] newTab></script>

    • userId : String. An identifier to track your users in conversation logs. This can be the id of your logged users, or an identifier of origin (campaigns, analytics, etc...).

    • shopId : String. If you have several stores and have entered the sku information, shopId filters the chatbot selection on a specific store.

    • onPurchase : Function. This integration is strongly recommended. Sends the purchase action to your website kart via the Matcha purchase API (see this documentation to implement it).

Readme

Keywords

none

Package Sidebar

Install

npm i matcha-react-lib

Weekly Downloads

1

Version

2.1.0

License

none

Unpacked Size

6.5 kB

Total Files

8

Last publish

Collaborators

  • diesirae