# Attribute mappings examples

## Attributes

When you are configuring an agent, depending on the connector type, it will be able to define some attributes. The attributes depend on the object that you are configuring, and the objects depend on the connector type.

#### Get the value of an attribute (a user attribute in that case)

```
sAMAccountName <= userName
sAMAccountName => userName
sAMAccountName <=> userName
```

#### Get the value of a custom attribute

```
company <= attributes{"company"}
company => attributes{"company"}
company <=> attributes{"company"}
```

#### Get the value of an account metadata attribute

```
office <= accountAttributes{"office"}
office => accountAttributes{"office"}
office <=> accountAttributes{"office"}
```

#### Define a constant on the target system

```
nameConst <= "valueConst"
```

#### Assign the result of a script to the soffid attribute

```
return <SCRIPT> => attribute
```

<p class="callout info">Be in mind, it is allowed to use bean Shell expression only in the source when the mapping is one-way.</p>

#### Assign the result of a script to the target attribute

```
attribute <= return <SCRIPT>
```

<p class="callout info">Be in mind, it is allowed to use bean Shell expression only in the source when the mapping is one-way.</p>

#### Be in mind

<p class="callout warning">If the attribute name in the final system is hyphenated, you have to use this expression: **THIS{"ATTRIBUTENAME"}**, for example THIS{"my-name"}</p>