# Action Extension API This API is available to all action extension types. Refer to the [tutorial](/docs/apps/admin/admin-actions-and-blocks/build-an-admin-action) for more information. ## ActionExtensionApi ### ActionExtensionApi ### close Closes the extension. Calling this method is equivalent to the merchant clicking the "x" in the corner of the overlay. ### data Information about the currently viewed or selected items. ### extension The identifier of the running extension target. ### i18n Utilities for translating content according to the current localization of the admin. More info - https://shopify.dev/docs/apps/checkout/best-practices/localizing-ui-extensions ### intents Provides information to the receiver the of an intent. ### query Used to query the Admin GraphQL API ### ExtensionTarget keyof ExtensionTargets ### ExtensionTargets ### Playground ### admin.customers.segmentation-templates.render Renders a [`CustomerSegmentTemplate`](/docs/api/admin-extensions/components/customersegmenttemplate) in the [customer segment editor](https://help.shopify.com/en/manual/customers/customer-segmentation/customer-segments). ### admin.product-details.block.render Renders an Admin Block in the product details page. See the [list of available components](/docs/api/admin-extensions/components). ### admin.order-details.block.render Renders an Admin Block in the order details page. See the [list of available components](/docs/api/admin-extensions/components). ### admin.customer-details.block.render Renders an Admin Block in the customer details page. See the [list of available components](/docs/api/admin-extensions/components). ### admin.product-details.action.render Renders an Admin Action in the product details page. Open this extension from the "More Actions" menu. See the [list of available components](/docs/api/admin-extensions/components). ### admin.order-details.action.render Renders an Admin Action in the order details page. Open this extension from the "More Actions" menu. See the [list of available components](/docs/api/admin-extensions/components). ### admin.customer-details.action.render Renders an Admin Action in the customer details page. Open this extension from the "More Actions" menu. See the [list of available components](/docs/api/admin-extensions/components). ### admin.customer-segment-details.action.render Renders an Admin Action in the customer segment details page. Open this extension from the "Use segment" button. See the [list of available components](/docs/api/admin-extensions/components). ### admin.product-index.action.render Renders an Admin Action in the product index page. Open this extension from the "More Actions" menu. See the [list of available components](/docs/api/admin-extensions/components). ### admin.order-index.action.render Renders an Admin Action in the order index page. Open this extension from the "More Actions" menu. See the [list of available components](/docs/api/admin-extensions/components). ### admin.customer-index.action.render Renders an Admin Action in the customer index page. Open this extension from the "More Actions" menu. See the [list of available components](/docs/api/admin-extensions/components). ### admin.product-index.selection-action.render Renders an Admin Action 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](/docs/api/admin-extensions/components). ### admin.order-index.selection-action.render Renders an Admin Action 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](/docs/api/admin-extensions/components). ### admin.customer-index.selection-action.render Renders an Admin Action 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](/docs/api/admin-extensions/components). ### admin.product-details.configuration.render Renders Product Configuration on product details and product variant details See the [tutorial](/docs/apps/selling-strategies/bundles/product-config) for more information ### admin.product-variant-details.configuration.render Renders Product Configuration on product details and product variant details See the [tutorial](/docs/apps/selling-strategies/bundles/product-config) for more information ### admin.settings.internal-order-routing-rule.render Renders Order Routing Rule Configuration on order routing settings. See the [list of available components](/docs/api/admin-extensions/components). ### admin.settings.order-routing-rule.render ### RenderExtension export interface RenderExtension< Api, AllowedComponents extends RemoteComponentType< string, any, any > = RemoteComponentType, > { ( connection: RenderExtensionConnection, api: Api, ): void | Promise; } ### StandardApi The following APIs are provided to all extension targets. ### extension The identifier of the running extension target. ### i18n Utilities for translating content according to the current localization of the admin. More info - https://shopify.dev/docs/apps/checkout/best-practices/localizing-ui-extensions ### intents Provides information to the receiver the of an intent. ### query Used to query the Admin GraphQL API ### I18n ### 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. ### 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. ### 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. ### 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 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") */ ( key: string, options?: {[placeholderKey: string]: ReplacementType | string | number}, ): ReplacementType extends string | number ? string : (string | ReplacementType)[]; } ### Intents ### launchUrl The URL that was used to launch the intent. ### ApiVersion Union of supported API versions '2023-04' | '2023-07' | '2023-10' | 'unstable' ### AllComponents See the [list of available components](/docs/api/admin-extensions/components). AllComponents ### CustomerSegmentTemplateApi ### i18n Utilities for translating content according to the current localization of the admin. More info - https://shopify.dev/docs/apps/checkout/best-practices/localizing-ui-extensions ### __enabledFeatures ### extension The identifier of the running extension target. ### intents Provides information to the receiver the of an intent. ### query Used to query the Admin GraphQL API ### CustomerSegmentTemplateComponent CustomerSegmentTemplateComponent ### BlockExtensionApi ### data Information about the currently viewed or selected items. ### 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`). ### extension The identifier of the running extension target. ### i18n Utilities for translating content according to the current localization of the admin. More info - https://shopify.dev/docs/apps/checkout/best-practices/localizing-ui-extensions ### intents Provides information to the receiver the of an intent. ### query Used to query the Admin GraphQL API ### Navigation ### navigate Navigate to a specific route. ### ProductDetailsConfigurationApi ### data ### extension The identifier of the running extension target. ### i18n Utilities for translating content according to the current localization of the admin. More info - https://shopify.dev/docs/apps/checkout/best-practices/localizing-ui-extensions ### intents Provides information to the receiver the of an intent. ### query Used to query the Admin GraphQL API ### Product ### id ### title ### handle ### status ### totalVariants ### totalInventory ### hasOnlyDefaultVariant ### onlineStoreUrl ### options ### productType ### productCategory ### productComponents ### ProductComponent ### id ### title ### featuredImage ### totalVariants ### productUrl ### componentVariantsCount ### nonComponentVariantsCount ### ProductConfigurationComponents ProductConfigurationComponents ### ProductVariantDetailsConfigurationApi ### data ### extension The identifier of the running extension target. ### i18n Utilities for translating content according to the current localization of the admin. More info - https://shopify.dev/docs/apps/checkout/best-practices/localizing-ui-extensions ### intents Provides information to the receiver the of an intent. ### query Used to query the Admin GraphQL API ### ProductVariant ### id ### sku ### barcode ### title ### displayName ### price ### compareAtPrice ### taxable ### taxCode ### weight ### selectedOptions ### productVariantComponents ### ProductVariantComponent ### id ### displayName ### title ### sku ### image ### productVariantUrl ### selectedOptions ### OrderRoutingRuleApi ### applyMetafieldsChange ### data ### extension The identifier of the running extension target. ### i18n Utilities for translating content according to the current localization of the admin. More info - https://shopify.dev/docs/apps/checkout/best-practices/localizing-ui-extensions ### intents Provides information to the receiver the of an intent. ### query Used to query the Admin GraphQL API ### ApplyMetafieldsChange (changes: MetafieldsChange[]) => void ### MetafieldsChange MetafieldUpdateChange | MetafieldRemoveChange | MetafieldUpdateChange[] | MetafieldRemoveChange[] ### MetafieldUpdateChange ### type ### key ### namespace ### value ### valueType ### Metafield ### id ### key ### value ### namespace ### type ### SupportedDefinitionType typeof supportedDefinitionTypes[number] ### MetafieldRemoveChange ### type ### key ### namespace ### OrderRoutingComponents "InternalLocationList" & { readonly type?: "InternalLocationList"; readonly props?: InternalLocationListProps; readonly children?: true; } ### InternalLocationListProps ### locationGroups An array of location groups. ### onMoveGroup Callback when a location group is moved. It receives the old index and the new index as parameters. ### onRenameGroup Callback when a location group is renamed. It receives the id of the group and the new name as parameters. ### onDeleteGroup Callback when a location group is deleted. It receives the id of the group as a parameter. ### onMoveTag Callback when a tag is moved from one group to another. It receives the id of the tag, the old group index, and the new group index as parameters. ### onCreateGroup Callback when a new group is created. It receives the id of the new group as a parameter. ### LocationGroup ### locations An array of locations within the group. ### label The label for the location group. ### id A unique identifier for the location group. ### Location ### id A unique identifier for the location. ### name The name of the location.