Quickstart
This walkthrough takes about fifteen minutes. You will create a category and a product blueprint, add a product in two languages, and publish it to a channel.
You need a workspace where you are an owner or admin. To try Attricat on your own machine, run curl -fsSL https://docs.attricat.com/install.sh | sh and sign in with the credentials it prints. See Try it on your machine for the details.
1. Create a category blueprint
Section titled “1. Create a category blueprint”Open Manage → Blueprints → New blueprint and paste:
format_version: 1code: categoryname: Categorykind: record
attributes: - code: name value_type: string
- code: parent value_type: relationship target_blueprint: category tree: true context_editable: default
views: dropdown_option: type: dropdown_option fields: [name]Save it, then Publish revision 1.
parent points at another category, and tree: true makes categories a tree, which is what lets a filter on a category include everything under it. A tree is shared by every context, so parent needs context_editable: default. kind: record makes this a record blueprint.
2. Create a product blueprint
Section titled “2. Create a product blueprint”Create a second blueprint:
format_version: 1code: productname: Productkind: recordrecord_schema: '{"type":"object","required":["sku","title"]}'
attributes: - code: sku value_type: string context_editable: default
- code: title value_type: string
- code: price value_type: number value_schema: '{"type":"number","minimum":0}'
- code: categories value_type: relationship target_blueprint: category
views: dropdown_option: type: dropdown_option fields: [title, sku] separator: ' / ' table: type: table columns: - {field: sku, label: SKU} - {field: title} - {field: price}Publish it.
record_schema holds the record schema. It is a top-level key, so it sits at the same indentation as attributes, not under an attribute. A key indented under the last attribute would become part of that attribute.
3. Add categories
Section titled “3. Add categories”Open the Record explorer, choose Category, and Create record twice:
name= Apparelname= Shirts,parent= Apparel
4. Add a product
Section titled “4. Add a product”Choose Product in the Explorer and create one:
sku= SH-0001title= Linen shirtprice= 49categories= Shirts
Try saving without a title: the record schema rejects it. Try a price of -1: the value schema rejects it.
5. Add a context
Section titled “5. Add a context”Open Manage → Contexts → Create context. Create PL under the root, with metadata {"language": "pl"}.
Open the product and choose the PL tab under Data. Every field shows Inherited from default context. Set title to Lniana koszula and leave the field to save it. sku is read-only here because it is managed in the default context.
In the Explorer, open Search scope, the sliders button next to the blueprint selector, and switch Context between default and PL to see the title change.
6. Publish to a channel
Section titled “6. Publish to a channel”Open Manage → Exports and turn on Export channel for PL.
Back on the product, select the PL context. The globe icon in the record toolbar shows Not published. Choose Actions → Publish.
Now change the product’s price and leave the field. The publication is withdrawn: the icon shows Not published again, because the approved state is no longer the current one. Choose Actions → Publish again to approve the change.
7. Try the Explorer
Section titled “7. Try the Explorer”With a few more products and categories:
- search
categories.name:shirts; - in the Browse by panel, shown on wide screens, pick Apparel to include everything under it;
- Add filter for
priceless than 50; - Save search to keep the result.
Next steps
Section titled “Next steps”- Author a blueprint covers files, layouts, mixins, and more.
- Model your catalog helps decide what should be a record, attribute, or context.
- Workspace administration explains how to invite your team.