Skip to main content

Flows

Flows in Commerce

There are two scenarios for using flows:

  • Extend an existing resource, such as customers and orders.
  • Create a new resource, such as a blog, wishlist, or customer review.

Extend an existing resource

The most common usage of the Flows API is to extend existing resources, such as customers and orders. These types of resources are called core flows and are handled differently than non-core flows. See Core and non-core flows.

For example, you can extend the customer resource to store custom data, such as a user_profile field for customers. Or you might want to add an age field to store a customer's age.

Extending a resource applies only to core flows. When creating a new flow, make sure the slug matches that of a core resource listed in the following table.

Flow slugDescriptionAvailability Level
accountsExtend the account object.Store
account-membersExtend the account-members object.Store
account-membershipsExtend the account-membership object.Store
addressesExtend the address object.Store
authentication-realmsExtend the authentication-realms object.Store
cartsExtend the carts object.Organization/Store
cart_itemsExtend the cart_item object.Organization/Store
customersExtend the customer object. Note: Please use Account Management for all new frontend experiences.n/a
oidc-profilesExtend the oidc-profiles object.Store
order_itemsExtend the order_item object.Organization/Store
ordersExtend the order object.Organization/Store
password-profilesExtend the password-profiles object.Store
productsExtend the product object.Store
promotionsExtend the promotion.Store
user-authentication-infoExtend the user-authentication-info object.Store
user-authentication-oidc-profile-infoExtend the user-authentication-oidc-profile-info object.Store
user-authentication-password-profile-infoExtend the user-authentication-password-profile-info object.Store
catalogsExtend the catalog object. It will not extend the catalog-release object.Store

Create a new resource

You can create new resources to support product reviews, wish lists, blog articles, staff profile pages, and many more. These non-core flows are referred to as custom flows. See Core and non-core flows.

note

Custom APIs are the next generation of Non-Core Flows. Flows are not going anywhere, but Custom APIs offer enhanced capabilities. We recommend using Custom APIs for any of your new use cases.

Core and non-core flows

The following table describes the differences between core and non-core flows:

Core FlowsNon-core Flows
Extend an existing resource.Create a new resource.
Entries managed automatically by Commerce.Create and manage entries manually.
Requests are sent to the fields endpoint.Requests are sent to the entries endpoint.
caution

You cannot delete core flows after creating them with the API or Commerce Manager.

Flows taxonomy

Fields and entries are an integral part of flows. A flow describes a collection of fields. A field represents a single field of data. An entry is a specific instance of a flow, and is associated with a specific instance of an entity, such as a single customer. Entries for core flows (existing resources) are managed automatically for you.

In database terms, you can think of flows as tables, fields as columns, and entries as database records.

Templates in Product Experience Manager

Templates allow you to attach a specific set of attributes to your products.

  • You can use templates to define characteristics of your products.
  • You can use templates for Search Engine Optimization (SEO).

Template Taxonomy

Attributes and entries are integral to templates. A template describes a collection of attributes. An attribute represents a single characteristic, like color. An entry is a specific instance of an attribute, for example, blue, and is associated with a specific product.

A template is exactly the same as a flow except it has a different naming convention. The name of a template is in the format products(slug) where slug is the slug of a template.

Associating templates with products

Once you have created your template, and associated the temp with a product in Product Experience Manager, it becomes a template.

For example, if you create a template with a slug of SizeGuide then the template name is products(SizeGuide). You can then associate this template to all clothing products in your store and the slug is included in all the responses that contain products.

You can create product templates for both organization and store. In addition, stores can use organization templates for store-level products.

For more information about adding attributes, see Fields.