Studio Visual Editor
| Field | Description | 
|---|---|
Display Name  | 
Customize to display a unique name for the transformer in your application. Value: Set Payload  | 
Value  | 
Enter a literal string or a Mule expression that defines how Mule should set the payload. Value: String or Mule Expression  | 
XML "Editor or Standalone"
# Example setting a payload to a literal string.
<set-payload value="MyNewPayload" doc:name="Set Payload"/>
# Example setting a payload using a Mule expression. This takes the current payload and transforms it by adding the string "Hello " in front of it. Thus, if your payload was "Charlie", this set-payload transformer changes it to "Hello, Charlie".
<set-payload value="#['Hello, ' + message.payload]" doc:name="Set Payload"/>
| Element | Description | 
|---|---|
set-payload  | 
Set a payload on your message (as shown in examples above).  | 
| Element Attribute | Description | 
|---|---|
value  | 
The literal string or Mule expression that defines how Mule should set the payload.  | 
doc:name  | 
Customize to display a unique name for the transformer in your application. Note: Attribute not required in Mule Standalone configuration.  | 



