Have you received emails in your inbox where they mention your first name, last name, birthday, city etc.
That's called a personalized email and the fields that are displayed to make the email personalized are called as merge fields in layman terms. With respect to marketing cloud those fields are called as personalization strings.
Marketing cloud has a lot of predefined personalization strings such as :
firstname
lastname
emailaddr
unsub_center_url
Personalization strings can be written in the following ways:
1) Inline :- %%String%%
2) In code block :-
%%[
Code
]%%
The problem with inline code is that it can only show a value of a personalization string but can't declare and store values in it.
Note:- Personalization strings make use of profile attributes in marketing cloud to display fields. Profile attributes are all the fields that you can see when you go to all subscriber list in marketing cloud.
example :- %%firstname%%
Now what if we want to use something other attribute value in our personalization string other than profile attribute? Like senders profile.
In such cases we use attribute value function.
An attribute value function can store a profile attribute value as well as an non profile attribute value in a different string and display it.
Example 1 )
%%=Attributevalue("Senders_Profile")=%% , ( Note:- We add an = sign after %% and before closing %% here because AttributeValue is a function.)
Example 2)
%%[
Set @othervalue = Attributevalue ("Senders_Profile")
Output (v(@othervalue))
]%%