Skip to main content
Important

This feature is currently in Early Availability (EA) status. For more information, see our product lifecycle phases.

Accessing Company, User, and Settings Data

This guide concentrates on Bootstrap Data, a hook that grants access to various marketplace configurations and user details. Utilizing this data enables you to tailor a more personalized experience for your users. Let's get started!

How to Access

Included with the extensions is a hook that allows you to access an extensive array of marketplace configurations and user details. To retrieve this data, employ the useMarketplaceContext hook.

import useMarketplaceContext from "../../hooks/useMarketplaceContext";

const App = (): JSX.Element => {
const { bootstrap, tenant, locale } = useMarketplaceContext();
});

Bootstrap Data Contents

The bootstrap data comprises a JSON object that includes the following details:

  • User information: Fundamental data about the logged-in user, including their name and email address.
  • Company information: Essential information about the user's company, like the company name and address.
  • Marketplace settings: Details about the marketplace, such as its name, active features, theme, and locale.
{
"metaDescription": "Marketplace allows you to use and manage business applications in one simple and secure platform, from anywhere.",
"metaKeywords": "Marketplace, saas, applications, marketplace, web-based apps, business apps",
"metaNoIndex": false,
"analyticsId": "UA-12234234838-2",
"marketPlaceName": "AppDirect Marketplace",
"theme": "appsmart",
"locale": "en-US",
"localeLanguage": "en",
"dateFormat": "MM/DD/YY",
"dateTimeFormat": "MM/DD/YY h:mm:ss a",
"defaultCurrency": "USD",
"defaultCountry": "US",
"currencyFormats": {
"USD": {
"symbol": "$",
"decimal": ".",
"thousand": ",",
"precision": 2,
"format": "%s%v"
}
},
"UserInfo": {
"profilePic": null,
"name": "Name",
"email": "my.email@company.com",
"idpUuid": "6708c6a1-5f6a-4aeb-9b8a-79sdfsdf71b",
"hasIdpAccountsMarketplace": false,
"verified": true,
"locale": "en_US",
"tester": false,
"currency": "USD",
"ownedPartners": [],
"user_id": "7dd3d02d-b269-4970-912c-d6asdasd97",
"given_name": "John",
"family_name": "Smith",
"company_id": "3dc98547-47dd-47bb-9b01-4562342342342e6",
"roles": [
"UPDATE_SUBSCRIPTION_WITH_UNPAID_INVOICE_FOR_SELF_SERVE",
"BILLING_ADMIN",
"CREATE_QUOTE",
"USER"
],
"attributes": {},
"customUserAttributes": {},
"customUserAttributesIds": {}
},
"CompanyInfo": {
"uuid": "3dc98547-47dd-47bb-9b01-4569be3412e6",
"name": "AppDirect",
"partner": "APPSMART",
"contactInformation": {
"street1": "3128 Highwoods Blvd",
"street2": "Ste. 140",
"city": "Raleigh",
"state": "NC",
"zip": "27604",
"country": "US",
"phone": "866-456-3211"
},
"salesOpportunitiesEnabled": false,
"salesLeadsEnabled": false,
"resellersCanCreateCompanies": true,
"resellersCanManageCustomers": true,
"externalIdentifier": "d8dde0c9-1e34-4dd1-a352-81bb55e62601",
"passwordPolicy": "password.policy",
"passwordPolicyRegex": "(?=.{8,})((?=.*\\\\d)|(?=.*\\\\W))((?=.*[A-Z])|(?=.*[a-z])).*",
"onlyAdminsCanBuy": true,
"importAppsEnabled": true,
"importAppsLimit": -1,
"importedAppsCount": 110,
"companyWideBilling": false,
"channelAdmin": true,
"vendor": true,
"reseller": false,
"allowMembershipCreationByMarketplaceUsers": false,
"companySsoOverrideEnabled": true,
"directoryConnectorEnabled": true
},
"CHANNEL_SETTINGS": {
"partner": "MYPARTNER",
"linkedPartnerUrl": null,
"companyName": "MyCompany",
"allowSalesAgentEnterPaymentDetails": true,
"accountInvoiceV2Enabled": true,
"invoiceTemplatesEnabled": false,
"approvesUserContent": true,
"currency": "USD",
"currencies": [
"USD"
],
"hideAllUI": false,
"hideQuestions": true,
"hideSupportSection": false,
"supportRequired": false,
"featuresRequired": true,
"identityProvider": false,
"includeCaptchaInRegistration": false,
"localeTags": [
"en-US"
],
"defaultLocale": "en-US",
"defaultLocaleCountry": "US",
"defaultLocaleCountryIso3": "USA",
"minimumReviewsForRating": 1,
"oneClickTrialEnabled": false,
"channelDecidesIfOnlyAdminsCanBuy": false,
"allowExternalValidation": false,
"collectPurchaseRequestDetails": true,
"partnerName": "AppDirect",
"recaptchaPublicKey": null,
"reviewRequirePurchase": true,
"displayTaxBreakdown": false,
"displayTaxSubtotal": false,
"flatTaxRate": null,
"supportContactUrl": "https://support.appsmart.com/",
"supportUrl": "https://support.appsmart.com/",
"supportPhone": "833-427-7762",
"supportEmail": "help@appdirect.com",
"privacyPolicyUrl": "https://www.appdirect.com/legal/procurement/appdirect-marketplace-privacy-policy",
"legalDetailsUrl": null,
"termsUrl": "https://www.appdirect.com/legal/procurement/appdirect-marketplace-terms-and-conditions",
"trustedProviders": [],
"cmsCurrencies": [
"USD"
],
"hideSignupLinks": false,
"capabilities": [
"CHECKOUT",
"NETWORK_CATALOG",
"STORE_FRONT",
"FULL_PRODUCT_INTEGRATION",
"CHANNEL_MANAGEMENT",
"CUSTOMER_APPLICATION_MANAGEMENT",
"MIGRATION",
"SECURITY_SETTINGS",
"QUESTIONS_AND_ANSWERS",
"RESELLER_SIGNUP",
"CHANNEL_PAYMENT_GATEWAY",
"DEVELOPER",
"PRODUCT_BUNDLES",
"DEVELOPER_NETWORK",
"HOSTED_CHECKOUT",
"RESELLER",
"NETWORK_CATALOG_MANAGEMENT",
"CUSTOMER_BILLING_MANAGEMENT",
"PRODUCT_PURCHASE",
"USER_MANAGEMENT"
],
"hideCustomerInfoFromDevelopers": false,
"supportedProductTypes": [
"WEB_APP",
"CLOUD_SERVICES",
"HARDWARE_SERVICE",
"DOWNLOAD_WITH_FULL_PROFILE",
"STATIC",
"DOMAIN_RESELLER",
"EXTERNAL",
"EMBEDDED_VIDEO",
"PHYSICAL_PRODUCT",
"WEB_APP_MANUAL_SETUP",
"WEB_APP_STACKED"
],
"zipCodeValidationEnabled": false,
"vatIdValidationEnabled": false,
},
"SERVER_TIME_ZONE": "-04:00",
"DATE_PICKER_FORMAT": "mm/dd/yy",
"languages": {
"da": "Dansk",
"de": "Deutsch",
"en-US": "English (United States)",
}
}


Was this page helpful?