How Do I Initialize the Customer Profile in the React Native SDK (v2, Legacy)?
Show Gameball customer profile in your React Native app
Showing the Gameball widget on your mobile application is slightly different than showing it on the website. You have two options; first, if you want to design your customer interface, you will use our set of REST APIs. To know more information, you can use the Configurations API 👑.The other option as this section elaborates, is through using our react native SDK.Using the SDK, you can open the Gameball customer profile from a button in your app, programmatically when someone does something, or from a persistent button that sits over your app’s UI.When you trigger the Gameball customer profile, your customer is presented with a home screen. This is configurable inside Gameball to change how it looks and what’s presented.From there, your customer can check his progress across different Gameball programs as per your configurations.To show the Gameball customer profile that contains the customer details, customer reward campaigns, and the leaderboard use the below steps.
import {GameballWidget} from 'react-native-gameball';
and then to open the widget you need to call the showProfile function on the ref property of the widgetThe below is description of show customer profile parameters.
In certain scenarios, where you offer a product as a free reward, you might want to showcase this product within the Gameball widget along with a deep link. When customers click on the deep link, they will be seamlessly redirected to the product page within your app, where they can obtain more information and take further action. To enable this functionality, you need to follow the steps outlined below.
Create a custom Gameball widget that is based on the default widget and implemented as a ForwardRefRenderFunction.
Override the WebView’s ‘onShouldStartLoadWithRequest’ event with a customized implementation.
In this implementation, detect URLs that begin with ’://’ to identify deep links specific to your app.
Handle these deep links using the main app’s action to process and dispatch them, instead of relying on the WebView.
Register player method is used to create or update customers at Gameball. It is called when your login network call is successful.First, import Gameball SDK as follows:
import {GameballSDK} from 'react-native-gameball';
Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email or anything that uniquely identifies the customer.
The referral code of an existing customer who is referring the customer being created. This is required in the create customer request to process the referral. Check Track Referrals for more details
Custom attributes related to the customer, defined by specific key-value pairs.
Choose an Unchangeable Player Unique IDGameball user profile gets created using the playerUniqueId. It is highly recommended to have the unique ID as an identifier that would NEVER be changed. If this unique ID changes for a given customer, you risk losing all original data for that customer and hence losing their points and rewards on Gameball. Accordingly, it is NOT recommended to use the email address or the mobile number as the unique ID as both can be changed by the user at anytime.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Gameball Docs","colors":{"primary":"#FB5819","light":"#FFD800","dark":"#F5DB5B"},"logo":{"light":"https://mintcdn.com/gameball/G3Do1BW89krXAJ48/logo/light.svg?fit=max\u0026auto=format\u0026n=G3Do1BW89krXAJ48\u0026q=85\u0026s=aecb464405fc6a468704d3da3cedc5ae","dark":"https://mintcdn.com/gameball/G3Do1BW89krXAJ48/logo/dark.svg?fit=max\u0026auto=format\u0026n=G3Do1BW89krXAJ48\u0026q=85\u0026s=05dec1e7bb58ddf654926789347480f2"},"favicon":"https://mintcdn.com/gameball/DyB0l4Pe2M9HXiFz/favicon.svg?fit=max\u0026auto=format\u0026n=DyB0l4Pe2M9HXiFz\u0026q=85\u0026s=2159e3f87590969ecc17da52bd808257","api":{"playground":{"display":"interactive","proxy":true},"examples":{"languages":["curl","javascript","python","csharp","go","php","java"]}},"navbar":{"links":[{"href":"mailto:support@gameball.co","label":"Support"}],"primary":{"type":"button","label":"Sign in","href":"https://app.gameball.co/"}},"footer":{"socials":{"facebook":"https://www.facebook.com/Gameball.co","linkedin":"https://www.linkedin.com/company/gameball"}},"styling":{"eyebrows":"breadcrumbs","latex":true},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"interaction":{"drilldown":true},"navigation":{"global":{"anchors":[{"anchor":"Gameball Website","icon":"globe","href":"https://gameball.co/"},{"anchor":"Blog","icon":"newspaper","href":"https://www.gameball.co/blog"},{"anchor":"Case Studies","icon":"briefcase","href":"https://www.gameball.co/case-study"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"gameball","hasAudioNarration":false,"actualSubdomain":"gameball","customDomains":["docs.gameball.co"],"gitSource":{"type":"github","owner":"gameballers","repo":"gameball-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae331c39ee4546ca4eaa4d9","collectionId":"5ef69a2d-2110-48c4-b332-86130f29a943","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae331c39ee4546ca4eaa4d9"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae331c39ee4546ca4eaa4d9","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Product Docs","count":233},{"language":"default","tag":"Product Documentation","count":233},{"language":"default","tag":"Installation","count":130},{"language":"default","tag":"API reference","count":97},{"language":"default","tag":"API documentation","count":92},{"language":"default","tag":"Mobile Integration","count":85},{"language":"default","tag":"Technical Tutorials","count":55},{"language":"default","tag":"Rewards Campaigns","count":50},{"language":"default","tag":"Web \u0026 POS Integration","count":43},{"language":"default","tag":"Apps \u0026 Integrations","count":30}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":".nav-logo,.nav-logo img{width:auto!important;height:40px!important;max-height:40px!important}.nav-logo img{object-fit:contain!important}.security-banner{display:flex;align-items:flex-start;gap:.75rem;background:rgba(239,68,68,.25);border:1px solid rgba(239,68,68,.5);border-left:4px solid #ef4444;padding:1rem;border-radius:.5rem;margin:1rem 0}.security-banner-icon{font-size:1.25rem;color:#ef4444;flex-shrink:0;line-height:1.5}.security-banner-content{flex:1;font-size:.9375rem;line-height:1.6;color:inherit}.security-banner-content strong{font-weight:600;color:inherit}.security-banner-content code{background:rgba(239,68,68,.15);color:#dc2626;padding:.125rem .375rem;border-radius:.25rem;font-size:.875em;font-family:monospace}"}],"page":{"pagePath":"installation-guides/v2/react-native/initialize-profile","slug":"/installation-guides/v2/react-native/initialize-profile","pageMetadata":{"title":"How Do I Initialize the Customer Profile in the React Native SDK (v2, Legacy)?","sidebarTitle":"Initialize Gameball Customer Profile","description":"Show Gameball customer profile in your React Native app","href":"/installation-guides/v2/react-native/initialize-profile"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Show Gameball customer profile in your React Native app\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Showing the Gameball widget on your mobile application is slightly different than showing it on the website. You have two options; first, if you want to design your customer interface, you will use our set of REST APIs. To know more information, you can use the `,_jsx(_components.a,{href:`/api-reference/configurations/configurations`,children:`Configurations API`}),` 👑.`]}),`\n`,_jsx(_components.p,{children:`The other option as this section elaborates, is through using our react native SDK.`}),`\n`,_jsx(_components.p,{children:`Using the SDK, you can open the Gameball customer profile from a button in your app, programmatically when someone does something, or from a persistent button that sits over your app’s UI.`}),`\n`,_jsx(_components.p,{children:`When you trigger the Gameball customer profile, your customer is presented with a home screen. This is configurable inside Gameball to change how it looks and what’s presented.`}),`\n`,_jsx(_components.p,{children:`From there, your customer can check his progress across different Gameball programs as per your configurations.`}),`\n`,_jsx(_components.p,{children:`To show the Gameball customer profile that contains the customer details, customer reward campaigns, and the leaderboard use the below steps.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`GameballWidget`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'react-native-gameball'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`There are two ways to view the widget.`}),`\n`,_jsx(Heading,{level:`2`,id:`show-as-standalone-screen`,children:`Show as Standalone Screen`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`jsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`jsx`,children:_jsxs(_components.code,{language:`jsx`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`GameballWidget`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`show-as-modal`,children:`Show as Modal`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`jsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`jsx`,children:_jsxs(_components.code,{language:`jsx`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`GameballWidget`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` modal`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`/>`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`and then to open the widget you need to call the `,_jsx(_components.strong,{children:`showProfile`}),` function on the ref property of the widget`]}),`\n`,_jsx(_components.p,{children:`The below is description of show customer profile parameters.`}),`\n`,_jsx(ParamField,{body:`modal`,type:`boolean`,id:`param-modal`,children:_jsx(_components.p,{children:`Boolean value used to Indicates if you want to show the widget in modal view`})}),`\n`,_jsx(ParamField,{body:`openDetail`,type:`string`,id:`param-open-detail`,children:_jsxs(_components.p,{children:[`Specify if you want the widget to open on a specific view. `,_jsx(_components.a,{href:`/tutorials/experiences/more/widget-deep-links#id-4.-using-the-sdk-mobile-apps`,children:`See available values`})]})}),`\n`,_jsx(ParamField,{body:`hideNavigation`,type:`boolean`,id:`param-hide-navigation`,children:_jsx(_components.p,{children:`Set to true to stop widget navigation otherwise leave as null`})}),`\n`,_jsx(Heading,{level:`2`,id:`usage`,children:`Usage`}),`\n`,_jsx(Heading,{level:`3`,id:`class-component`,children:`Class component`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`View`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` style`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`flex:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`Button`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` title`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'open widget'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onPress`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` this`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`widget`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`showProfile`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`GameballWidget`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` ref`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`ref`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` this`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`widget`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ref`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` modal`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`View`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`functional-component`,children:`Functional component`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` ref`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createRef`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`View`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`Button`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` title`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Open modal\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onPress`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ref`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`current`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`showProfile`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`GameballWidget`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` modal`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` ref`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ref`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`View`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`advanced-techniques-deep-links`,children:`Advanced Techniques: Deep Links`}),`\n`,_jsx(_components.p,{children:`In certain scenarios, where you offer a product as a free reward, you might want to showcase this product within the Gameball widget along with a deep link. When customers click on the deep link, they will be seamlessly redirected to the product page within your app, where they can obtain more information and take further action. To enable this functionality, you need to follow the steps outlined below.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Create a custom Gameball widget that is based on the default widget and implemented as a ForwardRefRenderFunction.`}),`\n`,_jsxs(_components.li,{children:[`Override the WebView’s ‘onShouldStartLoadWithRequest’ event with a customized implementation.`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`In this implementation, detect URLs that begin with ’`,`://’ to identify deep links specific to your app.`]}),`\n`,_jsx(_components.li,{children:`Handle these deep links using the main app’s action to process and dispatch them, instead of relying on the WebView.`}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`register-customer`,children:`Register Customer`}),`\n`,_jsx(_components.p,{children:`Register player method is used to create or update customers at Gameball. It is called when your login network call is successful.`}),`\n`,_jsx(_components.p,{children:`First, import Gameball SDK as follows:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`GameballSDK`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'react-native-gameball'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`then`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`GameballSDK`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`registerPlayer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"playerUniqueId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{CUST_ID}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"deviceToken\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{deviceToken}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"referrerCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{referrerCode}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"playerAttributes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"displayName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{displayName}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{email}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"gender\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{gender}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"mobileNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{mobile}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"dateOfBirth\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{dateOfBirth}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"joinDate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{joinDate}\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`then`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`then`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`jsonResponse`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// on success`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Once the `,_jsx(_components.strong,{children:`APIKey`}),` and `,_jsx(_components.strong,{children:`playerUniqueId`}),` have been registered, Gameball views can be made visible to the user.`]}),`\n`,_jsx(ParamField,{body:`playerUniqueId`,type:`string`,required:true,id:`param-player-unique-id`,children:_jsx(_components.p,{children:`Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email or anything that uniquely identifies the customer.`})}),`\n`,_jsx(ParamField,{body:`email`,type:`string`,id:`param-email`,children:_jsx(_components.p,{children:`Customer’s unique Email address.`})}),`\n`,_jsx(ParamField,{body:`mobile`,type:`string`,id:`param-mobile`,children:_jsx(_components.p,{children:`Customer’s unique Mobile number.`})}),`\n`,_jsx(ParamField,{body:`deviceToken`,type:`string`,id:`param-device-token`,children:_jsx(_components.p,{children:`Token used to identify the device.`})}),`\n`,_jsx(ParamField,{body:`referrerCode`,type:`string`,id:`param-referrer-code`,children:_jsxs(_components.p,{children:[`The referral code of an existing customer who is referring the customer being created. This is required in the create customer request to process the referral. Check `,_jsx(_components.a,{href:`/installation-guides/v2/react-native/track-referrals`,children:`Track Referrals`}),` for more details`]})}),`\n`,_jsxs(ParamField,{body:`playerAttributes`,type:`object`,id:`param-player-attributes`,children:[_jsx(_components.p,{children:`Additional customer-specific attributes. Includes attributes such as the customer’s name, contact details, and purchase history.`}),_jsxs(Expandable,{title:`playerAttributes Object`,children:[_jsx(ParamField,{body:`displayName`,type:`string`,id:`param-display-name`,children:_jsx(_components.p,{children:`The display name of the customer.`})}),_jsx(ParamField,{body:`firstName`,type:`string`,id:`param-first-name`,children:_jsx(_components.p,{children:`The first name of the customer.`})}),_jsx(ParamField,{body:`lastName`,type:`string`,id:`param-last-name`,children:_jsx(_components.p,{children:`The last name of the customer.`})}),_jsx(ParamField,{body:`email`,type:`string`,id:`param-email-1`,children:_jsx(_components.p,{children:`Customer’s unique Email address.`})}),_jsx(ParamField,{body:`mobileNumber`,type:`string`,id:`param-mobile-number`,children:_jsx(_components.p,{children:`Customer’s unique Mobile number.`})}),_jsx(ParamField,{body:`gender`,type:`string`,id:`param-gender`,children:_jsx(_components.p,{children:`The gender of the customer. Use “M” for male, “F” for female, or other identifiers as needed.`})}),_jsx(ParamField,{body:`dateOfBirth`,type:`string`,id:`param-date-of-birth`,children:_jsxs(_components.p,{children:[`The customer’s date of birth in the format `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`.`]})}),_jsx(ParamField,{body:`joinDate`,type:`string`,id:`param-join-date`,children:_jsxs(_components.p,{children:[`The date the customer joined your system, in the format `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`.`]})}),_jsx(ParamField,{body:`preferredLanguage`,type:`string`,id:`param-preferred-language`,children:_jsx(_components.p,{children:`The language the customer prefers for receiving notifications.`})}),_jsx(ParamField,{body:`customAttributes`,type:`object`,id:`param-custom-attributes`,children:_jsx(_components.p,{children:`Custom attributes related to the customer, defined by specific key-value pairs.`})})]})]}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Choose an Unchangeable Player Unique ID`})}),_jsxs(_components.p,{children:[`Gameball user profile gets created using the `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`playerUniqueId`})}),`. It is highly recommended to have the unique ID as an identifier that would NEVER be changed. If this unique ID changes for a given customer, you risk losing all original data for that customer and hence losing their points and rewards on Gameball. Accordingly, it is NOT recommended to use the email address or the mobile number as the unique ID as both can be changed by the user at anytime.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next Steps`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/installation-guides/v2/react-native/track-events`,children:`Track Customer Events`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/installation-guides/v2/react-native/track-orders`,children:`Track Orders \u0026 Cashback`})}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"How Do I Initialize the Customer Profile in the React Native SDK (v2, Legacy)?","sidebarTitle":"Initialize Gameball Customer Profile","description":"Show Gameball customer profile in your React Native app","href":"/installation-guides/v2/react-native/initialize-profile"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Show as Standalone Screen","slug":"show-as-standalone-screen","depth":2,"children":[]},{"title":"Show as Modal","slug":"show-as-modal","depth":2,"children":[]},{"title":"Usage","slug":"usage","depth":2,"children":[{"title":"Class component","slug":"class-component","depth":3,"children":[]},{"title":"Functional component","slug":"functional-component","depth":3,"children":[]}]},{"title":"Advanced Techniques: Deep Links","slug":"advanced-techniques-deep-links","depth":2,"children":[]},{"title":"Register Customer","slug":"register-customer","depth":2,"children":[]},{"title":"Next Steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"gameball","siteName":"Gameball Docs","title":"How Do I Initialize the Customer Profile in the React Native SDK (v2, Legacy)? - Gameball Docs","navMaps":{"firstHrefInVersion":{"SDK v3":{"href":"/installation-guides/v3/react-native/initialize-profile","matchLevel":1},"SDK v2":{"href":"/installation-guides/v2/react-native/initialize-profile","matchLevel":0},"v4.0":{"href":"/api-reference/introduction","matchLevel":4},"v4.1":{"href":"/api-reference/introduction-v4.1","matchLevel":4}},"firstHrefInLanguage":{}},"lastModified":"2026-07-13T13:17:33.897Z","originalFileLocation":"installation-guides/v2/react-native/initialize-profile.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Show Gameball customer profile in your React Native app\">\u003cmeta data-mint-head name=\"application-name\" content=\"Gameball Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gameball/Ree8Ef_QV2s4xScJ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/gameball/Ree8Ef_QV2s4xScJ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gameball/Ree8Ef_QV2s4xScJ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/gameball/Ree8Ef_QV2s4xScJ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/gameball/Ree8Ef_QV2s4xScJ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gameball/Ree8Ef_QV2s4xScJ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gameball/Ree8Ef_QV2s4xScJ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/gameball/Ree8Ef_QV2s4xScJ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/gameball/Ree8Ef_QV2s4xScJ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"How Do I Initialize the Customer Profile in the React Native SDK (v2, Legacy)? - Gameball Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Show Gameball customer profile in your React Native app\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Gameball Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.gameball.co/installation-guides/v2/react-native/initialize-profile\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://gameball.mintlify.app/_mintlify/api/og/v2?division=React+Native\u0026amp;title=How+Do+I+Initialize+the+Customer+Profile+in+the+React+Native+SDK+%28v2%2C+Legacy%29%3F\u0026amp;description=Show+Gameball+customer+profile+in+your+React+Native+app\u0026amp;theme=4e778c65cbfcf077808b5cd6\u0026amp;signature=4ec31b9abbc6657e1c987530ea37cba8a9359fd7784c6cacbfd7f2ec0f169402\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"How Do I Initialize the Customer Profile in the React Native SDK (v2, Legacy)? - Gameball Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Show Gameball customer profile in your React Native app\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://gameball.mintlify.app/_mintlify/api/og/v2?division=React+Native\u0026amp;title=How+Do+I+Initialize+the+Customer+Profile+in+the+React+Native+SDK+%28v2%2C+Legacy%29%3F\u0026amp;description=Show+Gameball+customer+profile+in+your+React+Native+app\u0026amp;theme=4e778c65cbfcf077808b5cd6\u0026amp;signature=4ec31b9abbc6657e1c987530ea37cba8a9359fd7784c6cacbfd7f2ec0f169402\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/gameball/Ree8Ef_QV2s4xScJ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Gameball Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FB5819\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.gameball.co/installation-guides/v2/react-native/initialize-profile\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/installation-guides/v2/react-native/initialize-profile.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.gameball.co/#organization\",\"name\":\"Gameball Docs\",\"url\":\"https://docs.gameball.co\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/gameball/G3Do1BW89krXAJ48/logo/light.svg?fit=max\u0026auto=format\u0026n=G3Do1BW89krXAJ48\u0026q=85\u0026s=aecb464405fc6a468704d3da3cedc5ae\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.gameball.co#website\",\"name\":\"Gameball Docs\",\"url\":\"https://docs.gameball.co\",\"publisher\":{\"@id\":\"https://docs.gameball.co/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.gameball.co/installation-guides/v2/react-native/initialize-profile#webpage\",\"url\":\"https://docs.gameball.co/installation-guides/v2/react-native/initialize-profile\",\"name\":\"How Do I Initialize the Customer Profile in the React Native SDK (v2, Legacy)?\",\"description\":\"Show Gameball customer profile in your React Native app\",\"dateModified\":\"2026-07-13T13:17:33.897Z\",\"isPartOf\":{\"@id\":\"https://docs.gameball.co#website\"},\"breadcrumb\":{\"@id\":\"https://docs.gameball.co/installation-guides/v2/react-native/initialize-profile#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.gameball.co/installation-guides/v2/react-native/initialize-profile#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Mobile Integration\",\"item\":\"https://docs.gameball.co/installation-guides/v2/ios/index\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"React Native\",\"item\":\"https://docs.gameball.co/installation-guides/v2/react-native/index\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How Do I Initialize the Customer Profile in the React Native SDK (v2, Legacy)?\",\"item\":\"https://docs.gameball.co/installation-guides/v2/react-native/initialize-profile\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.gameball.co/installation-guides/v2/react-native/initialize-profile#article\",\"headline\":\"How Do I Initialize the Customer Profile in the React Native SDK (v2, Legacy)?\",\"name\":\"How Do I Initialize the Customer Profile in the React Native SDK (v2, Legacy)?\",\"description\":\"Show Gameball customer profile in your React Native app\",\"url\":\"https://docs.gameball.co/installation-guides/v2/react-native/initialize-profile\",\"mainEntityOfPage\":{\"@id\":\"https://docs.gameball.co/installation-guides/v2/react-native/initialize-profile#webpage\"},\"dateModified\":\"2026-07-13T13:17:33.897Z\",\"publisher\":{\"@id\":\"https://docs.gameball.co/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.gameball.co#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Gameball Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Gameball Docs","nav":{"global":{"anchors":[{"anchor":"Gameball Website","icon":"globe","href":"https://gameball.co/"},{"anchor":"Blog","icon":"newspaper","href":"https://www.gameball.co/blog"},{"anchor":"Case Studies","icon":"briefcase","href":"https://www.gameball.co/case-study"}]},"tabs":[{"tab":"Product Docs","pages":[{"title":"Product Docs","href":"/product-documentation/getting-started/what-is-gameball"}]},{"tab":"Installation","versions":[{"version":"SDK v3","default":true,"pages":[{"title":"SDK v3","href":"/installation-guides/v3/react-native/initialize-profile"}]},{"version":"SDK v2","groups":[{"group":"Overview","pages":[{"title":"Installation Guide (SDK v2, Legacy)","href":"/installation-guides/v2"}]},{"group":"Web \u0026 POS Integration","pages":[{"group":"Web","pages":[{"title":"Web SDK Integration (v2, Legacy)","sidebarTitle":"Overview","href":"/installation-guides/v2/web/index"},{"title":"How Do I Get Started with the Web SDK (v2, Legacy)?","sidebarTitle":"Getting Started","href":"/installation-guides/v2/web/getting-started"},{"title":"How Do I Initialize the Customer Widget in the Web SDK (v2, Legacy)?","sidebarTitle":"Initialize Gameball Customer Widget","href":"/installation-guides/v2/web/initialize-widget"},{"title":"How Do I Manage Customers with the Web SDK (v2, Legacy)?","sidebarTitle":"Customer Management","href":"/installation-guides/v2/web/customer-management"},{"title":"How Do I Track Customer Events with the Web SDK (v2, Legacy)?","sidebarTitle":"Track Customer Events","href":"/installation-guides/v2/web/track-events"},{"title":"How Do I Track Orders and Reward Cashback with the Web SDK (v2, Legacy)?","sidebarTitle":"Track Orders \u0026 Cashback Reward","href":"/installation-guides/v2/web/track-orders"},{"title":"How Do I Integrate Points Redemption with the Web SDK (v2, Legacy)?","sidebarTitle":"Integrate Redemption","href":"/installation-guides/v2/web/integrate-redemption"},{"title":"How Do I Track Referrals with the Web SDK (v2, Legacy)?","sidebarTitle":"Track Referrals","href":"/installation-guides/v2/web/track-referrals"},{"title":"How Do I Complete the Go-Live Checklist for the Web SDK (v2, Legacy)?","sidebarTitle":"Go-Live Checklist","href":"/installation-guides/v2/web/go-live-checklist"}]},{"group":"POS","pages":[{"title":"Gameball POS Integration (v2, Legacy)","sidebarTitle":"Overview","href":"/installation-guides/v2/pos/index"},{"title":"How Do I Get Started with Gameball POS (v2, Legacy)?","sidebarTitle":"Getting Started","href":"/installation-guides/v2/pos/getting-started"},{"title":"How Do I Set Up the API for Gameball POS (v2, Legacy)?","sidebarTitle":"API Setup","href":"/installation-guides/v2/pos/api-setup"},{"title":"How Do I Manage Customers with Gameball POS (v2, Legacy)?","sidebarTitle":"Customer Management","href":"/installation-guides/v2/pos/customer-management"},{"title":"How Do I Show the Customer Balance with Gameball POS (v2, Legacy)?","sidebarTitle":"Customer Balance","href":"/installation-guides/v2/pos/customer-balance"},{"title":"How Do I Integrate Points Redemption with Gameball POS (v2, Legacy)?","sidebarTitle":"Integrate Redemption","href":"/installation-guides/v2/pos/integrate-redemption"},{"title":"How Do I Track Orders with Gameball POS (v2, Legacy)?","sidebarTitle":"Track Orders","href":"/installation-guides/v2/pos/track-orders"},{"title":"How Do I Refund an Order with Gameball POS (v2, Legacy)?","sidebarTitle":"Refund Order","href":"/installation-guides/v2/pos/refund-order"},{"title":"How Do I Fetch Order Details with Gameball POS (v2, Legacy)?","sidebarTitle":"Fetch Order Details","href":"/installation-guides/v2/pos/fetch-order-details"},{"title":"How Do I Track Events with Gameball POS (v2, Legacy)?","sidebarTitle":"Track Events","href":"/installation-guides/v2/pos/track-events"},{"title":"How Do I Track Referrals with Gameball POS (v2, Legacy)?","sidebarTitle":"Track Referrals","href":"/installation-guides/v2/pos/track-referrals"},{"title":"How Do I Complete the Go-Live Checklist for Gameball POS (v2, Legacy)?","sidebarTitle":"Go-Live Checklist","href":"/installation-guides/v2/pos/go-live-checklist"},{"title":"Gameball POS Migration Notes (v2, Legacy)","sidebarTitle":"Migration Notes","href":"/installation-guides/v2/pos/migration-notes"}]}]},{"group":"Mobile Integration","pages":[{"group":"iOS","pages":[{"title":"iOS SDK Integration (v2, Legacy)","sidebarTitle":"Overview","href":"/installation-guides/v2/ios/index"},{"title":"How Do I Get Started with the iOS SDK (v2, Legacy)?","sidebarTitle":"Getting Started","href":"/installation-guides/v2/ios/getting-started"},{"title":"How Do I Initialize the Customer Profile in the iOS SDK (v2, Legacy)?","sidebarTitle":"Initialize Gameball Customer Profile","href":"/installation-guides/v2/ios/initialize-profile"},{"title":"How Do I Track Customer Events with the iOS SDK (v2, Legacy)?","sidebarTitle":"Track Customer Events","href":"/installation-guides/v2/ios/track-events"},{"title":"How Do I Track Orders and Reward Cashback with the iOS SDK (v2, Legacy)?","sidebarTitle":"Track Orders \u0026 Cashback Reward","href":"/installation-guides/v2/ios/track-orders"},{"title":"How Do I Integrate Points Redemption with the iOS SDK (v2, Legacy)?","sidebarTitle":"Integrate Redemption","href":"/installation-guides/v2/ios/integrate-redemption"},{"title":"How Do I Set Up Push Notifications in the iOS SDK (v2, Legacy)?","sidebarTitle":"Push Notifications","href":"/installation-guides/v2/ios/push-notifications"},{"title":"How Do I Track Referrals with the iOS SDK (v2, Legacy)?","sidebarTitle":"Track Referrals","href":"/installation-guides/v2/ios/track-referrals"},{"title":"How Do I Complete the Go-Live Checklist for the iOS SDK (v2, Legacy)?","sidebarTitle":"Go-Live Checklist","href":"/installation-guides/v2/ios/go-live-checklist"}]},{"group":"Android","pages":[{"title":"Android SDK Integration (v2, Legacy)","sidebarTitle":"Overview","href":"/installation-guides/v2/android/index"},{"title":"How Do I Get Started with the Android SDK (v2, Legacy)?","sidebarTitle":"Getting Started","href":"/installation-guides/v2/android/getting-started"},{"title":"How Do I Initialize the Customer Profile in the Android SDK (v2, Legacy)?","sidebarTitle":"Initialize Gameball Customer Profile","href":"/installation-guides/v2/android/initialize-profile"},{"title":"How Do I Track Customer Events with the Android SDK (v2, Legacy)?","sidebarTitle":"Track Customer Events","href":"/installation-guides/v2/android/track-events"},{"title":"How Do I Track Orders and Reward Cashback with the Android SDK (v2, Legacy)?","sidebarTitle":"Track Orders \u0026 Cashback Reward","href":"/installation-guides/v2/android/track-orders"},{"title":"How Do I Integrate Points Redemption with the Android SDK (v2, Legacy)?","sidebarTitle":"Integrate Redemption","href":"/installation-guides/v2/android/integrate-redemption"},{"title":"How Do I Set Up Push Notifications in the Android SDK (v2, Legacy)?","sidebarTitle":"Push Notifications","href":"/installation-guides/v2/android/push-notifications"},{"title":"How Do I Complete the Go-Live Checklist for the Android SDK (v2, Legacy)?","sidebarTitle":"Go-Live Checklist","href":"/installation-guides/v2/android/go-live-checklist"}]},{"group":"React Native","pages":[{"title":"React Native SDK Integration (v2, Legacy)","sidebarTitle":"Overview","href":"/installation-guides/v2/react-native/index"},{"title":"How Do I Get Started with the React Native SDK (v2, Legacy)?","sidebarTitle":"Getting Started","description":"Install the Gameball React Native SDK into your app","href":"/installation-guides/v2/react-native/getting-started"},{"title":"How Do I Initialize the Customer Profile in the React Native SDK (v2, Legacy)?","sidebarTitle":"Initialize Gameball Customer Profile","href":"/installation-guides/v2/react-native/initialize-profile"},{"title":"How Do I Track Customer Events with the React Native SDK (v2, Legacy)?","sidebarTitle":"Track Customer Events","description":"Send customer events from your React Native app to Gameball","href":"/installation-guides/v2/react-native/track-events"},{"title":"How Do I Track Orders and Reward Cashback with the React Native SDK (v2, Legacy)?","sidebarTitle":"Track Orders \u0026 Cashback Reward","href":"/installation-guides/v2/react-native/track-orders"},{"title":"How Do I Integrate Points Redemption with the React Native SDK (v2, Legacy)?","sidebarTitle":"Integrate Redemption","href":"/installation-guides/v2/react-native/integrate-redemption"},{"title":"How Do I Track Referrals with the React Native SDK (v2, Legacy)?","sidebarTitle":"Track Referrals","href":"/installation-guides/v2/react-native/track-referrals"},{"title":"How Do I Set Up Push Notifications in the React Native SDK (v2, Legacy)?","sidebarTitle":"Push Notifications","href":"/installation-guides/v2/react-native/push-notifications"},{"title":"How Do I Complete the Go-Live Checklist for the React Native SDK (v2, Legacy)?","sidebarTitle":"Go-Live Checklist","href":"/installation-guides/v2/react-native/go-live-checklist"}]},{"group":"Flutter","pages":[{"title":"Flutter SDK Integration (v2, Legacy)","sidebarTitle":"Overview","href":"/installation-guides/v2/flutter/index"},{"title":"How Do I Get Started with the Flutter SDK (v2, Legacy)?","sidebarTitle":"Getting Started","href":"/installation-guides/v2/flutter/getting-started"},{"title":"How Do I Initialize the Customer Profile in the Flutter SDK (v2, Legacy)?","sidebarTitle":"Initialize Gameball Customer Profile","href":"/installation-guides/v2/flutter/initialize-profile"},{"title":"How Do I Track Customer Events with the Flutter SDK (v2, Legacy)?","sidebarTitle":"Track Customer Events","href":"/installation-guides/v2/flutter/track-events"},{"title":"How Do I Track Orders and Reward Cashback with the Flutter SDK (v2, Legacy)?","sidebarTitle":"Track Orders \u0026 Cashback Reward","href":"/installation-guides/v2/flutter/track-orders"},{"title":"How Do I Integrate Points Redemption with the Flutter SDK (v2, Legacy)?","sidebarTitle":"Integrate Redemption","href":"/installation-guides/v2/flutter/integrate-redemption"},{"title":"How Do I Track Referrals with the Flutter SDK (v2, Legacy)?","sidebarTitle":"Track Referrals","href":"/installation-guides/v2/flutter/track-referrals"},{"title":"How Do I Complete the Go-Live Checklist for the Flutter SDK (v2, Legacy)?","sidebarTitle":"Go-Live Checklist","href":"/installation-guides/v2/flutter/go-live-checklist"}]},{"group":"Generic Mobile App","pages":[{"title":"Generic Mobile SDK Integration (v2, Legacy)","sidebarTitle":"Overview","href":"/installation-guides/v2/generic-mobile/index"},{"title":"How Do I Initialize the Customer Profile in a Generic Mobile App (v2, Legacy)?","sidebarTitle":"Initialize Gameball Customer Profile","href":"/installation-guides/v2/generic-mobile/initialize-profile"},{"title":"How Do I Track Customer Events in a Generic Mobile App (v2, Legacy)?","sidebarTitle":"Track Customer Events","href":"/installation-guides/v2/generic-mobile/track-events"},{"title":"How Do I Track Orders and Reward Cashback in a Generic Mobile App (v2, Legacy)?","sidebarTitle":"Track Orders \u0026 Cashback Reward","href":"/installation-guides/v2/generic-mobile/track-orders"},{"title":"How Do I Integrate Points Redemption in a Generic Mobile App (v2, Legacy)?","sidebarTitle":"Integrate Redemption","href":"/installation-guides/v2/generic-mobile/integrate-redemption"},{"title":"How Do I Track Referrals in a Generic Mobile App (v2, Legacy)?","sidebarTitle":"Track Referrals","href":"/installation-guides/v2/generic-mobile/track-referrals"},{"title":"How Do I Set Up Push Notifications in a Generic Mobile App (v2, Legacy)?","sidebarTitle":"Push Notifications","href":"/installation-guides/v2/generic-mobile/push-notifications"}]}]}]}]},{"tab":"Technical Tutorials","pages":[{"title":"Technical Tutorials","href":"/tutorials/general/welcome"}]},{"tab":"API reference","versions":[{"version":"v4.0","groups":[{"group":"API documentation","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"group":"Overview","pages":[{"title":"What's New in V4.0","href":"/api-reference/overview/whats-new"},{"title":"Authentication","href":"/api-reference/overview/authentication"},{"title":"Rate Limiting","href":"/api-reference/overview/rate-limiting"},{"title":"Status and Error Codes","href":"/api-reference/overview/status-error-codes"}]},{"group":"Customers","pages":[{"title":null,"href":"/api-reference/customers/customers"},{"group":"Management","pages":[{"title":"Create/Update Customer","openapi":"POST /api/v4.0/integrations/customers","href":"/api-reference/customers/management/create-customer"},{"title":"Get Customer","openapi":"GET /api/v4.0/integrations/customers/{customerId}","href":"/api-reference/customers/management/get-customer"},{"title":"Get Customer Details","openapi":"GET /api/v4.0/integrations/customers/{customerId}/details","href":"/api-reference/customers/management/get-customer-details"},{"title":"Get Customer Coupons","openapi":"GET /api/v4.0/integrations/customers/{customerId}/coupons","href":"/api-reference/customers/management/get-customer-coupons"},{"title":"Update Customer Activation","openapi":"PUT /api/v4.0/integrations/customers/{customerId}/activate","href":"/api-reference/customers/management/update-customer-activation"},{"title":"Delete Customer","openapi":"DELETE /api/v4.0/integrations/customers/{customerId}","href":"/api-reference/customers/management/delete-customer"},{"title":"Get Customer Hash","openapi":"GET /api/v4.0/integrations/customers/{customerId}/hash","href":"/api-reference/customers/management/get-customer-hash"},{"title":"Validate Referrer Code","openapi":"GET /api/v4.0/integrations/referrals/validate","href":"/api-reference/customers/management/validate-referrer-code"},{"title":"Achieve Social Campaign","openapi":"POST /api/v4.0/integrations/customers/social-challenges","href":"/api-reference/customers/management/achieve-social-campaign"}]},{"group":"Progress","pages":[{"title":"Customer Balance","openapi":"GET /api/v4.0/integrations/customers/{customerId}/balance","href":"/api-reference/customers/progress/get-customer-balance"},{"title":"Customer Tier Progress","openapi":"GET /api/v4.0/integrations/customers/{customerId}/tier-progress","href":"/api-reference/customers/progress/get-customer-progress"},{"title":"Customer Campaigns Progress","openapi":"GET /api/v4.0/integrations/customers/{customerId}/reward-campaigns-progress","href":"/api-reference/customers/progress/get-customer-campaigns-progress"},{"title":"Customer Referrals","openapi":"GET /api/v4.0/integrations/customers/{customerId}/referrals","href":"/api-reference/customers/progress/get-customer-referrals"},{"title":"Customer Referrals Count","openapi":"GET /api/v4.0/integrations/customers/{customerId}/referrals/count","href":"/api-reference/customers/progress/get-customer-referrals-count"},{"title":"Customer Activities","openapi":"GET /api/v4.0/integrations/customers/{customerId}/activities","href":"/api-reference/customers/progress/get-customer-activities"},{"title":"Customer Activities Count","openapi":"GET /api/v4.0/integrations/customers/{customerId}/activities/count","href":"/api-reference/customers/progress/get-customer-activities-count"},{"title":"Customer Automation Campaigns","openapi":"GET /api/v4.0/integrations/customers/{customerId}/automation","href":"/api-reference/customers/progress/get-customer-automation-campaigns"},{"title":"Customer Stamps Progress","openapi":"GET /api/v4.0/integrations/customers/{customerId}/stamps/{challengeId}","href":"/api-reference/customers/progress/get-customer-action-streak-progress"},{"title":"Customer Daily Streak Progress","openapi":"GET /api/v4.0/integrations/customers/{customerId}/streaks/{campaignId}","href":"/api-reference/customers/progress/get-customer-daily-streak-progress"}]},{"group":"Tags","pages":[{"title":"Attach Customer Tags","openapi":"POST /api/v4.0/integrations/customers/{customerId}/tags","href":"/api-reference/customers/tags/attach-customer-tags"},{"title":"Remove Customer Tags","openapi":"DELETE /api/v4.0/integrations/customers/{customerId}/tags","href":"/api-reference/customers/tags/remove-customer-tag"}]},{"group":"Notifications","pages":[{"title":"Customer Notifications","openapi":"GET /api/v4.0/integrations/customers/{customerId}/notifications","href":"/api-reference/customers/notifications/list-customer-notifications"},{"title":"Customer Notifications Count","openapi":"GET /api/v4.0/integrations/customers/{customerId}/notifications/count","href":"/api-reference/customers/notifications/get-customer-notifications-count"},{"title":"Mark Notifications Read","openapi":"PUT /api/v4.0/integrations/customers/{customerId}/notifications/read","href":"/api-reference/customers/notifications/mark-notifications-read"}]}]},{"group":"Events","pages":[{"title":"Send Events","openapi":"POST /api/v4.0/integrations/events","href":"/api-reference/events/send-events"},{"title":"Preview Event Rewards","openapi":"POST /api/v4.0/integrations/events/reward-preview","href":"/api-reference/events/preview-event-rewards"}]},{"group":"Order","pages":[{"title":"Order","href":"/api-reference/order/order"},{"title":"Order Tracking","openapi":"POST /api/v4.0/integrations/orders","href":"/api-reference/order/order-tracking"},{"group":"Order Rewards \u0026 History","pages":[{"title":"Calculate Order Cashback","openapi":"POST /api/v4.0/integrations/orders/cashback","href":"/api-reference/order/calculate-order-cashback"},{"title":"Preview Order Rewards","openapi":"POST /api/v4.0/integrations/orders/reward-preview","href":"/api-reference/order/preview-order-rewards"},{"title":"Order Points Breakdown","openapi":"GET /api/v4.0/integrations/orders/{orderId}/points-breakdown","href":"/api-reference/order/order-points-breakdown"},{"title":"Order Transactions","openapi":"GET /api/v4.0/integrations/orders/{orderId}/transactions","href":"/api-reference/order/order-transactions"}]}]},{"group":"Payment","pages":[{"title":"Payment","href":"/api-reference/payment/payment"},{"title":"Payment Tracking","openapi":"POST /api/v4.0/integrations/payments","href":"/api-reference/payment/payment-tracking"},{"group":"Payment Rewards \u0026 History","pages":[{"title":"Calculate Payment Cashback","openapi":"POST /api/v4.0/integrations/payments/cashback","href":"/api-reference/payment/calculate-payment-cashback"}]}]},{"group":"Transactions","pages":[{"title":"Transactions","href":"/api-reference/transactions/transactions"},{"group":"Cashback \u0026 Redemptions","pages":[{"title":"Cashback \u0026 Redemptions","href":"/api-reference/transactions/cashback-and-redemptions/index"},{"title":"Redeem Points","openapi":"POST /api/v4.0/integrations/transactions/redeem","href":"/api-reference/transactions/cashback-and-redemptions/redeem"},{"title":"Cashback","openapi":"POST /api/v4.0/integrations/transactions/cashback","href":"/api-reference/transactions/cashback-and-redemptions/cashback"},{"title":"Refund","openapi":"POST /api/v4.0/integrations/transactions/refund","href":"/api-reference/transactions/cashback-and-redemptions/refund"}]},{"group":"Hold Management","pages":[{"title":"Hold Management","href":"/api-reference/transactions/hold-management/index"},{"title":"Hold Points","openapi":"POST /api/v4.0/integrations/transactions/hold","href":"/api-reference/transactions/hold-management/hold"},{"title":"Release Hold","openapi":"DELETE /api/v4.0/integrations/transactions/hold/{holdReferenceId}","href":"/api-reference/transactions/hold-management/release"},{"title":"Get Hold Details","openapi":"GET /api/v4.0/integrations/transactions/hold/{holdReferenceId}","href":"/api-reference/transactions/hold-management/get-hold"}]},{"group":"Transaction Management","pages":[{"title":"Transaction Management","href":"/api-reference/transactions/transaction-management/index"},{"title":"List Transactions","openapi":"GET /api/v4.0/integrations/transactions","href":"/api-reference/transactions/transaction-management/list-transactions"},{"title":"Transactions with Customer Data","openapi":"GET /api/v4.0/integrations/transactions/customer-view","href":"/api-reference/transactions/transaction-management/customer-view"},{"title":"Transaction Count","openapi":"GET /api/v4.0/integrations/transactions/count","href":"/api-reference/transactions/transaction-management/count"},{"title":"Add Manual Transaction","openapi":"POST /api/v4.0/integrations/transactions/manual","href":"/api-reference/transactions/transaction-management/manual-transaction"},{"title":"Activate Transaction","openapi":"PUT /api/v4.0/integrations/transactions/{transactionId}/activate","href":"/api-reference/transactions/transaction-management/activate"}]},{"group":"Transaction Validation","pages":[{"title":"Transaction Validation","href":"/api-reference/transactions/transaction-validation/index"},{"title":"Generate OTP","openapi":"POST /api/v4.0/integrations/transactions/otp","href":"/api-reference/transactions/transaction-validation/generate-otp"}]}]},{"group":"Coupons","pages":[{"title":"Coupons API","sidebarTitle":"Coupons","href":"/api-reference/coupons/coupons"},{"title":"Generate Coupon","openapi":"POST /api/v4.0/integrations/coupons/predefined","href":"/api-reference/coupons/generate-coupon"},{"title":"Validate Single Coupon","openapi":"POST /api/v4.0/integrations/coupons/{code}/validate","href":"/api-reference/coupons/validate-single-coupon"},{"title":"Validate Multiple Coupons","openapi":"POST /api/v4.0/integrations/coupons/validate","href":"/api-reference/coupons/validate-multiple-coupons"},{"title":"Burn Coupon","openapi":"POST /api/v4.0/integrations/coupons/burn","href":"/api-reference/coupons/burn-coupon"},{"title":"Release Coupons","openapi":"DELETE /api/v4.0/integrations/coupons/{lockReference}","href":"/api-reference/coupons/release-coupons"},{"title":"Automatic Coupons","openapi":"POST /api/v4.0/integrations/coupons/automatic","href":"/api-reference/coupons/automatic-coupons"}]},{"group":"Configurations","pages":[{"title":"Configurations","href":"/api-reference/configurations/configurations"},{"group":"Reward Configurations","pages":[{"title":"Reward Configurations","href":"/api-reference/configurations/reward-configurations/index"},{"title":"Cashback Configurations","openapi":"GET /api/v4.0/integrations/configurations/cashback","href":"/api-reference/configurations/reward-configurations/cashback-settings"},{"title":"Redemption Configurations","openapi":"GET /api/v4.0/integrations/configurations/redemption","href":"/api-reference/configurations/reward-configurations/redemption-settings"},{"title":"Coupon Configurations","openapi":"GET /api/v4.0/integrations/configurations/coupon","href":"/api-reference/configurations/reward-configurations/coupon-settings"},{"title":"Update Coupon Configurations","openapi":"PUT /api/v4.0/integrations/configurations/coupon","href":"/api-reference/configurations/reward-configurations/update-coupon-settings"}]},{"group":"Program Configurations","pages":[{"title":"Program Configurations","href":"/api-reference/configurations/program-configurations/index"},{"title":"Campaigns Configurations","openapi":"GET /api/v4.0/integrations/configurations/reward-campaigns","href":"/api-reference/configurations/program-configurations/campaigns"},{"title":"Tiers Configurations","openapi":"GET /api/v4.0/integrations/configurations/tiers","href":"/api-reference/configurations/program-configurations/vip-tiers"},{"title":"Referrals Configurations","openapi":"GET /api/v4.0/integrations/configurations/referrals","href":"/api-reference/configurations/program-configurations/referral-settings"}]},{"title":"Get Widget Configurations","openapi":"GET /api/v4.0/integrations/configurations/widget","href":"/api-reference/configurations/widget-configuration/index"}]},{"group":"Leaderboard","pages":[{"title":"Customer Leaderboard","openapi":"GET /api/v4.0/integrations/leaderboard","href":"/api-reference/leaderboard/customer-leaderboard"}]},{"group":"Batches","pages":[{"title":"Batches","href":"/api-reference/batches/batches"},{"group":"Batch Creation","pages":[{"title":"Batch Creation","href":"/api-reference/batches/batch-creation/index"},{"title":"Create Customers Batch Job","openapi":"POST /api/v4.0/integrations/batch/customers","href":"/api-reference/batches/batch-creation/customer-data"},{"title":"Track Orders Batch Job","openapi":"POST /api/v4.0/integrations/batch/orders","href":"/api-reference/batches/batch-creation/orders"},{"title":"Order Transactions Batch Job","openapi":"POST /api/v4.0/integrations/batch/orders/transactions","href":"/api-reference/batches/batch-creation/order-transactions"},{"title":"Balance Inquiry Batch Job","openapi":"POST /api/v4.0/integrations/batch/balance-inquiry","href":"/api-reference/batches/batch-creation/balance-inquiries"},{"title":"Balance Adjustment Batch Job","openapi":"POST /api/v4.0/integrations/batch/balance-adjustment","href":"/api-reference/batches/batch-creation/adjustments"},{"title":"Reward Cashback Batch Job","openapi":"POST /api/v4.0/integrations/batch/cashback","href":"/api-reference/batches/batch-creation/cashback-rewards"},{"title":"Redeem Batch Job","openapi":"POST /api/v4.0/integrations/batch/redeem","href":"/api-reference/batches/batch-creation/redemptions"},{"title":"Send Events Batch Job","openapi":"POST /api/v4.0/integrations/batch/events","href":"/api-reference/batches/batch-creation/events"}]},{"group":"Batch Management","pages":[{"title":"Batch Management","href":"/api-reference/batches/batch-management/index"},{"title":"Check Batch Status","openapi":"GET /api/v4.0/integrations/batches/{batchId}/status","href":"/api-reference/batches/batch-management/check-status"},{"title":"Stop Batch Execution","openapi":"POST /api/v4.0/integrations/batches/{batchId}/stop","href":"/api-reference/batches/batch-management/stop-execution"}]}]}]},{"group":"Webhooks","pages":[{"title":"Overview","href":"/api-reference/webhooks/overview"},{"title":"Subscribing to Webhooks","href":"/api-reference/webhooks/subscribing"},{"group":"Webhook Topics","pages":[{"title":"Webhook Topics","href":"/api-reference/webhooks/webhook-topics"},{"title":"Customer Notifications Webhook","sidebarTitle":"Customer Notifications","href":"/api-reference/webhooks/webhook-topics/notifications"},{"title":"Customer Profile Updates","href":"/api-reference/webhooks/webhook-topics/profile-updates"}]}]}]},{"version":"v4.1","pages":[{"title":"v4.1","href":"/api-reference/introduction-v4.1"}]}]},{"tab":"Updates","pages":[{"title":"Updates","href":"/changelog/updates"}]}]},"basePath":"","title":"How Do I Initialize the Customer Profile in the React Native SDK (v2, Legacy)? - Gameball Docs","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":[],"chunks":[]}