Skip to main content
All CollectionsDevelopment & integrationIntegrating
Calculated / concatenated attributes – How to do it?
Calculated / concatenated attributes – How to do it?

Your business and optimizing processes implies the ability to create attributes that will be calculated automatically...

Sylvain Gourvil avatar
Written by Sylvain Gourvil
Updated over a year ago

We'll take a simple example that can be used for any rule and any type of attribute.

Let's say that your data model has three attributes for a product document type:

  • color: the color of your product, possibly enriched via imports from your ERP;

  • marketing_label: the marketing name of your product, enriched by the teams within the PIM;

  • marketing_description: the marketing description of your product. This attribute must be filled in as follows: {marketing_label} - {color}

Two solutions are available when defining business processes:

  1. The user entering the label also enters the description;

  2. A script (ETL, specific development, etc.) retrieves the data after modification, creates the value, and pushes this data into the PIM

We'll focus on the second method. Obviously, we won't talk about how to set up the ETL job nor how to manage your rules. We'll only discuss the “PIM > ETL” and “ETL > PIM” flows.

Data recovery by ETL

Three methods are possible, each with its own advantages and disadvantages.

Push Notification Webhook & API

This is the most direct method. Notifications allow you to receive all document updates with details about modified attributes and the locales used at the very moment they're made.

When you receive these notifications on your systems, you can :

Thus, the calculation is nearly synchronous:

  • You receive the notification as soon as the modification is done, and

  • you're sure to send back the calculated value as soon as possible.

On the other hand, you must have an HTTP endpoint on your information system that is able to review these notifications.

Note: It's possible to store notifications received from the PIM in a queue (regardless of the technology). This allows processing notifications in batches (e.g., every X minutes).

API

If using notifications isn't a good option, or you don't need to be as precise (in terms of time), you can also retrieve all documents modified since a certain period of time via API:

Once the data is retrieved, your job will be able to calculate the values and push them via API or CSV:

Export CSV

If using notifications isn't a good option or if you don't need to be as precise (in terms of time), you can also retrieve all documents modified since a certain period of time via CSV. In fact, you can schedule an export of your CSV data directly in Quable PIM to an FTP(s): https://docs.quable.com/docs/exports-planifies.

This allows your job to :

Keywords: calculated attribute, concatenation, calculated value, concatenated attribute

Did this answer your question?