# How to use Transformation during import

{% hint style="info" %}
**Prerequisite:** This tutorial assumes you know the basics of the import feature. If this is not the case you can learn the basics in other guides here: [How to use import](https://docs.struct.com/pim3/tutorials/helpful-guides/how-to-use-import)\
\
The tools this tutorial goes through are all found on the data mapping page of import
{% endhint %}

## Transformation

When importing Text or Number [attributes](https://docs.struct.com/pim3/fundamental-concepts/attributes) you can choose to do Transformation on the incoming values. This is done by clicking the 'Transform' text to the right of the data mapping.

<figure><img src="https://3609403033-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZJAMIKVcqchSDbt4A7DE%2Fuploads%2F8z8ynQuyBNhfj1o9jyxL%2Fimage.png?alt=media&#x26;token=25f6b38a-9861-4505-99b8-ca66b957cbec" alt=""><figcaption></figcaption></figure>

Whether you click 'Transformation' for a Text [attribute](https://docs.struct.com/pim3/fundamental-concepts/attributes) or Number [attribute](https://docs.struct.com/pim3/fundamental-concepts/attributes) determines the tranformations that are eligible.

Transformation for Text has the following options:

* All caps
* All non caps
* Capitalize first letter in sentence
* Capitalize first letter in word
* Trim
* Replace
* Regex replace

These are all pretty selfexplanatory and require no other choices to be made, except Replace and Regex replace.

<figure><img src="https://3609403033-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZJAMIKVcqchSDbt4A7DE%2Fuploads%2FIbXtj4Xszzw0KoyF6Afg%2Fimage.png?alt=media&#x26;token=d9082554-4d6e-40aa-abf0-6e994ad8bc36" alt=""><figcaption><p>Replace for Text attribute</p></figcaption></figure>

Replace takes an 'Old value' and a 'New value'. In the example above all occurences of 'jacket' will be replaced with 'pillowcase' for the [attribute](https://docs.struct.com/pim3/fundamental-concepts/attributes) the Transformation was added to.

Regex replace is similar, however it takes a pattern instead of an 'Old value'. This pattern is in the form of a regular expression and all occurences that fits the pattern will be replaced with the new value.

Transformation for Numbers has the following options:

* Divide
* Minus
* Multiply
* Plus

And they do exactly what they say.

<figure><img src="https://3609403033-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZJAMIKVcqchSDbt4A7DE%2Fuploads%2Fe7J576hm4wKnZCTdSsRK%2Fimage.png?alt=media&#x26;token=ebf9559d-f5c6-4227-b225-c8ff85407a93" alt=""><figcaption><p>Transformation for Number attribute</p></figcaption></figure>

Having chosen your Transformation type simply input the Number for the operation and the operation will be executed on the [attribute](https://docs.struct.com/pim3/fundamental-concepts/attributes) that is imported.
