> For the complete documentation index, see [llms.txt](https://helpcenter.channable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpcenter.channable.com/manage-improve-product-data/manage-product-and-improve-data-fr/regles-modifier-et-enrichir-en-masse/how-to-use-actions-then-in-rules/actions-mathematiques/rule-action-calculate.md).

# Calculer des valeurs

Calculez des valeurs à partir de champs numériques des produits.

Utiliser **`Calculer`** pour créer une valeur à partir de champs numériques de produits.

Cette action est utile notamment pour :

* Calculer les prix de vente.
* Augmenter ou diminuer les prix d’un pourcentage.

### Options de calcul disponibles

Choisissez l’une des opérations suivantes :

* `multiplier par`
* `diviser par`
* `Plus`
* `moins`
* `multiplier par champ`
* `diviser par champ`
* `plus champ`
* `moins champ`

***

## Exemple `Calculer` Cas d’utilisation

### Calculer une remise de 20 %

#### Comment créer la règle

* Condition : SI la ou les valeurs dans `sale_price` **`are not empty`**
* Action : ALORS **`Calculer`** `price` `multiplier par` `0.8` `stocker dans` `sale_price`

### Augmenter les prix de 15 %

#### Comment créer la règle

* Condition : **`Pour tous les Produits`**
* Action : ALORS **`Calculer`** `price` `multiplier par` `1.15` `stocker dans` `price`

### Ajouter des frais de traitement fixes

#### Comment créer la règle

* Condition : **`Pour tous les Produits`**
* Action : ALORS **`Calculer`** `price` `Plus` `5` `stocker dans` `price_with_handling`

### Soustraire une valeur de champ du prix

#### Comment créer la règle

* Condition : SI la ou les valeurs dans `discount_amount` **`are not empty`**
* Action : ALORS **`Calculer`** `price` `moins champ` `discount_amount` `et stocker dans` `sale_price`

### Calculer le prix par Produit

#### Comment créer la règle

* Condition : SI valeur(s) dans `Quantité` **`are not empty`**
* Action : ALORS **`Calculer`** `price` `diviser par champ` `quantity` `et stocker dans` `price_per_Produit`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://helpcenter.channable.com/manage-improve-product-data/manage-product-and-improve-data-fr/regles-modifier-et-enrichir-en-masse/how-to-use-actions-then-in-rules/actions-mathematiques/rule-action-calculate.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
