www/apps/resources/app/commerce-modules/loyalty/module-options/page.mdx
import { Table } from "docs-ui"
export const metadata = {
title: Loyalty Plugin Options,
}
In this guide, you'll learn about the options you can pass to the Loyalty Plugin.
module.exports = defineConfig({
// ...
plugins: [
{
resolve: "@medusajs/loyalty-plugin",
options: {
prefix: "GC",
sections: 3,
},
},
],
})
`prefix`
</Table.Cell>
<Table.Cell>
A string indicating the prefix added to auto-generated gift card codes. For example, setting `prefix` to `GC` generates codes in the format `GC-XXXX-XXXX-XXXX-XXXX`. (Available since [v2.17.2](https://github.com/medusajs/medusa/releases/tag/v2.17.2))
</Table.Cell>
<Table.Cell>
No
</Table.Cell>
<Table.Cell>
`GIFT`
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
`sections`
</Table.Cell>
<Table.Cell>
A number indicating how many 4-character sections the generated gift card code contains. For example, setting `sections` to `3` generates codes in the format `GIFT-XXXX-XXXX-XXXX`. (Available since [v2.17.2](https://github.com/medusajs/medusa/releases/tag/v2.17.2))
</Table.Cell>
<Table.Cell>
No
</Table.Cell>
<Table.Cell>
`4`
</Table.Cell>
</Table.Row>
</Table.Body>
</Table>