Good morning, I am building a journey in which the customer will receive an email communication according to the company group he is registered with

during the test and preview of the email studio tool all fields appear blank (no return) even if the correct data extension is selected

I built the ampscript to return the fields from the data extension


 var @passageiro, @nome, @cpf, @numeroBilhete, @dataViagem, @horarioViagem, @origem, @empresaCompra, @destino, @empresaOperadora, @plataforma, @poltrona, @tipoServico, @tempoViagem

set @passageiro = AttributeValue("Asset:Passageiro__c"),
    @nome = AttributeValue("Asset:Name"),
    @cpf = AttributeValue("Asset:CPF__c"),
    @numeroBilhete = AttributeValue("Asset:Numero_Bilhete__c"),
    @dataViagem =  AttributeValue("Asset:Data_Viagem__c"),
    @horarioViagem = AttributeValue("Asset:Horario_Viagem__c"),
    @origem = AttributeValue("Asset:Origem__c"),
    @empresaCompra = AttributeValue("Asset:Empresa_Compra__c"),
    @destino = AttributeValue("Asset:Destino__c"),
    @empresaOperadora = AttributeValue("Asset:Empresa_Operadora__c");
    @plataforma = AttributeValue("Asset:Plataforma_Embarque__c"),
    @poltrona = AttributeValue("Asset:Poltrona__c"),
    @tipoServico = AttributeValue("Asset:Tipo_Servico__c"),
    @tempoViagem = AttributeValue("Asset:Tempo_Viagem__c")


in the email these fields are returned in this part here

<p style="margin: 0; margin-bottom: 16px;"><strong>Nome [passageiro]: %%=v(@passageiro)=%% -&gt; conferir</strong><br>Nome [AssetName]: %%=v(@nome)=%% -&gt; conferir<br>CPF: %%=v(@cpf)=%% -&gt; Atualize seu cadastro<br>Numero Bilhete: %%=v(@numeroBilhete)=%%</p>
                 <p style="margin: 0; margin-bottom: 16px;"><strong>Data Viagem:</strong> %%=v(@dataViagem)=%%, %%=v(@horarioViagem)=%%<br><strong>Origem:</strong> %%=v(@origem)=%%<br><strong>Destino:</strong> %%=v(@destino)=%% Empresa Compra: %%=v(@empresaCompra)=%%</p>
                 <p style="margin: 0; margin-bottom: 16px;">Empresa Operadora: %%=v(@empresaOperadora)=%%<br>Plataforma Embarque: %%=v(@plataforma)=%%<br>Poltrona: %%=v(@poltrona)=%%<br>Tipo Servico: %%=v(@tipoServico)=%%<br>Tempo Viagem: %%=v(@tipoServico)=%%<br><br></p>

I feel like my ampscript is missing something, a lookuprows maybe? I apologize because my knowledge of this language is very shallow

if possible could you tell me what I can be correcting to make it run?

  • 1
    Please use this useful syntax checker by Zuzanna to check your AMPscript syntax ampscript.io... You need to SET your each variable using the 'SET' keyword... ex: SET @var1 = 'Test1' .... SET @var2 = 'Test2' Dec 15, 2022 at 13:05
  • thanks for the site indication for syntax checking Dec 15, 2022 at 13:25

1 Answer 1


In addition to what @Vishal said in the comment (SET each variable), I believe you're using a Salesforce entry source for this send based on the attributes' names.

Make sure you select the source data extension created when the journey is activated. Or at least a data extension whose columns have the exact same names you are using in your AMPScript, otherwise nothing will be shown.

It's kind of dumb, but who knows, make sure you have some records in that data extension too...

One last thing, there is no need to use a comma at the end of each line.

  • thanks for the help, I thought SET could be used like VAR, and register everything at once with the corrections I can already see the return of the information Dec 15, 2022 at 13:26
  • @felipemartins you are welcome. Don't forget to accept my answer by clicking on the check mark below the downvote, it would help others by giving it more visibility. Dec 15, 2022 at 13:29

You must log in to answer this question.

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