Skip to content

Commit b577d5d

Browse files
committed
PMXG-357: Add documentation about product link
1 parent c8dd96c commit b577d5d

File tree

6 files changed

+102
-2
lines changed

6 files changed

+102
-2
lines changed

content/concepts/catalog-structure.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ Below is the list of attribute types and their description:
8787
| Reference data simple select | pim_reference_data_simpleselect | allows you to manage any kind of data that has its own properties, as a single-choice select. |
8888
| Reference data multi select | pim_reference_data_multiselect | allows you to manage any kind of data that has its own properties, as a multi-choice select. |
8989
| Table (Growth and Enterprise editions only) | pim_catalog_table | allows you to manage multidimensional data in the form of a table |
90+
| Product link | pim_catalog_product_link | Allow you to create a unidirectional relationship between a product/product model to another. |
9091

9192
In the Akeneo UI, you can find the attributes in the `Settings`/`Attributes` menu. Below is an example of one attribute in the UI.
9293

@@ -143,7 +144,7 @@ The `group_labels` field is only available since the 5.0.
143144
_Focus on the table attribute configuration_
144145

145146
The structure of a table attribute is defined in a specific `table_configuration` field, which describes the columns of the table.
146-
Each column is defined by a data type (select, text, boolean, number), and a unique code. It can hold a collection of labels,
147+
Each column is defined by a data type (select, text, boolean, number, incremental_number, reference_entity, product_link, measurement, date), and a unique code. It can hold a collection of labels,
147148
and user-defined validation constraints based on the column data type. A table configuration must define at least two columns, and the first one has to be a `select` data type.
148149
In order to ensure that the PIM will still be running, we have defined some limits.
149150
- You can create up to **10 columns** in a single table.

content/concepts/products.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,69 @@ Whenever the attribute's type is `pim_catalog_number`, the `data` field should c
387387
}
388388
```
389389

390+
#### Product link attribute
391+
::: availability versions=SaaS editions=EE
392+
:::
393+
394+
Whenever the attribute type is pim_catalog_product_link, the data field must contain:
395+
- The `type` of the linked entity, with the value `product` or `product_model`
396+
- The `identifier` or the `id` of the linked entity:
397+
- If type is `product`: either the UUID in the id key, or the identifier in the identifier key
398+
- If type is `product_model`: the product model code in the id key
399+
400+
##### Examples
401+
```json
402+
{
403+
"values": {
404+
"included_battery": [
405+
{
406+
"locale": null,
407+
"scope": null,
408+
"data": {
409+
"type": "product",
410+
"id": "fc24e6c3-933c-4a93-8a81-e5c703d134d5"
411+
},
412+
"attribute_type": "pim_catalog_product_link"
413+
}
414+
]
415+
}
416+
}
417+
```
418+
```json
419+
{
420+
"values": {
421+
"included_battery": [
422+
{
423+
"locale": null,
424+
"scope": null,
425+
"data": {
426+
"type": "product",
427+
"identifier": "bl1850b"
428+
},
429+
"attribute_type": "pim_catalog_product_link"
430+
}
431+
]
432+
}
433+
}
434+
```
435+
```json
436+
{
437+
"values": {
438+
"included_battery": [
439+
{
440+
"locale": null,
441+
"scope": null,
442+
"data": {
443+
"type": "product_model",
444+
"id": "my_super_battery"
445+
},
446+
"attribute_type": "pim_catalog_product_link"
447+
}
448+
]
449+
}
450+
}
451+
```
452+
390453
#### Metric attribute
391454
::: availability versions=1.7,2.x,3.x,4.0,5.0,6.0,7.0,SaaS editions=CE,EE
392455
:::

content/event-platform/available-events.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,21 @@ The modifications that can lead to this event include:
11711171
"scope": "a_scope"
11721172
}
11731173
],
1174+
"a_pim_catalog_product_link_attribute": [
1175+
{
1176+
"previous": {
1177+
"type": "product",
1178+
"id": "83413cad-b3aa-4f68-9b4b-7fc90c1ce84a"
1179+
},
1180+
"new": {
1181+
"type": "product",
1182+
"id": "aeabe737-f655-4389-bcc0-d8dd2fc47824"
1183+
},
1184+
"type": "pim_catalog_product_link",
1185+
"locale": "a_locale",
1186+
"scope": "a_scope"
1187+
}
1188+
],
11741189
"a_pim_catalog_number_attribute": [
11751190
{
11761191
"previous": 0,

content/rest-api/filter.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,25 @@ With the IN operator, the list of product identifiers can contain up to **100**
607607
| STARTS WITH, CONTAINS, DOES NOT CONTAIN, =, != | string |
608608
| EMPTY, NOT EMPTY | no value |
609609

610+
**The `pim_catalog_product_link` attribute types**
611+
::: availability versions=SaaS editions=EE
612+
613+
| Allowed operators | Allowed value type |
614+
|-------------------|-------------------------|
615+
| IN, NOT IN | a list of product links |
616+
| EMPTY, NOT EMPTY | no value |
617+
618+
A product link have the following structure:
619+
620+
```json
621+
{
622+
"type": "product",
623+
"id": "31243126-cfa4-4d8c-a3ea-e989e059eae2"
624+
}
625+
```
626+
627+
Where `type` value can be one of the following: `product`, `product_model` and `id` is the product UUID in case the type is `product` or the product model code in case type is `product_model`.
628+
610629
## Filter product values
611630

612631
Thanks to the above sections, you are able to filter your products to only get those you want. In this section, you will see that you also can filter the product values to only receive those you want.

content/swagger/resources/attributes/definitions/attribute.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ properties:
2828
"akeneo_reference_entity",
2929
"akeneo_reference_entity_collection",
3030
"pim_catalog_asset_collection",
31+
"pim_catalog_product_link",
3132
]
3233
x-immutable: true
3334
labels:
@@ -172,7 +173,7 @@ properties:
172173
description: Column code
173174
data_type:
174175
type: string
175-
enum: ["select", "text", "number", "boolean"]
176+
enum: ["select", "text", "number", "boolean", "incremental_number", "reference_entity", "product_link", "measurement", "date"]
176177
description: Column data type
177178
validations:
178179
type: object

content/tutorials/guides/how-to-get-pim-product-information.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,7 @@ Disclaimer: The previous snippet doesn’t handle for now the following attribut
711711
- Reference data simple select attribute
712712
- Reference data multi select attribute
713713
- Table attribute
714+
- Product link attribute
714715
:::
715716
716717
###### 2.3 - Collect product media files

0 commit comments

Comments
 (0)