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
Last updated
npm install @questlabs/react-native-sdkimport { QuestProvider } from '@questlabs/react-sdk';import { useCrossSelling, CrossSelling } from "@questlabs/react-native-sdk";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;
};
}
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>
);
}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;