Welcome to the April 2022 edition of our API features roundup, designed to help you understand how you can adopt some of the latest changes to improve the quality of your apps and streamline your development experience.
This version includes the all-new Customer Segmentation API. It also includes new features to track fulfillment with fulfillment and delivery time data and offers improved visibility into Product Taxonomy.
This version also adds new features for offering discounts using the App Subscription API and includes updates to the Storefront API that make it possible to get delivery quotes from the cart API.
This release also coincides with the removal of version 2021-04, so remember to check your API health report to make sure you’re compatible and review the changes coming.
For a full list of API changes associated with this version, visit the 2022-04 release notes.
1. Customer Segmentation
Customer Segments is a new feature that is replacing Customer Saved Searches. In the past, Customer Saved Searches only allowed for free-text searches across customers.
This means that a search for “Madison” might yield customers named Madison, people who live in Madison, Wisconsin, or people who have an address on Madison Ave. Unfortunately, there was no way to differentiate between these results and return customers that were important to you using Saved Searches.
Customer Segments are much more powerful. Segments allow you to specify which customer fields need to match to be a group member. For example, segments might include things like:
- Customers that purchased a particular product.
- People from a specific city.
- Customers who have spent a certain amount of money on the shop.
Merchants can then use this information to send marketing material to customers in a certain segment or learn more about segment member behaviors.
To create a new segment using the API, you can use the
segmentCreate mutation, using a name, and the query that you’d like to use to segment customers:
For more examples and to see all of the queries and mutations available to manage segments, visit our documentation on the segmentation API at shopify.dev.
2. Product Taxonomy
Standard Product types, launched as a part of the 2022-01 release, help store owners keep their products organized on the storefront. As of the 2022-04 release, an API is available to get information about all of the standard product types that Shopify supports. This information is accessible through
productTaxonomyNodes through the GraphQL API.
The following query will get all of the product taxonomy nodes that are related to jewelry:
When creating a product, you can use the provided standard type taxonomy values to ensure that products will show up exactly where they belong on the storefront.
3. Fulfillment Time & Delivery Time
Three new fields are now available through the API to help understand the fulfillment and shipping expectations for fulfillment orders created through marketplaces. These fields are especially important for marketplaces that have a delivery guarantee.
For example, merchants might need to fulfill some orders earlier than others to meet customer delivery expectations.
The three new fields that are available on fulfillment orders are:
minDeliveryDateTime: This is the earliest date and time by which the delivery is expected to be completed.
maxDeliveryDateTime: This is the latest date and time by which the delivery is expected to be completed.
fulfillBy: This is the latest date and time by which the store owner should fulfill all items in the fulfillment order to meet the delivery deadlines for the order.
All of these fields are available in GraphQL, and can be fetched from fulfillment orders:
4. App Subscription Billing Discounts
As of the 2022-04 version, you can use the discount field as a part of the
appSubscriptionCreate mutation to offer a subscription discount for recurring charges. These discounts can be percentage-based or a flat amount discounted from the subscription cost.
App subscription discounts can also apply to a set number of billing cycles. For example, you can offer a merchant 50% off for 3 billing cycles before having the price return to normal.
A mutation creating a subscription with a 50% discount, applied for 3 months:
For more examples of recurring charge discounts, visit our documentation at shopify.dev.
5. Storefront API Cart Update
CartDeliveryGroups allow apps using the Storefront API to easily surface information about delivery options for one or more line items to a specific address. As long as a customer is logged in, you’ll be able to get information about eligible delivery options right from the cart.
CartDeliveryGroup object includes the destination address for a delivery group and the delivery options available for the line items in that group. Delivery options include the name, code, description, and price of the shipping method.
Stay on top of changes
For all Shopify platform changes, make sure to subscribe to the developer changelog, the primary source of information for all new product launches. Stay up to date using the changelog, and stay ahead of the curve by adopting new features as soon as they’re shipped into the upcoming 2022-07 release candidate.
You can also subscribe to our monthly What’s New for Partners and Developers at Shopify newsletter, which will help keep you on top of all platform updates.
Stay in the know
Subscribe to receive What’s New with Shopify, our monthly email featuring Shopify’s latest product news.
Thanks for signing up!
Let’s grow your digital business
Get design inspiration, development tips, and practical takeaways delivered straight to your inbox.
No charge. Unsubscribe anytime.