GetPortfolioItem()

Returns the content of a file in your Portfolio.

Availability 

Marketing Cloud Engagement ✅ Yes
Marketing Cloud Next ❌ No

Syntax 

1GetPortfolioItem(itemExternalKey)

The GetPortfolioItem(itemExternalKey) function has this parameter:

  • itemExternalKey (string): Required. The external key of an item in your Portfolio.

Usage 

To use this function, pass it the external key of an item in your Portfolio. This function is helpful for storing text in an external file, and bringing that text into your content.

This example refers to a text file called hello.txt with an external key of “HelloWorld”. The file contains this text.

1Hello, world!
2This is a second line of text.
3This is the last line of text.

Call the function by passing it the external key of the text file.

1<p>%%=GetPortfolioItem("HelloWorld")=%%</p>

The function returns Hello, world! This is a second line of text. This is the last line of text.