You can create pre-order and TBYB options using the GraphQL Admin API's [`sellingPlanGroupCreate`](/docs/api/admin-graphql/latest/mutations/sellingplangroupcreate) mutation. This guide describes the requirements for creating pre-order or TBYB options and shows you how to manage them using the GraphQL Admin API. ## Requirements - Your app can make [authenticated requests](/docs/api/admin-graphql#authentication) to the GraphQL Admin API. - Your app has the following [access scopes](/docs/api/usage/access-scopes): - `write_products` - `read_all_orders` - `read_customer_payment_methods` - `read_purchase_options` - `write_purchase_options` - `read_payment_mandate` - `write_payment_mandate` Learn how to [configure your access scopes using Shopify CLI](/docs/apps/build/cli-for-apps/app-configuration). - You've familiarized yourself with [selling plans](/docs/apps/build/purchase-options) and [pre-orders and TBYB](/docs/apps/build/purchase-options/deferred). - You've created [products](/docs/api/admin-graphql/latest/products-and-collections/productcreate) and [product variants](/docs/api/admin-graphql/latest/products-and-collections/productvariantcreate) in your development store. - The merchant that you're developing for meets the [qualifying criteria](https://help.shopify.com/en/manual/products/subscriptions/setup#eligibility-requirements). > Note: > > - Most subscriptions, pre-order and try before you buy apps need to request API access through the [Partner Dashboard](/docs/apps/build/authentication-authorization/access-tokens/authorization-code-grant#ask-for-permission). We give API access to apps that are designed according to our [principles for subscriptions, pre-order and TBYB apps] (/docs/apps/selling-strategies/purchase-options#shopifys-principles). > - Public apps that use subscriptions, pre-order or TBYB need to meet [specific requirements](/docs/apps/launch/app-requirements-checklist#purchase-option-apps) to be published on the Shopify App Store. > - Custom apps [created in the Shopify admin](/docs/apps/build/authentication-authorization/access-tokens/generate-app-access-tokens-admin) can't use subscriptions, pre-order or TBYB because these apps can't use extensions or request access to protected scopes. If you're building a solution for a single store, then build your custom app in the Partner Dashboard. ## Step 1: Create pre-order and TBYB options > Caution: > Subscriptions, pre-orders, TBYB, and associated records, including `SellingPlanGroup`, `SellingPlan`, policies, and associations to products and variants, are deleted 48 hours after a user uninstalls a subscriptions, pre-orders, or TBYB app. Products and product variants aren't deleted. We recommend backing up Subscriptions, pre-orders, and TBYB records in case you need to restore them later. Create pre-order and TBYB options using the [`sellingPlanGroupCreate`](/docs/api/admin-graphql/latest/mutations/sellingplangroupcreate) mutation. The [`SellingPlanGroup`](/docs/api/admin-graphql/latest/objects/sellingplangroup) object includes one or more [`SellingPlan`](/docs/api/admin-graphql/latest/objects/sellingplan) objects. The `SellingPlan` object specifies how a product can be sold. Learn more about [GraphQL Admin API objects for selling plans](/docs/apps/build/purchase-options#graphql-admin-api-objects-for-purchase-options). For more information on input fields and values, refer to the following resources: - [`SellingPlanGroupInput`](/docs/api/admin-graphql/latest/input-objects/sellingplangroupinput) - [`SellingPlanInput`](/docs/api/admin-graphql/latest/input-objects/sellingplaninput) - [How pre-orders and TBYB work](/docs/apps/build/purchase-options/deferred#how-it-works) > Note: > `SellingPlan` objects are grouped together in Liquid when they are created by the same app, and when they have the same `selling_plan_group.name` and `selling_plan_group.options` values. For more information, refer to the [`selling_plan_group` object](/docs/api/liquid/objects/selling_plan_group).

Create a pre-order with a selling plan (SellingPlan) that contains the following policies:

The category field should be set to PRE_ORDER.

Create a try before you buy with a selling plan (SellingPlan) that contains the following policies:

The category field should be set to TRY_BEFORE_YOU_BUY.

## Step 2 (Optional): Manage pre-order and TBYB options ### Associate a pre-order or TBYB option to a product or product variant You can use the [`sellingPlanGroupAddProducts`](/docs/api/admin-graphql/latest/mutations/sellingplangroupaddproducts) mutation or the [`sellingPlanGroupAddProductVariants`](/docs/api/admin-graphql/latest/mutations/sellingPlanGroupAddProductVariants) mutation to make a separate request to associate a pre-order or TBYB option with a product or product variant, without having to delete and recreate the pre-order or TBYB option. ### Associate multiple pre-order or TBYB options to a product or product variant You can use the [`productJoinSellingPlanGroups`](/docs/api/admin-graphql/latest/mutations/productjoinsellingplangroups) mutation or the [`productVariantJoinSellingPlanGroups`](/docs/api/admin-graphql/latest/mutations/productvariantjoinsellingplangroups) mutation to associate multiple pre-orders or TBYB to a product or product variant. ### Edit pre-order and TBYB options You can use the [`sellingPlanGroupUpdate`](/docs/api/admin-graphql/latest/mutations/sellingplangroupupdate) mutation to edit the attributes associated with a pre-order or TBYB option. For example, you can change the pre-order or TBYB options `name`. ## Next steps - Learn about [shipping and delivery for pre-orders and TBYB](/docs/apps/build/purchase-options/deferred/delivery-and-deferment).