The Salesforce Developers website will undergo maintenance on May 29, 2024 from 3:00 a.m. UTC to 10:00 a.m. UTC. The maintenance process may affect the availability of our documentation. Please plan accordingly.


Retrieve content from a specified content block in Content Builder. This function will only work with shared content in a business unit if it is shared using a shared folder.

ContentBlockByName(1, 2, 3, 4, 5)

1stringRequiredName of the content block to return, including the path within the my contents folder if necessary
2stringImpression region for content
3BooleanIndicates whether the function returns an error when the system can’t locate the specified content area or returns an invalid content area. A value of true returns an error. A value of false does not return an error.
4stringDefault content to return if an error occurs and no error returns. This value defaults to an empty string.
5stringReturns the status of the call. A value of 0 indicates the function found the content area and successfully rendered the content. A value of -1 indicates either no content or an invalid content area, so the function returns the default content value.