Cross-Selling
Boost revenue and enhance user satisfaction with our automated upselling. Tailored suggestions for additional services or products are seamlessly offered based on individual product usage, optimizing
Components Visuals

Installation
To install the Quest react-native-sdk
into your project, follow these steps:
Open your terminal/command prompt.
Navigate to your project's root directory using the
cd
command if you're not already there.Run the following command to install the
quest-sdk
package using npm:
npm install @questlabs/react-native-sdk
This command will download and install the package and its dependencies into your project.
Usage
Root Component
Import the QuestProvider Component: Import the
QuestProvider
component from the@questlabs/react-sdk
package.
import { QuestProvider } from '@questlabs/react-sdk';
Pass the Required Props: Pass the required props to the
QuestProvider
. The required props areapiKey
,entityId,
authenticationToken
andfontFamily.
Component Usage
To integrate the CrossSelling
component into your React native application, follow these steps.
Import useCrossSelling Hook: Import the useCrossSelling component from the
@questlabs/react-sdk
package.Import the CrossSelling Component: Import the
CrossSelling
component from the@questlabs/react-sdk
package.Pass the Required Props: Pass the required props to the
useCrossSelling
. The required props arequestId
,questUserId
, anduserToken
or if user don't have quest User id then they can pass own userId to get questUserId and Token.
import { useCrossSelling, CrossSelling } from "@questlabs/react-native-sdk";
Props of CrossSelling Component
The CrossSelling component accepts the following props
heading
string
Optional
Component heading
expiryDate
string | number | Date
Require
Provide the Date "Y-M-D"
claimRewardHandler
Function (email?: string)
optional
Create the function for submit
onClose
Function
optional
Create the function for on Close
isEmail
boolean
optional
Want ot show email
showFooter
boolean
optional
Want to show footer.
description
string
optional
Modal Description Text.
shareButtonText
string
optional
Button Text.
primaryHeading
string
optional
Component Header Text
primaryDescription
string
optional
Component Description.
styleConfig
Object
optional
An object containing Styling properties for styling various components within the get started process, including form, topbar, headings, descriptions, and buttons.
Style Prop
styleConfig {
BackgroundWrapper?: ViewStyle;
Description?: TextStyle;
Footer?: {
FooterStyle?: ViewStyle;
FooterText?: TextStyle;
FooterIcon?: TextStyle;
};
Form?: ViewStyle;
Heading?: TextStyle;
PrimaryButton?: ViewStyle;
SecondaryButton?: ViewStyle;
Timer?: {
backgroundColor?: string;
primaryColor?: string;
secondaryColor?: string;
};
}
Example Usage
App.js
import { SafeAreaView, StyleSheet, StatusBar } from "react-native";
import React, { useState } from "react";
import { QuestProvider } from "@questlabs/react-native-sdk";
import DemoComponent from "./DemoComponent";
export default function App() {
return (
<SafeAreaView style={styles.container}>
<StatusBar />
<QuestProvider
apiKey="Your-Api-Key"
apiSecret="Your-Api-Secret"
entityId="Your-Api-entityId"
authenticationToken="Your-authentication-token"
fontFamily= "Your-Font-FamFamily"
>
<DemoComponent />
</QuestProvider>
</SafeAreaView>
);
}
DemoComponent.tsx
import React from "react";
import { CrossSelling, useCrossSelling} from "@questlabs/react-native-sdk";
const DemoComponent = () => {
//const crossSelling = useCrossSelling({
// questId: "Your-Quest_ID" ,
// userId:"5235trfet365try67ywry5"
// })
const crossSelling = useCrossSelling({
questId: "Your-Quest_ID" ,
questUserId: "Your-user-id",
questToken: "Your-Token-id"
});
return (
<>
<CrossSelling
claimRewardHandler={(email) => console.log(email)}
heading={"50% off on limited products"}
description={"bla bla blka bal"}
primaryDescription={"hello thasfgaib"}
primaryHeading={"mast cize hai"}
expiryDate={"2024-07-17"}
// expiryDate={expiryDate}
isEmail={true}
showFooter={true}
styleConfig={{
BackgroundWrapper: { backgroundColor: "red" },
Description: { color: "yellow" },
Footer: {
FooterIcon: { color: "red" },
FooterStyle: { backgroundColor: "orange" },
FooterText: { color: "red" }
},
Form: {
backgroundColor: "gray"
},
Heading: { color: "blue" },
PrimaryButton: { backgroundColor: "red" },
SecondaryButton: { backgroundColor: "yellow" },
Timer: {
backgroundColor: "white",
primaryColor: "red",
secondaryColor: "blue"
}
}}
/>
</>
);
};
export default DemoComponent;
Demo
Last updated