Skip to content

Commit 0c62a23

Browse files
Merge branch 'master' into app-catalogs
2 parents 6399c62 + 50cbe92 commit 0c62a23

File tree

60 files changed

+384
-1810
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+384
-1810
lines changed

content/guides/dam-connection/introduction.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ As an image is worth a thousand words, here's a small diagram to help you get th
2222
![Macro overview of the DAM connection](../../img/guides/dam-connection-macro.svg)
2323

2424
In this guide, we consider the DAM as the master of the product assets. It means that assets are sent from the DAM to the PIM, and not the other way around.
25-
First, photographers or marketers upload their new product assets into the DAM. Then, thanks to the connector we're going to build in this guide, these assets are sent via the REST API to the Asset Manager of our PIM.
25+
First, photographers or marketers upload their new product assets into the DAM. Then, thanks to the Apps we're going to build in this guide, these assets are sent via the REST API to the Asset Manager of our PIM.
2626

2727
Once the assets are in the Asset Manager, there are two ways to link them to the right product:
2828
- _Manually_: marketers manually assign the imported assets to the right products,
@@ -34,7 +34,7 @@ Want to dig deeper into the Asset Manager? Take a dive into its concepts right [
3434

3535
### The use case in details
3636

37-
Now, let's take a closer look.
37+
Now, let's take a closer look.
3838

3939
You already have a DAM installed and a lot of your assets are already stored in it. Some of those assets are product assets: product user guides, product images, product video shootings,...
4040
You are also using an Akeneo PIM. And your goal is quite simple. You want the product assets located in your DAM to be sent to your PIM, so that you can have all the visuals, documentation and product shootings of your product along with your product information in one single product sheet.
@@ -45,28 +45,28 @@ Let me show you how!
4545

4646
## Follow the steps!
4747

48-
To properly connect your DAM to your PIM, as illustrated above, here are the steps you need to carefully follow.
49-
1. First, you're going to need to understand how the Asset Manager works. Carefully read about all its concepts, right [here](/concepts/asset-manager.html), and you'll become an Asset Manager master! On a more serious note, those concepts are key to creating a great connector that will perfectly fit with our PIM. 😉
48+
To properly connect your DAM to your PIM, as illustrated above, here are the steps you need to carefully follow.
49+
1. First, you're going to need to understand how the Asset Manager works. Carefully read about all its concepts, right [here](/concepts/asset-manager.html), and you'll become an Asset Manager master! On a more serious note, those concepts are key to creating a great App that will perfectly fit with our PIM. 😉
5050
2. Then, we strongly encourage you to read the [glossary](glossary.html). It will help you grasp the basic notions we are going to use throughout this guide. It's worth the read - you'll see it's pretty short.
5151
3. Before beginning to write any code, you'll need to carefully study your DAM and its asset modelization. It's a crucial step, don't miss it. You'll find more about how to successfully initialize your Asset Manager families that will match the assets you're going to receive from the DAM, in the [Structure your DAM and PIM](pre-requisites.html) section.
52-
4. For this step, you are going to choose your connector's architecture and technical stack. Check out this [section](technical-stack.html) to find out more. You'll see it also provides pro tips regarding scalability, error management and so on...
53-
5. Now, hands on your keyboard, this is the part where you start coding. Build the DAM-PIM connector by following the steps described in the [Synchronize assets](synchronize-assets.html) section.
52+
4. For this step, you are going to choose your App's architecture and technical stack. Check out this [section](technical-stack.html) to find out more. You'll see it also provides pro tips regarding scalability, error management and so on...
53+
5. Now, hands on your keyboard, this is the part where you start coding. Build the DAM-PIM App by following the steps described in the [Synchronize assets](synchronize-assets.html) section.
5454

55-
And... that's it! :tada: You now have a functional DAM-PIM connector.
55+
And... that's it! :tada: You now have a functional DAM-PIM App.
5656

5757
::: info
58-
Don't forget that this guide isn't meant to be exhaustive. You'll find a million ways to improve this first DAM-PIM connector version. Don't hesitate to iterate to support new use cases, it's the key to great connectors!
58+
Don't forget that this guide isn't meant to be exhaustive. You'll find a million ways to improve this first DAM-PIM App version. Don't hesitate to iterate to support new use cases, it's the key to great Apps!
5959
:::
6060

6161
## The skeleton
6262

63-
To ease even more the creation of your connector, we bootstrapped a connector skeleton that will give you some code examples and guide you to your own connector creation. Do not hesitate to explore it in order to get an even better overview of what we are trying to build here.
63+
To ease even more the creation of your App, we bootstrapped a skeleton that will give you some code examples and guide you to your own App creation. Do not hesitate to explore it in order to get an even better overview of what we are trying to build here.
6464
It is written in our favorite language, aka PHP.
6565

6666
You'll find it [here](https://github.com/akeneo/dam-connector). Enjoy!
6767

6868
::: warning
69-
This connector skeleton is provided as-is. It is only supported in **best effort** mode, whether you are an Enterprise or a Community user.
69+
This skeleton is provided as-is. It is only supported in **best effort** mode, whether you are an Enterprise or a Community user.
7070
:::
7171

7272
::: warning
@@ -76,4 +76,3 @@ This skeleton is **far from being production-ready**. We don't recommend you to
7676
If you ever find a bug, do not hesitate to directly open an issue on the [Github](https://github.com/akeneo/dam-connector/issues) repository.
7777

7878
Don't forget that we also love it when you contribute and help us make better tools. So do not hesitate! Every feedback/pull request is very welcome!
79-

content/guides/dam-connection/pre-requisites.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Prepare the structure in your DAM and your PIM
22

3-
Before writing any line of code for the connector, you'll need to prepare your DAM and your PIM. By _preparation_, we mean adapting or creating a proper structure around your DAM or PIM assets, so that the connector will easily do its job, i.e. send assets from the DAM to the PIM.
3+
Before writing any line of code for the App, you'll need to prepare your DAM and your PIM. By _preparation_, we mean adapting or creating a proper structure around your DAM or PIM assets, so that the App will easily do its job, i.e. send assets from the DAM to the PIM.
44

55
## In your PIM
66

@@ -64,7 +64,7 @@ If you answer `No` to all of these questions, it's likely that you don't need th
6464
### Create the structure in the Asset Manager
6565

6666
Once you have a better idea of the modelization of your asset families, you can create them.
67-
You can either do it in the PIM, or you can use a script leveraging our REST API. You can find an example of this script in our [DAM connector skeleton](introduction.html#the-skeleton).
67+
You can either do it in the PIM, or you can use a script leveraging our REST API. You can find an example of this script in our [skeleton](introduction.html#the-skeleton).
6868

6969
To create an asset family with its attributes and its product link rules, you'll need to follow those steps:
7070
1. Create your asset family with its code and labels.
@@ -102,7 +102,7 @@ Those are just suggestions. Don't hesitate to find the one that will best suit y
102102
### Which asset family do your DAM product assets belong to?
103103

104104
In the PIM, in the Asset Manager, assets must belong to an [asset family](/concepts/asset-manager.html#asset-family).
105-
So, at one point, whenever the connector creates an asset in the PIM, it will need to know in which family it should create it.
105+
So, at one point, whenever the App creates an asset in the PIM, it will need to know in which family it should create it.
106106
As a result, we need this information to be on the DAM side, for each DAM asset.
107107

108108
::: info

content/guides/dam-connection/synchronize-assets.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# Dive into the DAM-PIM synchronization
22

3-
Alright, let's code now! In this section, you'll find everything you need to code your connector.
3+
Alright, let's code now! In this section, you'll find everything you need to code your App.
44

55
::: warning
66
Did you carefully read the previous sections? If not, you're missing some crucial steps and chances are you won't understand what's coming next. So, here you go: [here](introduction.html), [here](glossary.html), [here](pre-requisites.html) and [here](technical-stack.html).
77
We promise it's worth the read. :wink:
88
:::
99

10-
As a reminder, the connector is the piece of software that is between the DAM and the PIM and that's in charge of the synchronization of the DAM assets with the PIM, as illustrated in this diagram.
10+
As a reminder, the App is the piece of software that is between the DAM and the PIM and that's in charge of the synchronization of the DAM assets with the PIM, as illustrated in this diagram.
1111

1212
![Macro overview of the DAM connection](../../img/guides/dam-connection-macro.svg)
1313

14-
To be crystal clear, the goal of the connector is to collect assets from the DAM and send them to the PIM. Easy peasy, right?
14+
To be crystal clear, the goal of the App is to collect assets from the DAM and send them to the PIM. Easy peasy, right?
1515

16-
Well then! Let's zoom in on what's inside that connector.
17-
Below is the general diagram of what your connector will actually do under the hood.
16+
Well then! Let's zoom in on what's inside that App.
17+
Below is the general diagram of what your App will actually do under the hood.
1818

1919
![General workflow](../../img/guides/dam_pim-general-workflow.svg)
2020

@@ -43,7 +43,7 @@ Don't forget that, when collecting your DAM assets, you should also filter them
4343

4444
## Transform DAM assets into PIM assets
4545

46-
We already covered in a previous [section](pre-requisites.html#define-the-attributes-of-your-asset-families) that DAM and PIM assets have a totally different structure.
46+
We already covered in a previous [section](pre-requisites.html#define-the-attributes-of-your-asset-families) that DAM and PIM assets have a totally different structure.
4747

4848
Remember this example?
4949

@@ -52,7 +52,7 @@ Remember this example?
5252
Your DAM and PIM assets don't share the same structure.
5353
And that is absolutely fine, by the way! DAM and PIM softwares do not serve the same purpose at all, so it is normal if they are not described by the same set of attributes/properties.
5454

55-
Your connector will need to run some transformations on your DAM assets in order to turn them into PIM assets. This is the goal of this step. You'll see it's a pretty big one, but don't worry we're here to guide you so you don't get lost somewhere along the way. :wink:
55+
Your App will need to run some transformations on your DAM assets in order to turn them into PIM assets. This is the goal of this step. You'll see it's a pretty big one, but don't worry we're here to guide you so you don't get lost somewhere along the way. :wink:
5656

5757
As we are in a more technical section, let's show some code! Below you'll find an example of a DAM asset, in JSON format, as it can be extracted thanks to the DAM REST API:
5858

@@ -89,14 +89,14 @@ After this transformation step, here is what the JSON of the corresponding PIM a
8989
"locale": null,
9090
"channel": null,
9191
"data": "Allie jean model picture 1"
92-
}
92+
}
9393
],
9494
"dam_url": [
9595
{
9696
"locale": null,
9797
"channel": null,
9898
"data": "https://cdn.my-dam.com/l/579a05bbece1a1d/allie-jean_1_model-picture.png"
99-
}
99+
}
100100
],
101101
"main_colors": [
102102
{
@@ -138,7 +138,7 @@ The sub-sections below will guide you through all the steps needed to perform th
138138
To create a PIM asset, you'll need a code. This code must be unique among all your PIM assets, regardless of the asset family they belong to.
139139

140140
We recommend you to use the unique identifier that is used in your DAM system as the code of your PIM asset. In our previous example, this identifier is the `uid`.
141-
So, it means that you need to transform this `uid` in your DAM asset:
141+
So, it means that you need to transform this `uid` in your DAM asset:
142142
```json
143143
"uid": "0A3C2A6E-4C32-4492-BC0DA02"
144144
```
@@ -269,7 +269,7 @@ Here are the different steps to follow:
269269
1. The `warning_mention` DAM Property is mapped to the `disclaimer` PIM attribute.
270270
1. Fetching the information for the `disclaimer` PIM attribute will tell you that:
271271
- This attribute is a **text** attribute. So the `data` field of its asset attribute value expects a string.
272-
- This attribute is **localizable**. So you need to know for which PIM locale this information was enriched. Here, in our example, we consider that the DAM does not handle localization and every text property within the DAM is enriched in English. So we specify it, in the connector: the corresponding locale for localizable attributes will be "en_US".
272+
- This attribute is **localizable**. So you need to know for which PIM locale this information was enriched. Here, in our example, we consider that the DAM does not handle localization and every text property within the DAM is enriched in English. So we specify it, in the App: the corresponding locale for localizable attributes will be "en_US".
273273
1. In the end, you'll generate this asset value:
274274
```json
275275
"disclaimer": [
@@ -315,9 +315,8 @@ When your PIM assets are ready, you can call the [patch assets](/api-reference.h
315315

316316
### Dealing with options
317317
For the single option and multiple options attributes, you may want to dynamically add new options provided by the DAM to your PIM asset attribute.
318-
In this case, you should first call the [patch attribute options](/api-reference.html#patch_asset_attributes__attribute_code__options__code_) endpoint, as illustrated in the diagram below.
318+
In this case, you should first call the [patch attribute options](/api-reference.html#patch_asset_attributes__attribute_code__options__code_) endpoint, as illustrated in the diagram below.
319319

320320
![Push assets with options](../../img/guides/dam_pim-asset-push.svg)
321321

322322
Again, don't hesitate to take a look at our [skeleton](https://github.com/akeneo/dam-connector/blob/master/src/Infrastructure/Pim/AttributeOptionsApi.php) to see it all in action. :wink:
323-

content/guides/dam-connection/technical-stack.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Define the technical stack of your connector
1+
# Define the technical stack of your App
22

3-
Now that your PIM and your DAM are [well prepared](pre-requisites.html) for their connection, it's time to dig a bit into the technical stack you are going to choose for your connector.
3+
Now that your PIM and your DAM are [well prepared](pre-requisites.html) for their connection, it's time to dig a bit into the technical stack you are going to choose for your App.
44

55
## On the PIM side
66

@@ -11,7 +11,9 @@ We will never repeat it enough: the REST API is the **most stable** way to conne
1111
Also, and it is quite important to keep it in mind, the REST API is the **fastest way** to push and pull data from the PIM.
1212

1313
::: tips
14-
Not familiar with the Akeneo PIM REST API? We have a [getting started guide](/getting-started/your-first-tutorial-4x/welcome.html) to help you right here!
14+
Not yet familiar with Akeneo App? We have a [complete App guide](/apps/introduction.html)!
15+
16+
You want to know everything about the REST API? [Follow this guide](/documentation/introduction.html)!
1517
:::
1618

1719
Also, if you are a PHP developer, we provide a [PHP Client](https://github.com/akeneo/api-php-client-ee) for this REST API. So don't hesitate to use it if need be!
@@ -44,21 +46,21 @@ APIs are great for initialization purposes. But their main drawback lays in the
4446
In other words, you'll need to regularly ask which were the last updated DAM assets, in order to synchronize them with the PIM.
4547

4648
### Queuing systems
47-
Queuing systems offer the possibility to get closer to real-time and are run asynchronously, protecting your connector from too many simultaneous requests.
49+
Queuing systems offer the possibility to get closer to real-time and are run asynchronously, protecting your App from too many simultaneous requests.
4850

4951
![Queuing System Schema](../../img/guides/dam_pim-connection_queuingSystem.svg)
5052

5153
The updated DAM assets are *published* as messages in the queuing system.
52-
Then the connector will consume these messages.
54+
Then the App will consume these messages.
5355

5456
### Webhooks
5557

56-
With webhooks, the DAM will send newly created assets and updated asset values to your connector.
58+
With webhooks, the DAM will send newly created assets and updated asset values to your App.
5759
It allows you to have some kind of "real-time" asset synchronization between your DAM and your PIM.
5860

5961
![Webhooks Schema](../../img/guides/dam_pim-connection_webhook.svg)
6062

61-
The biggest drawback is to ensure that your connector and your PIM won't suffer from too many HTTP requests.
63+
The biggest drawback is to ensure that your App and your PIM won't suffer from too many HTTP requests.
6264
It could lead to a crash of one of these applications (or they could just ignore your messages) and sometimes could create latency on the DAM side (if it is waiting from a webhook response).
6365
So **be careful** with that!
6466

@@ -85,7 +87,7 @@ When you use an asynchronous method to connect, you will need to [synchronize yo
8587

8688
You should avoid having too many calls to the PIM REST API and process only the data you need. This is why the [DAM attribute selection](pre-requisites.html#define-the-attributes-of-your-asset-families) is really important.
8789

88-
For queuing systems and webhooks, you need to send all messages related to assets. Then, in the connector, filter them to keep only DAM assets that are related to products that you want in the PIM (see [Pre-requisites](pre-requisites.html#which-dam-assets-are-products-related)).
90+
For queuing systems and webhooks, you need to send all messages related to assets. Then, in the App, filter them to keep only DAM assets that are related to products that you want in the PIM (see [Pre-requisites](pre-requisites.html#which-dam-assets-are-products-related)).
8991

9092
If you are using an API in the DAM, please make sure to only query the modified assets since the last successful synchronization, in order to avoid synchronizing twice the exact same asset.
9193

@@ -102,12 +104,12 @@ If the memory is not stable (meaning it returns to a base after each batch call)
102104

103105
### Performance
104106

105-
One of the best ways to enhance your connector performance is to limit the number of I/O calls to your infrastructure (HTTP requests to the API, database queries, etc...).
107+
One of the best ways to enhance your App performance is to limit the number of I/O calls to your infrastructure (HTTP requests to the API, database queries, etc...).
106108

107109
For example, it is better to patch assets using bulk requests than using multiple single patches. It will limit the number of REST API calls.
108110
You can also implement a cache system for the PIM asset structure (asset family and asset attribute) to avoid using an REST API call each time you need it.
109111

110-
Keep in mind that one of the most efficient ways to enhance your connector performance is to be able to scale (see above).
112+
Keep in mind that one of the most efficient ways to enhance your App performance is to be able to scale (see above).
111113

112114
### Error handling
113115

@@ -122,6 +124,6 @@ You'll need to find a way to run the calls again for the assets that have not be
122124

123125
### Our skeleton
124126

125-
As already stated in the [introduction](introduction.html#our-skeleton), we provide [a skeleton](https://github.com/akeneo/dam-connector) to inspire you when writing your own connector.
127+
As already stated in the [introduction](introduction.html#our-skeleton), we provide [a skeleton](https://github.com/akeneo/dam-connector) to inspire you when writing your App.
126128
It is fueled with coding best practices, so do not hesitate to have a look at it.
127129
As a reminder, this skeleton is only supported in **best effort**.

0 commit comments

Comments
 (0)