Elastic Path Flows API
### 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**](#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 slug | Description | Availability Level | |:--------------------------------------------|:-------------------------------| :---| | `accounts` | Extend the [`account`](/docs/api/accounts/account-management-introduction) object. | Store | | `account-members` | Extend the [`account-members`](/docs/api/accounts/account-members) object. | Store | | `account-memberships` | Extend the [`account-membership`](/docs/api/accounts/account-membership) object. | Store | | `addresses` | Extend the [`address`](/docs/api/addresses/account-addresses) object. | Store | | `authentication-realms` | Extend the [`authentication-realms`](/docs/api/single-sign-on/authentication-realms) object. | Store | | `carts` | Extend the [`carts`](/docs/api/carts/carts-checkout-orders-introduction) object. | Organization/Store | | `cart_items` | Extend the [`cart_item`](/docs/api/carts/cart-items) object. | Organization/Store | | `customers` | Extend the [`customer`](/docs/customer-management/customer-management-api/customer-management-api-overview) object. **Note**: Please use Account Management for all new frontend experiences. | n/a | | `oidc-profiles` | Extend the [`oidc-profiles`](/docs/api/single-sign-on/oidc-profiles) object. | Store | | `order_items` | Extend the [`order_item`](/docs/api/carts/get-order-items) object. | Organization/Store | | `orders` | Extend the [`order`](/docs/api/carts/orders) object. | Organization/Store | | `password-profiles` | Extend the [`password-profiles`](/docs/api/single-sign-on/password-profiles) object. | Store | | `products` | Extend the [`product`](/docs/api/pxm/products/products) object. | Store | | `promotions` | Extend the [`promotion`](/docs/api/promotions/promotions-standard-introduction) object. | Store | | `rule-promotions` | Extend the [`rule-promotion`](/docs/api/promotions-builder/create-rule-promotion) object. | Store | | `user-authentication-info` | Extend the [`user-authentication-info`](/docs/api/single-sign-on/user-authentication-infos) object. | Store | | `user-authentication-oidc-profile-info` | Extend the [`user-authentication-oidc-profile-info`](/docs/api/single-sign-on/user-authentication-oidc-profile-infos) object. | Store | | `user-authentication-password-profile-info` | Extend the [`user-authentication-password-profile-info`](/docs/api/single-sign-on/user-authentication-password-profile-infos) object. | Store | | `catalogs` | Extend the [`catalog`](/docs/api/pxm/catalog/catalogs) object. It will not extend the [`catalog-release`](/docs/api/pxm/catalog/releases) 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**](#core-and-non-core-flows). :::note [Custom APIs](/docs/api/commerce-extensions/custom-ap-is#custom-apis-vs-non-core-flows) 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 Flows | Non-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**](/docs/api/flows/create-an-entry-relationship) 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**](/docs/api/flows/create-an-entry-relationship) 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**](/docs/api/flows/fields).