Post-purchase extensions configuration
When you create a post-purchase extension, the shopify.extension.toml
file is automatically generated in your extension directory. This guide describes the properties that you can configure in shopify.extension.toml
.
Anchor to How it worksHow it works
You define properties for your extension in the extension configuration file. The shopify.extension.toml
file contains the extension's settings, which include the extension name and metafields.
When an extension is published to Shopify, the contents of the configuration file are pushed alongside the extension.
Anchor to Anatomy of a configuration fileAnatomy of a configuration file
The following example shows the properties in the shopify.extension.toml
file:
shopify.extension.toml
type = "post_purchase"
name = "checkout_post_purchase"
# [[metafields]]
# namespace: my-namespace
# key: my-key
# [[metafields]]
# namespace: my-namespace
# key: my-key-2
Property | Required? | Description |
---|---|---|
type | Yes | The type of extension. For checkout post-purchase extensions, this value is always checkout_post_purchase . |
name | Yes | The name of the checkout post-purchase extension. |
metafields | Yes | The metafields that your extension needs to read. You can specify up to five key and namespace pairs in the configuration file. When the extension is executed, Shopify looks for the metafields in each resource and returns their contents. |
Was this page helpful?