matcha-react-lib v2.1.0
Matcha React lib
Usage
- Install:
$ npm install -S matcha-react-lib
- Use in your React project:
import { MatchaAdvisor } from "matcha-react-lib"
const MyMatchaAdvisor = () => <MatchaAdvisor clientId="my-client-id" />
export default MyMatchaAdvisor
- 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).
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago