You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/guides/dam-connection/introduction.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ As an image is worth a thousand words, here's a small diagram to help you get th
22
22

23
23
24
24
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.
26
26
27
27
Once the assets are in the Asset Manager, there are two ways to link them to the right product:
28
28
-_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 [
34
34
35
35
### The use case in details
36
36
37
-
Now, let's take a closer look.
37
+
Now, let's take a closer look.
38
38
39
39
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,...
40
40
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!
45
45
46
46
## Follow the steps!
47
47
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. 😉
50
50
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.
51
51
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.
54
54
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.
56
56
57
57
::: 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!
59
59
:::
60
60
61
61
## The skeleton
62
62
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.
64
64
It is written in our favorite language, aka PHP.
65
65
66
66
You'll find it [here](https://github.com/akeneo/dam-connector). Enjoy!
67
67
68
68
::: 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.
70
70
:::
71
71
72
72
::: warning
@@ -76,4 +76,3 @@ This skeleton is **far from being production-ready**. We don't recommend you to
76
76
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.
77
77
78
78
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!
Copy file name to clipboardExpand all lines: content/guides/dam-connection/pre-requisites.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Prepare the structure in your DAM and your PIM
2
2
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.
4
4
5
5
## In your PIM
6
6
@@ -64,7 +64,7 @@ If you answer `No` to all of these questions, it's likely that you don't need th
64
64
### Create the structure in the Asset Manager
65
65
66
66
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).
68
68
69
69
To create an asset family with its attributes and its product link rules, you'll need to follow those steps:
70
70
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
102
102
### Which asset family do your DAM product assets belong to?
103
103
104
104
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.
106
106
As a result, we need this information to be on the DAM side, for each DAM asset.
Copy file name to clipboardExpand all lines: content/guides/dam-connection/synchronize-assets.md
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,20 @@
1
1
# Dive into the DAM-PIM synchronization
2
2
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.
4
4
5
5
::: warning
6
6
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).
7
7
We promise it's worth the read. :wink:
8
8
:::
9
9
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.
11
11
12
12

13
13
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?
15
15
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.
@@ -43,7 +43,7 @@ Don't forget that, when collecting your DAM assets, you should also filter them
43
43
44
44
## Transform DAM assets into PIM assets
45
45
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.
47
47
48
48
Remember this example?
49
49
@@ -52,7 +52,7 @@ Remember this example?
52
52
Your DAM and PIM assets don't share the same structure.
53
53
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.
54
54
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:
56
56
57
57
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:
58
58
@@ -89,14 +89,14 @@ After this transformation step, here is what the JSON of the corresponding PIM a
@@ -138,7 +138,7 @@ The sub-sections below will guide you through all the steps needed to perform th
138
138
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.
139
139
140
140
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:
142
142
```json
143
143
"uid": "0A3C2A6E-4C32-4492-BC0DA02"
144
144
```
@@ -269,7 +269,7 @@ Here are the different steps to follow:
269
269
1. The `warning_mention` DAM Property is mapped to the `disclaimer` PIM attribute.
270
270
1. Fetching the information for the `disclaimer` PIM attribute will tell you that:
271
271
- 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".
273
273
1. In the end, you'll generate this asset value:
274
274
```json
275
275
"disclaimer": [
@@ -315,9 +315,8 @@ When your PIM assets are ready, you can call the [patch assets](/api-reference.h
315
315
316
316
### Dealing with options
317
317
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.
319
319
320
320

321
321
322
322
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:
Copy file name to clipboardExpand all lines: content/guides/dam-connection/technical-stack.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# Define the technical stack of your connector
1
+
# Define the technical stack of your App
2
2
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.
4
4
5
5
## On the PIM side
6
6
@@ -11,7 +11,9 @@ We will never repeat it enough: the REST API is the **most stable** way to conne
11
11
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.
12
12
13
13
::: 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)!
15
17
:::
16
18
17
19
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
44
46
In other words, you'll need to regularly ask which were the last updated DAM assets, in order to synchronize them with the PIM.
45
47
46
48
### 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.
48
50
49
51

50
52
51
53
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.
53
55
54
56
### Webhooks
55
57
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.
57
59
It allows you to have some kind of "real-time" asset synchronization between your DAM and your PIM.
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.
62
64
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).
63
65
So **be careful** with that!
64
66
@@ -85,7 +87,7 @@ When you use an asynchronous method to connect, you will need to [synchronize yo
85
87
86
88
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.
87
89
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)).
89
91
90
92
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.
91
93
@@ -102,12 +104,12 @@ If the memory is not stable (meaning it returns to a base after each batch call)
102
104
103
105
### Performance
104
106
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...).
106
108
107
109
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.
108
110
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.
109
111
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).
111
113
112
114
### Error handling
113
115
@@ -122,6 +124,6 @@ You'll need to find a way to run the calls again for the assets that have not be
122
124
123
125
### Our skeleton
124
126
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.
126
128
It is fueled with coding best practices, so do not hesitate to have a look at it.
127
129
As a reminder, this skeleton is only supported in **best effort**.
0 commit comments