0

I'm trying to create a SMS activity in Journey Builder and use the entry source (data extension) name in the ampscript. Is this even possible?

This is the ampscript

%%[
set @dataSourceName = AttributeValue("_DataSourceName")
]%%

%%=v(@dataSourceName)=%% # Prints 'Preview'

The above code prints out 'Preview' instead of the actual entry source name

1 Answer 1

3

Unfortunately not. In fact, it's not even possible to retrieve the data source name from an email (using _DataSourceName system string), as it will return 'All Subscribers' as the value. I've exhausted all options, including retrieving the Journey configuration payload from the REST API, but you won't find it in there either.

The only solution would be to store the DE name in a field in your event entry source (perhaps as a default value), or get a script activity in an Automation to populate the field based on the DE name.

2
  • 1
    I have been able to get _DataSourceName to work in emails, but yes, I have not had success in SMS messages. Commented Mar 13, 2020 at 12:56
  • @Gortonington are you sure you got this to work for emails sent from a Journey? Commented Mar 13, 2020 at 19:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .