---
schema_version: "1"
id: 699cdc1046e33e0b2d5ca39e3264bb5c93f956bb8c61a281fb721690178c4949
title: Update Content with Personalization AMPscript
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/mc_dm_update_content_with_personalization_ampscript.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.mc_dm_update_content_with_personalization_ampscript.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: da553fac7e36e6903bbeaa518f3fbb935ab37096006bbcac3ea598ee3cb9c562
description: Add AMPscript to messages in Marketing Cloud Engagement to create sections of content for standard Distributed Marketing users to personalize, such as greeting, introduction, and conclusion.
products:
  - Marketing
  - Cross Cloud
release: "264"
---
# Update Content with Personalization AMPscript

Add AMPscript to messages in Marketing Cloud Engagement to create sections of content for standard Distributed Marketing users to personalize, such as greeting, introduction, and conclusion.

![Important](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_important.png)

Important If the same email is used in multiple activities within a single journey, Distributed Marketing can’t provide unique personalization per message. To provide unique personalization, duplicate the email and use it in subsequent activities.

1. To create an introduction for personalization, enter this AMPscript in the email:
    
    ```
    
                        %%[
                        Set @sfOrgId = sfOrgId
                        Set @intro = intro
                        Set @objectId = IIF(EMPTY(sfCampaignMemberId), id, sfCampaignMemberId)
                        Set @journeyId = RegExMatch(journeyId,"(^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$)",1)
                        Set @personalizeDE = Concat("PersonalizationDE", "_" , @sfOrgId, "_", @journeyId)
                        Set @personalizeId = Concat(@objectId,_emailId,"intro")
                        IF EMPTY(@intro) THEN
                        set @introMsg = Lookup(@personalizeDE,"value","id",@personalizeId)
                        ELSE THEN
                        set @introMsg = @intro
                        ENDIF
                        ]%%
                        %%=v(@introMsg)=%%
                    
    ```
2. To create a conclusion for personalization, enter this AMPscript in the email:
    
    ```
    
                        %%[
                        Set @sfOrgId = sfOrgId
                        Set @closing = closing
                        Set @objectId = IIF(EMPTY(sfCampaignMemberId), id, sfCampaignMemberId)
                        Set @journeyId = RegExMatch(journeyId,"(^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$)",1)
                        Set @personalizeDE = Concat("PersonalizationDE", "_" , @sfOrgId, "_", @journeyId)
                        Set @personalizeId = Concat(@objectId,_emailId,"closing")
                        IF EMPTY(@closing) THEN
                        set @closingMsg = Lookup(@personalizeDE,"value","id",@personalizeId)
                        ELSE THEN
                        set @closingMsg = @closing
                        ENDIF
                        ]%%
                        %%=v(@closingMsg)=%%
                    
    ```
3. To enable greeting for personalization, enter this AMPscript in the email: `%%greeting%%`

#### See Also

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