--- title: Companies description: >- The company details page displays information about a specific B2B company, including its profile, locations, contacts, and order history. Extensions on these pages help merchants manage B2B relationships and customize company workflows. api_version: 2025-10 api_name: admin-extensions source_url: html: 'https://shopify.dev/docs/api/admin-extensions/2025-10/targets/companies' md: 'https://shopify.dev/docs/api/admin-extensions/2025-10/targets/companies.md' --- # Companies The company details page displays information about a specific B2B company, including its profile, locations, contacts, and order history. Extensions on these pages help merchants manage B2B relationships and customize company workflows. ### Use cases * **CRM integration:** Sync company data with external CRM systems, update contact information across platforms, or pull in additional customer intelligence to enrich merchant workflows. * **Credit management:** Display real-time credit limits, outstanding balances, payment terms, or risk scores to help merchants make informed decisions about extending credit to B2B customers. * **Communication workflows:** Initiate targeted email campaigns, send payment reminders, schedule follow-ups, or trigger notifications based on company activity and status changes. * **Compliance and verification:** Show KYC (Know Your Customer) status, tax validation results, business license verification, or other compliance checks required for B2B transactions. * **Custom analytics:** Display specialized metrics such as order frequency, average order value by location, product preferences, or seasonal purchasing patterns to inform sales strategies. ![Companies targets overview](https://shopify.dev/assets/assets/images/templated-apis-screenshots/admin-extensions/targets-overview-images/admin.company.overview-B-bkhTrO.png) *** ## Companies targets Use [action and block targets](https://shopify.dev/docs/api/admin-extensions/2025-10#building-your-extension) to extend company pages with workflows and contextual information that help merchants manage their B2B relationships and company-specific operations. Action targets open as modal overlays from the **More actions** menu, while block targets display as inline cards. The examples demonstrate fetching data from Shopify's [direct API](https://shopify.dev/docs/api/admin-extensions/2025-10#direct-api-access) or your [app's backend](https://shopify.dev/docs/api/admin-extensions/2025-10#app-authentication). ### Company details action target `admin.company-details.action.render` Renders an admin action extension on the company details page. Merchants can access this extension from the **More actions** menu. Use this target to provide workflows that operate on company data, such as syncing with external systems, exporting company information, or managing credit terms. Extensions at this target can access information about the company through the `data` property in the [Action Extension API](https://shopify.dev/docs/api/admin-extensions/2025-10/target-apis/core-apis/action-extension-api). The action renders in a modal overlay, providing space for multi-step workflows, forms, and confirmations. ### Support Components (45) APIs (1) ### Supported components * [Admin action](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/settings-and-templates/admin-action) * [Avatar](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/media-and-visuals/avatar) * [Badge](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/feedback-and-status-indicators/badge) * [Banner](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/feedback-and-status-indicators/banner) * [Box](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/box) * [Button](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/button) * [Button group](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/button-group) * [Checkbox](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/checkbox) * [Chip](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/typography-and-content/chip) * [Choice list](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/choice-list) * [Clickable](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/clickable) * [Clickable chip](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/clickable-chip) * [Color field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/color-field) * [Color picker](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/color-picker) * [Date field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/date-field) * [Date picker](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/date-picker) * [Divider](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/divider) * [Drop zone](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/drop-zone) * [Email field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/email-field) * [Grid](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/grid) * [Heading](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/typography-and-content/heading) * [Icon](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/media-and-visuals/icon) * [Image](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/media-and-visuals/image) * [Link](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/link) * [Menu](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/menu) * [Money field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/money-field) * [Number field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/number-field) * [Ordered list](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/ordered-list) * [Paragraph](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/typography-and-content/paragraph) * [Password field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/password-field) * [Query container](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/query-container) * [Search field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/search-field) * [Section](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/section) * [Select](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/select) * [Spinner](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/feedback-and-status-indicators/spinner) * [Stack](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/stack) * [Switch](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/switch) * [Table](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/table) * [Text](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/typography-and-content/text) * [Text area](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/text-area) * [Text field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/text-field) * [Thumbnail](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/media-and-visuals/thumbnail) * [Tooltip](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/typography-and-content/tooltip) * [Url field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/url-field) * [Unordered list](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/unordered-list) ### Available APIs * [Action Extension API](https://shopify.dev/docs/api/admin-extensions/2025-10/target-apis/core-apis/action-extension-api) Examples ### Examples * #### ##### Description Add an action extension that exports company information to an external CRM system. This example shows how to fetch company details and push them to your app's backend for processing. ##### jsx ```jsx import {render} from 'preact'; import {useState} from 'preact/hooks'; export default async () => { render(, document.body); }; const Extension = () => { const [loading, setLoading] = useState(false); const [includeLocations, setIncludeLocations] = useState(true); const [includeContacts, setIncludeContacts] = useState(true); const [includeOrders, setIncludeOrders] = useState(false); const [success, setSuccess] = useState(false); const [error, setError] = useState(false); const handleExport = async () => { setLoading(true); setSuccess(false); setError(false); const companyId = shopify.data.selected[0].id; try { // Fetch company details from GraphQL Admin API const companyResponse = await fetch('shopify:admin/api/graphql.json', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ query: ` query GetCompany($id: ID!) { company(id: $id) { id name externalId mainContact { firstName lastName email } locations(first: 10) { edges { node { id name shippingAddress { address1 city province country zip } } } } } } `, variables: {id: companyId}, }), }); const {data: companyData} = await companyResponse.json(); // Export to CRM through your app's backend const response = await fetch('https://your-app.com/api/export-to-crm', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ company: companyData.company, includeLocations, includeContacts, includeOrders, }), }); if (response.ok) { setSuccess(true); shopify.close(); } else { setError(true); } } catch (err) { setError(true); } finally { setLoading(false); } }; return ( {success && ( Company exported to CRM successfully! )} {error && ( Failed to export company. Please try again. )} setIncludeLocations(event.currentTarget.checked)} /> setIncludeContacts(event.currentTarget.checked)} /> setIncludeOrders(event.currentTarget.checked)} /> {loading ? 'Exporting...' : 'Export to CRM'} shopify.close()}> Cancel ); }; ``` * #### ##### Description Add an action extension that allows merchants to update credit terms for a company. This example demonstrates a multi-step workflow with form validation and confirmation. ##### jsx ```jsx import {render} from 'preact'; import {useState} from 'preact/hooks'; export default async () => { render(, document.body); }; const Extension = () => { const [loading, setLoading] = useState(false); const [creditLimit, setCreditLimit] = useState(''); const [paymentTerms, setPaymentTerms] = useState('30'); const [success, setSuccess] = useState(false); const [error, setError] = useState(false); const handleUpdate = async () => { if (!creditLimit || isNaN(parseFloat(creditLimit))) { setError(true); return; } setLoading(true); setSuccess(false); setError(false); const companyId = shopify.data.selected[0].id; try { // Fetch company details from GraphQL Admin API const {data} = await shopify.query( ` query GetCompany($id: ID!) { company(id: $id) { id name } } `, {variables: {id: companyId}} ); // Update credit terms through your app's backend const response = await fetch('https://your-app.com/api/update-credit', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ companyId: data.company.id, companyName: data.company.name, creditLimit: parseFloat(creditLimit), paymentTerms: parseInt(paymentTerms), }), }); if (response.ok) { setSuccess(true); shopify.close(); } else { setError(true); } } catch (err) { setError(true); } finally { setLoading(false); } }; return ( {success && ( Credit terms updated successfully! )} {error && ( Failed to update credit terms. Please check your input. )} setCreditLimit(event.currentTarget.value)} details="Maximum credit available to this company" /> setPaymentTerms(event.currentTarget.value)} > {loading ? 'Updating...' : 'Update Terms'} shopify.close()}> Cancel ); }; ``` ### Company details action (should render) target `admin.company-details.action.should-render` Controls the render state of an admin action extension on the company details page. Use this target to conditionally show or hide your action extension based on the company's properties, such as status, order count, or specific business requirements. This target returns a boolean value that determines whether the corresponding action extension appears in the **More actions** menu. The extension is evaluated each time the page loads. ### Support Components (0) APIs (1) ### Supported components \- ### Available APIs * [Should Render API](https://shopify.dev/docs/api/admin-extensions/2025-10/target-apis/utility-apis/should-render-api) Examples ### Examples * #### ##### Description Conditionally display an action only for companies with active status. This example demonstrates how to use the \`should-render\` target to control extension visibility based on company status. ##### jsx ```jsx export default async () => { const companyId = shopify.data.selected[0].id; try { // Fetch company details from GraphQL Admin API const response = await fetch( 'shopify:admin/api/graphql.json', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ query: ` query GetCompany($id: ID!) { company(id: $id) { id name createdAt } } `, variables: {id: companyId}, }), } ); const {data} = await response.json(); // Check if company has been active for at least 30 days const createdDate = new Date(data.company.createdAt); const daysSinceCreation = (Date.now() - createdDate.getTime()) / (1000 * 60 * 60 * 24); // Only show action for established companies return {display: daysSinceCreation >= 30}; } catch (err) { console.error('Error fetching company:', err); return {display: false}; } }; ``` * #### ##### Description Conditionally display the action based on app-specific settings or merchant permissions. This example demonstrates checking app configuration before showing the action. ##### jsx ```jsx export default async () => { const companyId = shopify.data.selected[0].id; try { // Check app configuration through your backend const configResponse = await fetch( 'https://your-app.com/api/check-feature-access', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ feature: 'crm-export', companyId, }), } ); const {hasAccess} = await configResponse.json(); // Only show action if merchant has enabled this feature return {display: hasAccess}; } catch (err) { console.error('Error checking feature access:', err); return {display: false}; } }; ``` ### Company details block target `admin.company-details.block.render` Renders an admin block extension inline on the company details page. Use this target to display contextual information, analytics, or status updates related to the company without requiring merchants to open a modal. Extensions at this target appear as cards on the page and can show real-time data, insights, or quick actions. Blocks provide persistent visibility and are ideal for displaying information merchants need to see at a glance. ### Support Components (46) APIs (1) ### Supported components * [Admin block](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/settings-and-templates/admin-block) * [Avatar](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/media-and-visuals/avatar) * [Badge](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/feedback-and-status-indicators/badge) * [Banner](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/feedback-and-status-indicators/banner) * [Box](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/box) * [Button](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/button) * [Button group](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/button-group) * [Checkbox](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/checkbox) * [Chip](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/typography-and-content/chip) * [Choice list](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/choice-list) * [Clickable](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/clickable) * [Clickable chip](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/clickable-chip) * [Color field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/color-field) * [Color picker](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/color-picker) * [Date field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/date-field) * [Date picker](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/date-picker) * [Divider](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/divider) * [Drop zone](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/drop-zone) * [Email field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/email-field) * [Form](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/form) * [Grid](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/grid) * [Heading](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/typography-and-content/heading) * [Icon](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/media-and-visuals/icon) * [Image](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/media-and-visuals/image) * [Link](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/link) * [Menu](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/menu) * [Money field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/money-field) * [Number field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/number-field) * [Ordered list](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/ordered-list) * [Paragraph](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/typography-and-content/paragraph) * [Password field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/password-field) * [Query container](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/query-container) * [Search field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/search-field) * [Section](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/section) * [Select](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/select) * [Spinner](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/feedback-and-status-indicators/spinner) * [Stack](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/stack) * [Switch](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/switch) * [Table](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/table) * [Text](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/typography-and-content/text) * [Text area](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/text-area) * [Text field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/text-field) * [Thumbnail](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/media-and-visuals/thumbnail) * [Tooltip](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/typography-and-content/tooltip) * [Url field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/url-field) * [Unordered list](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/unordered-list) ### Available APIs * [Block Extension API](https://shopify.dev/docs/api/admin-extensions/2025-10/target-apis/core-apis/block-extension-api) Examples ### Examples * #### ##### Description Create a block extension that shows key financial metrics for the company, such as credit limit, outstanding balance, and payment history. This example demonstrates how to present valuable insights inline on the page. ##### jsx ```jsx import {render} from 'preact'; import {useState, useEffect} from 'preact/hooks'; export default async () => { render(, document.body); }; const Extension = () => { const [metrics, setMetrics] = useState(null); const [loading, setLoading] = useState(true); useEffect(() => { const fetchMetrics = async () => { const companyId = shopify.data.selected[0].id; try { // Fetch financial metrics from your app's backend const response = await fetch( `https://your-app.com/api/company-financials?id=${companyId}` ); const data = await response.json(); setMetrics(data); } catch (err) { console.error('Error fetching metrics:', err); } finally { setLoading(false); } }; fetchMetrics(); }, []); if (loading) { return ( Loading metrics... ); } if (!metrics) { return ( Unable to load financial metrics ); } const utilizationPercent = (metrics.outstandingBalance / metrics.creditLimit) * 100; const utilizationTone = utilizationPercent > 90 ? 'critical' : utilizationPercent > 75 ? 'warning' : 'success'; return ( Credit Limit ${metrics.creditLimit.toLocaleString()} Outstanding Balance ${metrics.outstandingBalance.toLocaleString()} {utilizationPercent.toFixed(0)}% utilized Payment History Average payment time: {metrics.avgPaymentDays} days On-time payments: {metrics.onTimePaymentRate}% Terms Net {metrics.paymentTerms} days {metrics.pastDueAmount > 0 && ( <> Past due: ${metrics.pastDueAmount.toLocaleString()} )} ); }; ``` * #### ##### Description Create a block extension that shows the current synchronization status with an external CRM system. This example demonstrates how to display integration health and recent sync activity. ##### jsx ```jsx import {render} from 'preact'; import {useState, useEffect} from 'preact/hooks'; export default async () => { render(, document.body); }; const Extension = () => { const [syncStatus, setSyncStatus] = useState(null); const [loading, setLoading] = useState(true); useEffect(() => { const fetchSyncStatus = async () => { const companyId = shopify.data.selected[0].id; try { // Fetch CRM sync status from your app's backend const response = await fetch( `https://your-app.com/api/crm-sync-status?companyId=${companyId}` ); const data = await response.json(); setSyncStatus(data); } catch (err) { console.error('Error fetching sync status:', err); } finally { setLoading(false); } }; fetchSyncStatus(); }, []); const handleSync = async () => { const companyId = shopify.data.selected[0].id; setLoading(true); try { await fetch('https://your-app.com/api/trigger-sync', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({companyId}), }); // Refresh sync status const response = await fetch( `https://your-app.com/api/crm-sync-status?companyId=${companyId}` ); const data = await response.json(); setSyncStatus(data); } catch (err) { console.error('Error triggering sync:', err); } finally { setLoading(false); } }; if (loading) { return ( ); } if (!syncStatus) { return ( Unable to load sync status ); } const getSyncTone = (status) => { switch (status) { case 'synced': return 'success'; case 'pending': return 'info'; case 'error': return 'critical'; default: return 'subdued'; } }; return ( Sync Status {syncStatus.status === 'synced' && 'Up to date'} {syncStatus.status === 'pending' && 'Sync in progress'} {syncStatus.status === 'error' && 'Sync failed'} Last Sync {syncStatus.lastSyncTime} {syncStatus.lastSyncError && ( {syncStatus.lastSyncError} )} CRM Record {syncStatus.crmUrl ? ( View in CRM ) : ( Not yet synced )} {syncStatus.status === 'pending' ? 'Syncing...' : 'Sync Now'} ); }; ``` ### Company location details block target `admin.company-location-details.block.render` Renders an admin block extension inline on the company location details page. Use this target to display location-specific information, such as shipping preferences, inventory availability, or delivery schedules for a particular company location. Extensions at this target appear as cards on the location page and can show data relevant to that specific location rather than the entire company. This is particularly useful for companies with multiple locations that require different handling or have unique attributes. ### Support Components (46) APIs (1) ### Supported components * [Admin block](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/settings-and-templates/admin-block) * [Avatar](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/media-and-visuals/avatar) * [Badge](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/feedback-and-status-indicators/badge) * [Banner](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/feedback-and-status-indicators/banner) * [Box](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/box) * [Button](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/button) * [Button group](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/button-group) * [Checkbox](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/checkbox) * [Chip](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/typography-and-content/chip) * [Choice list](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/choice-list) * [Clickable](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/clickable) * [Clickable chip](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/clickable-chip) * [Color field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/color-field) * [Color picker](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/color-picker) * [Date field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/date-field) * [Date picker](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/date-picker) * [Divider](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/divider) * [Drop zone](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/drop-zone) * [Email field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/email-field) * [Form](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/form) * [Grid](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/grid) * [Heading](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/typography-and-content/heading) * [Icon](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/media-and-visuals/icon) * [Image](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/media-and-visuals/image) * [Link](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/link) * [Menu](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/actions/menu) * [Money field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/money-field) * [Number field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/number-field) * [Ordered list](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/ordered-list) * [Paragraph](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/typography-and-content/paragraph) * [Password field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/password-field) * [Query container](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/query-container) * [Search field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/search-field) * [Section](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/section) * [Select](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/select) * [Spinner](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/feedback-and-status-indicators/spinner) * [Stack](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/stack) * [Switch](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/switch) * [Table](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/table) * [Text](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/typography-and-content/text) * [Text area](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/text-area) * [Text field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/text-field) * [Thumbnail](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/media-and-visuals/thumbnail) * [Tooltip](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/typography-and-content/tooltip) * [Url field](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/forms/url-field) * [Unordered list](https://shopify.dev/docs/api/admin-extensions/2025-10/web-components/layout-and-structure/unordered-list) ### Available APIs * [Block Extension API](https://shopify.dev/docs/api/admin-extensions/2025-10/target-apis/core-apis/block-extension-api) Examples ### Examples * #### ##### Description Create a block extension that shows delivery preferences and scheduling information for a specific company location. This example demonstrates how to present location-specific operational details. ##### jsx ```jsx import {render} from 'preact'; import {useState, useEffect} from 'preact/hooks'; export default async () => { render(, document.body); }; const Extension = () => { const [locationData, setLocationData] = useState(null); const [loading, setLoading] = useState(true); useEffect(() => { const fetchLocationData = async () => { const locationId = shopify.data.selected[0].id; try { // Fetch location details from GraphQL Admin API const {data} = await shopify.query( ` query GetCompanyLocation($id: ID!) { companyLocation(id: $id) { id name shippingAddress { address1 city province zip } company { id name } } } `, {variables: {id: locationId}} ); // Fetch custom delivery preferences from your app's backend const preferencesResponse = await fetch( `https://your-app.com/api/location-preferences?id=${locationId}` ); const preferences = await preferencesResponse.json(); setLocationData({ location: data.companyLocation, preferences, }); } catch (err) { console.error('Error fetching location data:', err); } finally { setLoading(false); } }; fetchLocationData(); }, []); if (loading) { return ( Loading preferences... ); } if (!locationData) { return ( Unable to load delivery preferences ); } const {location, preferences} = locationData; return ( Preferred Delivery Days {preferences.deliveryDays.join(', ')} Delivery Window {preferences.deliveryWindowStart} - {preferences.deliveryWindowEnd} Special Instructions {preferences.specialInstructions || 'No special instructions'} Receiving Contact {preferences.receivingContact.name} {preferences.receivingContact.phone} {preferences.requiresAppointment && ( <> Appointment required for delivery )} shopify.navigation.navigate('extension://edit-preferences-action')} variant="secondary" > Edit Preferences ); }; ``` * #### ##### Description Create a block extension that shows product inventory allocated to this specific location based on custom allocation rules. This example demonstrates location-specific inventory management. ##### jsx ```jsx import {render} from 'preact'; import {useState, useEffect} from 'preact/hooks'; export default async () => { render(, document.body); }; const Extension = () => { const [inventory, setInventory] = useState(null); const [loading, setLoading] = useState(true); useEffect(() => { const fetchInventory = async () => { const locationId = shopify.data.selected[0].id; try { // Fetch inventory allocation from your app's backend const response = await fetch( `https://your-app.com/api/location-inventory?id=${locationId}` ); const data = await response.json(); setInventory(data); } catch (err) { console.error('Error fetching inventory:', err); } finally { setLoading(false); } }; fetchInventory(); }, []); if (loading) { return ( ); } if (!inventory || !inventory.items || inventory.items.length === 0) { return ( No inventory allocated to this location ); } return ( Total Items Allocated {inventory.totalItems} Across {inventory.items.length} product types Top Allocated Products {inventory.items.slice(0, 5).map((item) => ( {item.productName} {item.quantity} units ))} {inventory.lowStockItems > 0 && ( <> {inventory.lowStockItems} items below minimum threshold )} shopify.navigation.navigate('extension://manage-allocation-action')} variant="secondary" > Manage Allocation ); }; ``` *** ## Best practices * **Focus on B2B workflows:** [Companies](https://shopify.dev/docs/apps/build/b2b) are used for B2B commerce, so design your extensions to support wholesale operations, multi-location management, and credit-based purchasing that align with merchant needs. * **Handle multi-location scenarios:** Companies often have [multiple locations](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company#field-Company.fields.locations) with different needs. Design your extensions to work effectively when dealing with company hierarchies and location-specific data. * **Display financial context clearly:** When showing credit limits or outstanding balances, include context like credit utilization percentage, payment history metrics (on-time payment rate, average days to payment), and aging of receivables. Raw numbers without context don't help merchants make credit decisions. *** ## Limitations * **Single target per module:** Each `[[extensions.targeting]]` entry in your [TOML configuration](https://shopify.dev/docs/api/admin-extensions/2025-10#configuration) maps one target to one module file. * **Location context access:** Extensions on the `admin.company-location-details.block.render` target receive a location ID, not the parent company ID. To access company information, query the location ID and access the [`company` field on the `CompanyLocation` object](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation#field-CompanyLocation.fields.company). * **B2B requirement:** The [GraphQL `Company` object](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company) requires the store to be on a plan that supports B2B capabilities. * **Block target visibility:** Block extensions must be manually [added and pinned](https://help.shopify.com/manual/apps/working-with-apps#add-app-blocks-to-your-shopify-admin) by merchants before they appear. * **Block collapse behavior:** Returning `null` from a block extension collapses the block rather than removing it from the page. Blocks can't be fully hidden at runtime. ***