---
schema_version: "1"
id: 292e33766983e73fd42434f48d93172f653c7c8f500996387118d4ef0b3ee443
title: Create a Personalized Email with Standard Object Data
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/mc_co_create_personalized_email.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.mc_co_create_personalized_email.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1a35f39e6d88f82f3c1bf8bf474e3f5e4d9fd34b19a4ed8e4d4332382093d457
description: For this Marketing Cloud Connect for Marketing Cloud Engagement tutorial example, create a personalized email from a case with standard object data using AMPscript.
products:
  - Marketing
  - Cross Cloud
release: "264"
---
# Create a Personalized Email with Standard Object Data

For this Marketing Cloud Connect for Marketing Cloud Engagement tutorial example, create a personalized email from a case with standard object data using AMPscript.

1. In Engagement, go to Email Studio.
2. Click **Content**.
3. Click **Create**.
4. Click **HTML Paste**.
5. Enter a name and a subject.
6. In the email content area, insert this AMPscript.
    
    ```html
    %%[ 
    Set @mySObject = SObject
    Set @myRecordId = RecordId
    set @Case = RetrieveSalesforceObjects(SObject,"Subject,Status","Id", "=", RecordId)
    Set @CaseRow = Row(@Case, 1)
    Set @Subject = FIELD(@CaseRow, "Subject")
    Set @Status = FIELD(@CaseRow, "Status") 
    ]%% 
    <br>
    <br>
    SObject From API Call: %%=v(@mySObject)=%% 
    <br>
    RecordId From API Call: %%=v(@myRecordId)=%% 
    <br>
    Subject From RetrieveSalesforceObjects: %%=v(@Subject)=%% 
    <br>
    Status From RetrieveSalesforceObjects: %%=v(@Status)=%% 
    <br>
    ```
7. Save the email.
8. Modify the AMPscript example to include extra customizations. To add more fields from the case, follow this format. For example, include the Description field.
    
    ```html
    set @Case = RetrieveSalesforceObjects(SObject,"Subject,Status,Description","Id", "=", RecordId)
    ```
9. To set the Description variable, add another line of code. For example, under line 6 add this code.
    
    ```html
    Set @Description = FIELD(@CaseRow, "Description").
    ```
    
    Add this code within the closing tag \]%%.
10. To print the Description field in an email, add another line of code under the last line.
    
    ```html
    Status From RetrieveSalesforceObjects: %%=v(@Description)=%% <br>
    ```

New AMPscript looks like this example.

```html
%%[ 
Set @mySObject = SObject 
Set @myRecordId = RecordId 
set @Case = RetrieveSalesforceObjects(SObject,"Subject,Status","Id", "=", RecordId) 
Set @CaseRow = Row(@Case, 1) 
Set @Subject = FIELD(@CaseRow, "Subject") 
Set @Status = FIELD(@CaseRow, "Status") 
Set @Description = FIELD(@CaseRow, "Description") 
]%% 
<br>
<br> 
SObject From API Call: %%=v(@mySObject)=%% 
<br> 
RecordId From API Call: %%=v(@myRecordId)=%% 
<br> 
Subject From RetrieveSalesforceObjects: %%=v(@Subject)=%% 
<br> 
Status From RetrieveSalesforceObjects: %%=v(@Status)=%% 
<br>
Description From RetrieveSalesforceObjects: %%=v(@Description)=%% 
<br>
```

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mc_cross-cloud_products-264-0-0-production-enus/bd617332-480f-48e8-b283-3477883c1320/images/icon_tip.png)

Tip Validate a newly created email containing AMPscript against the newly created data extension. Triggered sends don’t activate if the email content doesn’t pass validation.

#### See Also

- [Introduction to Programmatic Marketing Content](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/programmatic-content-overview.html)