Targets
This is a list of all the available extension targets for Admin UI extensions.
Anchor to extensiontargetsExtensionTargets
- Anchor to admin.abandoned-checkout-details.action.renderadmin.abandoned-checkout-details.action.renderadmin.abandoned-checkout-details.action.renderRenderExtension< ActionExtensionApi<'admin.abandoned-checkout-details.action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.abandoned-checkout-details.action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the abandonded checkout page. Open this extension from the "More Actions" menu.
See the list of available components.
- Anchor to admin.collection-details.action.renderadmin.collection-details.action.renderadmin.collection-details.action.renderRenderExtension< ActionExtensionApi<'admin.collection-details.action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.collection-details.action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the collection details page. Open this extension from the "More Actions" menu.
See the list of available components.
- Anchor to admin.collection-index.action.renderadmin.collection-index.action.renderadmin.collection-index.action.renderRenderExtension< ActionExtensionApi<'admin.collection-index.action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.collection-index.action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the collection index page. Open this extension from the "More Actions" menu.
See the list of available components.
- Anchor to admin.customer-details.action.renderadmin.customer-details.action.renderadmin.customer-details.action.renderRenderExtension< ActionExtensionApi<'admin.customer-details.action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.customer-details.action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the customer details page. Open this extension from the "More Actions" menu.
See the list of available components.
- Anchor to admin.customer-details.block.renderadmin.customer-details.block.renderadmin.customer-details.block.renderRenderExtension< BlockExtensionApi<'admin.customer-details.block.render'>, AllComponents >RenderExtension< BlockExtensionApi<'admin.customer-details.block.render'>, AllComponents >requiredrequired
Renders an Admin Block in the customer details page.
See the list of available components.
- Anchor to admin.customer-index.action.renderadmin.customer-index.action.renderadmin.customer-index.action.renderRenderExtension< ActionExtensionApi<'admin.customer-index.action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.customer-index.action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the customer index page. Open this extension from the "More Actions" menu.
See the list of available components.
- Anchor to admin.customer-index.selection-action.renderadmin.customer-index.selection-action.renderadmin.customer-index.selection-action.renderRenderExtension< ActionExtensionApi<'admin.customer-index.selection-action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.customer-index.selection-action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the customer index page when multiple resources are selected. Open this extension from the "More Actions" menu of the resource list. The resource ids are available to this extension at runtime.
See the list of available components.
- Anchor to admin.customer-segment-details.action.renderadmin.customer-segment-details.action.renderadmin.customer-segment-details.action.renderRenderExtension< ActionExtensionApi<'admin.customer-segment-details.action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.customer-segment-details.action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the customer segment details page. Open this extension from the "Use segment" button.
See the list of available components.
- Anchor to admin.customers.segmentation-templates.renderadmin.customers.segmentation-templates.renderadmin.customers.segmentation-templates.renderRenderExtension< CustomerSegmentTemplateApi<'admin.customers.segmentation-templates.render'>, CustomerSegmentTemplateComponent >RenderExtension< CustomerSegmentTemplateApi<'admin.customers.segmentation-templates.render'>, CustomerSegmentTemplateComponent >requiredrequired
Renders a
in the customer segment editor.- Anchor to admin.discount-details.action.renderadmin.discount-details.action.renderadmin.discount-details.action.renderRenderExtension< ActionExtensionApi<'admin.discount-details.action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.discount-details.action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the discount details page. Open this extension from the "More Actions" menu.
See the list of available components.
- Anchor to admin.discount-index.action.renderadmin.discount-index.action.renderadmin.discount-index.action.renderRenderExtension< ActionExtensionApi<'admin.discount-index.action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.discount-index.action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the discount index page. Open this extension from the "More Actions" menu.
See the list of available components.
- Anchor to admin.draft-order-details.action.renderadmin.draft-order-details.action.renderadmin.draft-order-details.action.renderRenderExtension< ActionExtensionApi<'admin.draft-order-details.action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.draft-order-details.action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the draft order details page. Open this extension from the "More Actions" menu.
See the list of available components.
- Anchor to admin.draft-order-index.action.renderadmin.draft-order-index.action.renderadmin.draft-order-index.action.renderRenderExtension< ActionExtensionApi<'admin.draft-order-index.action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.draft-order-index.action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the draft orders page. Open this extension from the "More Actions" menu.
See the list of available components.
- Anchor to admin.draft-order-index.selection-action.renderadmin.draft-order-index.selection-action.renderadmin.draft-order-index.selection-action.renderRenderExtension< ActionExtensionApi<'admin.draft-order-index.selection-action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.draft-order-index.selection-action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the draft order page when multiple resources are selected. Open this extension from the "3-dot" menu.
See the list of available components.
- Anchor to admin.order-details.action.renderadmin.order-details.action.renderadmin.order-details.action.renderRenderExtension< ActionExtensionApi<'admin.order-details.action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.order-details.action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the order details page. Open this extension from the "More Actions" menu.
See the list of available components.
- Anchor to admin.order-details.block.renderadmin.order-details.block.renderadmin.order-details.block.renderRenderExtension< BlockExtensionApi<'admin.order-details.block.render'>, AllComponents >RenderExtension< BlockExtensionApi<'admin.order-details.block.render'>, AllComponents >requiredrequired
Renders an Admin Block in the order details page.
See the list of available components.
- Anchor to admin.order-fulfilled-card.action.renderadmin.order-fulfilled-card.action.renderadmin.order-fulfilled-card.action.renderRenderExtension< ActionExtensionApi<'admin.order-fulfilled-card.action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.order-fulfilled-card.action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the order fulfilled card. Open this extension from the "3-dot" menu inside the order fulfilled card. Note: This extension will only be visible on orders which were fulfilled by your app.
See the list of available components.
- Anchor to admin.order-index.action.renderadmin.order-index.action.renderadmin.order-index.action.renderRenderExtension< ActionExtensionApi<'admin.order-index.action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.order-index.action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the order index page. Open this extension from the "More Actions" menu.
See the list of available components.
- Anchor to admin.order-index.selection-action.renderadmin.order-index.selection-action.renderadmin.order-index.selection-action.renderRenderExtension< ActionExtensionApi<'admin.order-index.selection-action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.order-index.selection-action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the order index page when multiple resources are selected. Open this extension from the "More Actions" menu of the resource list. The resource ids are available to this extension at runtime.
See the list of available components.
- Anchor to admin.product-details.action.renderadmin.product-details.action.renderadmin.product-details.action.renderRenderExtension< ActionExtensionApi<'admin.product-details.action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.product-details.action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the product details page. Open this extension from the "More Actions" menu.
See the list of available components.
- Anchor to admin.product-details.block.renderadmin.product-details.block.renderadmin.product-details.block.renderRenderExtension< BlockExtensionApi<'admin.product-details.block.render'>, AllComponents >RenderExtension< BlockExtensionApi<'admin.product-details.block.render'>, AllComponents >requiredrequired
Renders an Admin Block in the product details page.
See the list of available components.
- Anchor to admin.product-details.configuration.renderadmin.product-details.configuration.renderadmin.product-details.configuration.renderRenderExtension< ProductDetailsConfigurationApi<'admin.product-details.configuration.render'>, ProductConfigurationComponents >RenderExtension< ProductDetailsConfigurationApi<'admin.product-details.configuration.render'>, ProductConfigurationComponents >requiredrequired
Renders Product Configuration on product details and product variant details
See the tutorial for more information
- Anchor to admin.product-index.action.renderadmin.product-index.action.renderadmin.product-index.action.renderRenderExtension< ActionExtensionApi<'admin.product-index.action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.product-index.action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the product index page. Open this extension from the "More Actions" menu.
See the list of available components.
- Anchor to admin.product-index.selection-action.renderadmin.product-index.selection-action.renderadmin.product-index.selection-action.renderRenderExtension< ActionExtensionApi<'admin.product-index.selection-action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.product-index.selection-action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the product index page when multiple resources are selected. Open this extension from the "More Actions" menu of the resource list. The resource ids are available to this extension at runtime.
See the list of available components.
- Anchor to admin.product-variant-details.action.renderadmin.product-variant-details.action.renderadmin.product-variant-details.action.renderRenderExtension< ActionExtensionApi<'admin.product-variant-details.action.render'>, AllComponents >RenderExtension< ActionExtensionApi<'admin.product-variant-details.action.render'>, AllComponents >requiredrequired
Renders an admin action extension in the product variant details page. Open this extension from the "More Actions" menu.
See the list of available components.
- Anchor to admin.product-variant-details.configuration.renderadmin.product-variant-details.configuration.renderadmin.product-variant-details.configuration.renderRenderExtension< ProductVariantDetailsConfigurationApi<'admin.product-variant-details.configuration.render'>, ProductConfigurationComponents >RenderExtension< ProductVariantDetailsConfigurationApi<'admin.product-variant-details.configuration.render'>, ProductConfigurationComponents >requiredrequired
Renders Product Configuration on product details and product variant details
See the tutorial for more information
- Anchor to admin.settings.internal-order-routing-rule.renderadmin.settings.internal-order-routing-rule.renderadmin.settings.internal-order-routing-rule.renderRenderExtension< OrderRoutingRuleApi<'admin.settings.internal-order-routing-rule.render'>, AllComponents | OrderRoutingComponents >RenderExtension< OrderRoutingRuleApi<'admin.settings.internal-order-routing-rule.render'>, AllComponents | OrderRoutingComponents >requiredrequired
Renders Order Routing Rule Configuration on order routing settings.
See the list of available components.
- Anchor to admin.settings.order-routing-rule.renderadmin.settings.order-routing-rule.renderadmin.settings.order-routing-rule.renderRenderExtension< OrderRoutingRuleApi<'admin.settings.order-routing-rule.render'>, AllComponents >RenderExtension< OrderRoutingRuleApi<'admin.settings.order-routing-rule.render'>, AllComponents >requiredrequired
- Anchor to admin.settings.validation.renderadmin.settings.validation.renderadmin.settings.validation.renderRenderExtension< ValidationSettingsApi<'admin.settings.validation.render'>, AllComponents >RenderExtension< ValidationSettingsApi<'admin.settings.validation.render'>, AllComponents >requiredrequired
Renders Validation Settings within a given validation's add and edit views.
See the list of available components.
RenderExtension
export interface RenderExtension<
Api,
AllowedComponents extends RemoteComponentType<
string,
any,
any
> = RemoteComponentType<any, any, any>,
> {
(
connection: RenderExtensionConnection<AllowedComponents>,
api: Api,
): void | Promise<void>;
}ActionExtensionApi
- close
Closes the extension. Calling this method is equivalent to the merchant clicking the "x" in the corner of the overlay.
() => void - data
Information about the currently viewed or selected items.
Data - extension
The identifier of the running extension target.
{ target: ExtensionTarget; } - i18n
Utilities for translating content according to the current localization of the admin. More info - /docs/apps/checkout/best-practices/localizing-ui-extensions
I18n - intents
Provides information to the receiver the of an intent.
Intents - query
Used to query the Admin GraphQL API
<Data = unknown, Variables = { [key: string]: unknown; }>(query: string, options?: { variables?: Variables; version?: Omit<ApiVersion, "2023-04">; }) => Promise<{ data?: Data; errors?: GraphQLError[]; }>
export interface ActionExtensionApi<ExtensionTarget extends AnyExtensionTarget>
extends StandardApi<ExtensionTarget> {
/**
* Closes the extension. Calling this method is equivalent to the merchant clicking the "x" in the corner of the overlay.
*/
close: () => void;
/**
* Information about the currently viewed or selected items.
*/
data: Data;
}Data
- selected
Information about the currently viewed or selected items.
{ id: string; }[]
export interface Data {
/**
* Information about the currently viewed or selected items.
*/
selected: {id: string}[];
}ExtensionTarget
keyof ExtensionTargetsI18n
- formatCurrency
Returns a localized currency value. This function behaves like the standard `Intl.NumberFormat()` with a style of `currency` applied. It uses the buyer's locale by default.
(number: number | bigint, options?: { inExtensionLocale?: boolean; } & NumberFormatOptions) => string - formatDate
Returns a localized date value. This function behaves like the standard `Intl.DateTimeFormatOptions()` and uses the buyer's locale by default. Formatting options can be passed in as options.
(date: Date, options?: { inExtensionLocale?: boolean; } & DateTimeFormatOptions) => string - formatNumber
Returns a localized number. This function behaves like the standard `Intl.NumberFormat()` with a style of `decimal` applied. It uses the buyer's locale by default.
(number: number | bigint, options?: { inExtensionLocale?: boolean; } & NumberFormatOptions) => string - translate
Returns translated content in the buyer's locale, as supported by the extension. - `options.count` is a special numeric value used in pluralization. - The other option keys and values are treated as replacements for interpolation. - If the replacements are all primitives, then `translate()` returns a single string. - If replacements contain UI components, then `translate()` returns an array of elements.
I18nTranslate
export interface I18n {
/**
* Returns a localized number.
*
* This function behaves like the standard `Intl.NumberFormat()`
* with a style of `decimal` applied. It uses the buyer's locale by default.
*
* @param options.inExtensionLocale - if true, use the extension's locale
*/
formatNumber: (
number: number | bigint,
options?: {inExtensionLocale?: boolean} & Intl.NumberFormatOptions,
) => string;
/**
* Returns a localized currency value.
*
* This function behaves like the standard `Intl.NumberFormat()`
* with a style of `currency` applied. It uses the buyer's locale by default.
*
* @param options.inExtensionLocale - if true, use the extension's locale
*/
formatCurrency: (
number: number | bigint,
options?: {inExtensionLocale?: boolean} & Intl.NumberFormatOptions,
) => string;
/**
* Returns a localized date value.
*
* This function behaves like the standard `Intl.DateTimeFormatOptions()` and uses
* the buyer's locale by default. Formatting options can be passed in as
* options.
*
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat0
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options
*
* @param options.inExtensionLocale - if true, use the extension's locale
*/
formatDate: (
date: Date,
options?: {inExtensionLocale?: boolean} & Intl.DateTimeFormatOptions,
) => string;
/**
* Returns translated content in the buyer's locale,
* as supported by the extension.
*
* - `options.count` is a special numeric value used in pluralization.
* - The other option keys and values are treated as replacements for interpolation.
* - If the replacements are all primitives, then `translate()` returns a single string.
* - If replacements contain UI components, then `translate()` returns an array of elements.
*/
translate: I18nTranslate;
}I18nTranslate
This defines the i18n.translate() signature.
export interface I18nTranslate {
/**
* This returns a translated string matching a key in a locale file.
*
* @example translate("banner.title")
*/
<ReplacementType = string>(
key: string,
options?: Record<string, ReplacementType | string | number>,
): ReplacementType extends string | number
? string
: (string | ReplacementType)[];
}Intents
- launchUrl
The URL that was used to launch the intent.
string | URL
export interface Intents {
/**
* The URL that was used to launch the intent.
*/
launchUrl?: string | URL;
}ApiVersion
Union of supported API versions
'2023-04' | '2023-07' | '2023-10' | '2024-01' | '2024-04' | 'unstable'GraphQLError
GraphQL error returned by the Shopify Admin API.
- locations
{ line: number; column: string; } - message
string
export interface GraphQLError {
message: string;
locations: {
line: number;
column: string;
};
}AllComponents
See the [list of available components](/docs/api/admin-extensions/components).
anyBlockExtensionApi
- data
Information about the currently viewed or selected items.
Data - extension
The identifier of the running extension target.
{ target: ExtensionTarget; } - i18n
Utilities for translating content according to the current localization of the admin. More info - /docs/apps/checkout/best-practices/localizing-ui-extensions
I18n - intents
Provides information to the receiver the of an intent.
Intents - navigation
Provides methods to navigate to other features in the Admin. Currently, only navigation from an admin block to an admin action extension *on the same resource page* is supported. For example, you can navigate from an admin block on the product details page (`admin.product-details.block.render`) to an admin action on the product details page (`admin.product-details.action.render`).
Navigation - query
Used to query the Admin GraphQL API
<Data = unknown, Variables = { [key: string]: unknown; }>(query: string, options?: { variables?: Variables; version?: Omit<ApiVersion, "2023-04">; }) => Promise<{ data?: Data; errors?: GraphQLError[]; }>
export interface BlockExtensionApi<ExtensionTarget extends AnyExtensionTarget>
extends StandardApi<ExtensionTarget> {
/**
* Information about the currently viewed or selected items.
*/
data: Data;
/**
* Provides methods to navigate to other features in the Admin. Currently, only navigation from an admin block to an admin action extension *on the same resource page* is supported.
* For example, you can navigate from an admin block on the product details page (`admin.product-details.block.render`) to an admin action on the product details page (`admin.product-details.action.render`).
*/
navigation: Navigation;
}Navigation
- navigate
Navigate to a specific route.
(url: string | URL) => void
export interface Navigation {
/**
* Navigate to a specific route.
*
* @example navigation.navigate('extension://my-admin-action-extension-handle')
*/
navigate: (url: string | URL) => void;
}CustomerSegmentTemplateApi
- __enabledFeatures
"b2bEnabled"[] - extension
The identifier of the running extension target.
{ target: ExtensionTarget; } - i18n
Utilities for translating content according to the current localization of the admin. More info - /docs/apps/checkout/best-practices/localizing-ui-extensions
I18n - intents
Provides information to the receiver the of an intent.
Intents - query
Used to query the Admin GraphQL API
<Data = unknown, Variables = { [key: string]: unknown; }>(query: string, options?: { variables?: Variables; version?: Omit<ApiVersion, "2023-04">; }) => Promise<{ data?: Data; errors?: GraphQLError[]; }>
export interface CustomerSegmentTemplateApi<
ExtensionTarget extends AnyExtensionTarget,
> extends StandardApi<ExtensionTarget> {
/* Utilities for translating content according to the current `localization` of the admin. */
i18n: I18n;
/** @private */
__enabledFeatures: CustomerSegmentationFeature[];
}CustomerSegmentTemplateComponent
anyProductDetailsConfigurationApi
- data
{ product: Product; app: { launchUrl: string; applicationUrl: string; }; } - extension
The identifier of the running extension target.
{ target: ExtensionTarget; } - i18n
Utilities for translating content according to the current localization of the admin. More info - /docs/apps/checkout/best-practices/localizing-ui-extensions
I18n - intents
Provides information to the receiver the of an intent.
Intents - query
Used to query the Admin GraphQL API
<Data = unknown, Variables = { [key: string]: unknown; }>(query: string, options?: { variables?: Variables; version?: Omit<ApiVersion, "2023-04">; }) => Promise<{ data?: Data; errors?: GraphQLError[]; }>
export interface ProductDetailsConfigurationApi<
ExtensionTarget extends AnyExtensionTarget,
> extends StandardApi<ExtensionTarget> {
data: {
/* The product currently being viewed in the admin. */
product: Product;
app: {
launchUrl: string;
applicationUrl: string;
};
};
}Product
- handle
string - hasOnlyDefaultVariant
boolean - id
string - onlineStoreUrl
string - options
{ id: string; name: string; position: number; values: string[]; }[] - productCategory
string - productComponents
ProductComponent[] - productType
string - status
'ACTIVE' | 'ARCHIVED' | 'DRAFT' - title
string - totalInventory
number - totalVariants
number
interface Product {
id: string;
title: string;
handle: string;
status: 'ACTIVE' | 'ARCHIVED' | 'DRAFT';
totalVariants: number;
totalInventory: number;
hasOnlyDefaultVariant: boolean;
onlineStoreUrl?: string;
options: {
id: string;
name: string;
position: number;
values: string[];
}[];
productType: string;
productCategory?: string;
productComponents: ProductComponent[];
}ProductComponent
- componentVariantsCount
number - featuredImage
{ id?: string | null; url?: string | null; altText?: string | null; } | null - id
string - nonComponentVariantsCount
number - productUrl
string - title
string - totalVariants
number
export interface ProductComponent {
id: string;
title: string;
featuredImage?: {
id?: string | null;
url?: string | null;
altText?: string | null;
} | null;
totalVariants: number;
productUrl: string;
componentVariantsCount: number;
nonComponentVariantsCount: number;
}ProductConfigurationComponents
anyProductVariantDetailsConfigurationApi
- data
{ variant: ProductVariant; app: { launchUrl: string; applicationUrl: string; }; } - extension
The identifier of the running extension target.
{ target: ExtensionTarget; } - i18n
Utilities for translating content according to the current localization of the admin. More info - /docs/apps/checkout/best-practices/localizing-ui-extensions
I18n - intents
Provides information to the receiver the of an intent.
Intents - query
Used to query the Admin GraphQL API
<Data = unknown, Variables = { [key: string]: unknown; }>(query: string, options?: { variables?: Variables; version?: Omit<ApiVersion, "2023-04">; }) => Promise<{ data?: Data; errors?: GraphQLError[]; }>
export interface ProductVariantDetailsConfigurationApi<
ExtensionTarget extends AnyExtensionTarget,
> extends StandardApi<ExtensionTarget> {
data: {
/* The product variant currently being viewed in the admin. */
variant: ProductVariant;
app: {
launchUrl: string;
applicationUrl: string;
};
};
}ProductVariant
- barcode
string - compareAtPrice
string - displayName
string - id
string - price
string - productVariantComponents
ProductVariantComponent[] - selectedOptions
{ name: string; value: string; }[] - sku
string - taxable
boolean - taxCode
string - title
string - weight
number
interface ProductVariant {
id: string;
sku: string;
barcode: string;
title: string;
displayName: string;
price: string;
compareAtPrice: string;
taxable: boolean;
taxCode: string;
weight: number;
selectedOptions: {
name: string;
value: string;
}[];
productVariantComponents: ProductVariantComponent[];
}ProductVariantComponent
- displayName
string - id
string - image
{ id?: string | null; url?: string | null; altText?: string | null; } | null - productVariantUrl
string - selectedOptions
{ name: string; value: string; }[] - sku
string - title
string
export interface ProductVariantComponent {
id: string;
displayName: string;
title: string;
sku?: string;
image?: {
id?: string | null;
url?: string | null;
altText?: string | null;
} | null;
productVariantUrl: string;
selectedOptions: {
name: string;
value: string;
}[];
}OrderRoutingRuleApi
- applyMetafieldsChange
ApplyMetafieldsChange - data
Data - extension
The identifier of the running extension target.
{ target: ExtensionTarget; } - i18n
Utilities for translating content according to the current localization of the admin. More info - /docs/apps/checkout/best-practices/localizing-ui-extensions
I18n - intents
Provides information to the receiver the of an intent.
Intents - query
Used to query the Admin GraphQL API
<Data = unknown, Variables = { [key: string]: unknown; }>(query: string, options?: { variables?: Variables; version?: Omit<ApiVersion, "2023-04">; }) => Promise<{ data?: Data; errors?: GraphQLError[]; }>
export interface OrderRoutingRuleApi<ExtensionTarget extends AnyExtensionTarget>
extends StandardApi<ExtensionTarget> {
applyMetafieldsChange: ApplyMetafieldsChange;
data: Data;
}ApplyMetafieldsChange
- changes
MetafieldsChange[]
void(changes: MetafieldsChange[]) => voidMetafieldsChange
MetafieldUpdateChange | MetafieldRemoveChange | MetafieldUpdateChange[] | MetafieldRemoveChange[]MetafieldUpdateChange
- key
string - namespace
string - type
'updateMetafield' - value
string | number - valueType
SupportedDefinitionType
interface MetafieldUpdateChange {
type: 'updateMetafield';
key: string;
namespace?: string;
value: string | number;
valueType?: SupportedDefinitionType;
}SupportedDefinitionType
'boolean' | 'url' | 'collection_reference' | 'color' | 'date' | 'date_time' | 'dimension' | 'file_reference' | 'json' | 'metaobject_reference' | 'mixed_reference' | 'money' | 'multi_line_text_field' | 'number_decimal' | 'number_integer' | 'page_reference' | 'product_reference' | 'rating' | 'rich_text_field' | 'single_line_text_field' | 'product_taxonomy_value_reference' | 'variant_reference' | 'volume' | 'weight' | 'list.collection_reference' | 'list.color' | 'list.date' | 'list.date_time' | 'list.dimension' | 'list.file_reference' | 'list.metaobject_reference' | 'list.mixed_reference' | 'list.number_decimal' | 'list.number_integer' | 'list.page_reference' | 'list.product_reference' | 'list.rating' | 'list.single_line_text_field' | 'list.url' | 'list.variant_reference' | 'list.volume' | 'list.weight'MetafieldRemoveChange
- key
string - namespace
string - type
'removeMetafield'
interface MetafieldRemoveChange {
type: 'removeMetafield';
key: string;
namespace: string;
}OrderRoutingComponents
anyValidationSettingsApi
- applyMetafieldChange
Applies a change to the validation settings.
ApplyMetafieldChange - data
ValidationData - extension
The identifier of the running extension target.
{ target: ExtensionTarget; } - i18n
Utilities for translating content according to the current localization of the admin. More info - /docs/apps/checkout/best-practices/localizing-ui-extensions
I18n - intents
Provides information to the receiver the of an intent.
Intents - query
Used to query the Admin GraphQL API
<Data = unknown, Variables = { [key: string]: unknown; }>(query: string, options?: { variables?: Variables; version?: Omit<ApiVersion, "2023-04">; }) => Promise<{ data?: Data; errors?: GraphQLError[]; }>
export interface ValidationSettingsApi<
ExtensionTarget extends AnyExtensionTarget,
> extends StandardApi<ExtensionTarget> {
/**
* Applies a change to the validation settings.
*/
applyMetafieldChange: ApplyMetafieldChange;
data: ValidationData;
}ApplyMetafieldChange
- change
MetafieldChange
Promise<MetafieldChangeResult>(
change: MetafieldChange,
) => Promise<MetafieldChangeResult>MetafieldChange
MetafieldUpdateChange | MetafieldRemoveChangeMetafieldChangeResult
MetafieldChangeSuccess | MetafieldChangeResultErrorMetafieldChangeSuccess
- type
'success'
interface MetafieldChangeSuccess {
type: 'success';
}MetafieldChangeResultError
- message
string - type
'error'
interface MetafieldChangeResultError {
type: 'error';
message: string;
}ValidationData
The object that exposes the validation with its settings.
- shopifyFunction
ShopifyFunction - validation
Validation
export interface ValidationData {
validation?: Validation;
shopifyFunction: ShopifyFunction;
}ShopifyFunction
- id
the validation function's unique identifier
string
interface ShopifyFunction {
/**
* the validation function's unique identifier
*/
id: string;
}Validation
- id
the validation's gid when active in a shop
string - metafields
the metafields owned by the validation
Metafield[]
interface Validation {
/**
* the validation's gid when active in a shop
*/
id: string;
/**
* the metafields owned by the validation
*/
metafields: Metafield[];
}Metafield
- description
string - id
string - key
string - namespace
string - type
string - value
string
interface Metafield {
description?: string;
id: string;
namespace: string;
key: string;
value: string;
type: string;
}