Commerce Flow

The following diagram represents Workarea as a system which takes catalog data as input and returns order data as output. Within Workarea, commerce flows through a continuous cycle, which is composed of 6 steps. Some steps are carried out by administrators in the Admin, while the others are completed by shoppers in the Storefront.

(Of course, this is merely a model to help conceptualize commerce from the perspective of Workarea. In reality, the flow of commerce through Workarea is non-linear and asynchronous, with events from all "steps" happening continously.)

Commerce flow diagram

The following sections map the 6 steps from the diagram to relevant models, view models, and services (the objects used to write to and read from the primary data store). Run the command from each section from the root of your application to list the pathnames of the relevant files within your version of Workarea.

1. Manage Catalog

echo "
$(bundle show workarea-core)/app/models/workarea/catalog/product.rb
$(bundle show workarea-core)/app/models/workarea/catalog/variant.rb
$(bundle show workarea-core)/app/models/workarea/catalog/product_image.rb
$(bundle show workarea-core)/app/models/workarea/pricing/sku.rb
$(bundle show workarea-core)/app/models/workarea/pricing/price.rb
$(bundle show workarea-core)/app/models/workarea/inventory/sku.rb
$(bundle show workarea-core)/app/models/workarea/shipping/sku.rb
$(bundle show workarea-core)/app/services/workarea/copy_product.rb
$(bundle show workarea-core)/app/models/workarea/shipping/service.rb
$(bundle show workarea-core)/app/models/workarea/shipping/rate.rb
$(bundle show workarea-core)/app/models/workarea/tax/category.rb
$(bundle show workarea-core)/app/models/workarea/tax/rate.rb
"

2. Merchandise Store

echo "
$(bundle show workarea-core)/app/models/workarea/release.rb
$(bundle show workarea-core)/app/models/workarea/release/changeset.rb
$(bundle show workarea-core)/app/models/workarea/catalog/category.rb
$(bundle show workarea-core)/app/models/workarea/product_rule.rb
$(bundle show workarea-core)/app/models/workarea/search/settings.rb
$(bundle show workarea-core)/app/models/workarea/search/customization.rb
$(bundle show workarea-core)/app/models/workarea/content.rb
$(bundle show workarea-core)/app/models/workarea/content/page.rb
$(bundle show workarea-core)/app/models/workarea/content/block.rb
$(bundle show workarea-core)/app/models/workarea/content/asset.rb
$(bundle show workarea-core)/app/models/workarea/navigation/redirect.rb
$(bundle show workarea-core)/app/models/workarea/navigation/taxon.rb
$(bundle show workarea-core)/app/models/workarea/navigation/menu.rb
$(bundle show workarea-core)/app/models/workarea/recommendation/settings.rb
$(bundle show workarea-core)/app/models/workarea/pricing/discount.rb
"

3. View Products

echo "
$(bundle show workarea-storefront)/app/view_models/workarea/storefront/product_view_model.rb
$(bundle show workarea-storefront)/app/view_models/workarea/storefront/category_view_model.rb
$(bundle show workarea-storefront)/app/view_models/workarea/storefront/search_view_model.rb
$(bundle show workarea-storefront)/app/view_models/workarea/storefront/search_suggestion_view_model.rb
$(bundle show workarea-storefront)/app/view_models/workarea/storefront/page_view_model.rb
$(bundle show workarea-storefront)/app/view_models/workarea/storefront/content_view_model.rb
$(bundle show workarea-storefront)/app/view_models/workarea/storefront/menu_view_model.rb
$(bundle show workarea-storefront)/app/view_models/workarea/storefront/recommendations_view_model.rb
"

4. Create Orders

echo "
$(bundle show workarea-core)/app/models/workarea/order.rb
$(bundle show workarea-core)/app/models/workarea/order/item.rb
$(bundle show workarea-core)/app/models/workarea/pricing.rb
$(bundle show workarea-core)/app/models/workarea/price_adjustment.rb
$(bundle show workarea-core)/app/models/workarea/pricing/calculator.rb
$(bundle show workarea-storefront)/app/view_models/workarea/storefront/cart_view_model.rb
$(bundle show workarea-storefront)/app/view_models/workarea/storefront/cart_item_view_model.rb
$(bundle show workarea-core)/app/models/workarea/checkout.rb
$(bundle show workarea-core)/app/models/workarea/checkout/steps/base.rb
$(bundle show workarea-core)/app/models/workarea/payment.rb
$(bundle show workarea-core)/app/models/workarea/payment/transaction.rb
$(bundle show workarea-core)/app/models/workarea/inventory.rb
$(bundle show workarea-core)/app/models/workarea/inventory/transaction.rb
$(bundle show workarea-core)/app/models/workarea/inventory/transaction_item.rb
$(bundle show workarea-core)/app/models/workarea/shipping.rb
$(bundle show workarea-core)/app/models/workarea/shipping/service_selection.rb
$(bundle show workarea-storefront)/app/view_models/workarea/storefront/order_view_model.rb
$(bundle show workarea-storefront)/app/view_models/workarea/storefront/order_item_view_model.rb
$(bundle show workarea-core)/app/models/workarea/pricing/discount/redemption.rb
$(bundle show workarea-core)/app/services/workarea/create_fulfillment.rb
"

5. Manage Orders

echo "
$(bundle show workarea-core)/app/models/workarea/fulfillment.rb
$(bundle show workarea-core)/app/models/workarea/fulfillment/item.rb
$(bundle show workarea-core)/app/models/workarea/fulfillment/event.rb
$(bundle show workarea-core)/app/models/workarea/fulfillment/package.rb
$(bundle show workarea-core)/app/models/workarea/pricing/override.rb
$(bundle show workarea-core)/app/models/workarea/pricing/request.rb
$(bundle show workarea-core)/app/models/workarea/payment/refund.rb
$(bundle show workarea-core)/app/services/workarea/cancel_order.rb
$(bundle show workarea-core)/app/services/workarea/copy_order.rb
"

6. View Insights & Reports

echo "
$(bundle show workarea-core)/app/models/workarea/metrics/by_day.rb
$(bundle show workarea-core)/app/models/workarea/metrics/by_week.rb
$(bundle show workarea-core)/app/models/workarea/insights/base.rb
$(bundle show workarea-admin)/app/view_models/workarea/admin/insight_view_model.rb
$(bundle show workarea-admin)/app/view_models/workarea/admin/reports/insights_view_model.rb
$(bundle show workarea-core)/app/models/workarea/reports/export.rb
$(bundle show workarea-core)/app/services/workarea/export_report.rb
"