0

I have a question regarding Contact Builder.

What exactly does the Help page mean when it says: "The app also links customer data back to the original contact record."?

Getting Started with Contact Builder

By this I thought that I would be able to link/merge in data into my emails from parameters from "downstream" data extensions. E.g., if I use the P.I. data designer, I could merge in Regular Price and Sales Price in the email even though that information is linked to the original Data Extension (See screenshot).

enter image description here

However, when I tried this with a "downstream" variable called "product_id" I would use this code syntax:

%%[

   VAR @product_id
   SET @product_id = [product_id]

]%% 

%%=v(@product_id)=%%

However, got the following error:

subscriber preview failed to generate. Review the details, correct all issues, and try again. An unrecognized expression appears in a script block. Script Expression: [product_id]

What am I missing? How can I associate the merge field options from the "downstream" data extensions?

Thanks for your help!

0

Then subscriber preview error may come because the field "product_id" is not available in the data extension which is used for the subscriber preview.

When you use the brackets in AMPscript to retrieve a field from a data extension, it HAS to be in the data extension which you uses for the subscriber preview (or email send). when the field is not available in the data extension it generates an error. To avoid this you could use the AttributeValue() function (leaves the variable empty if the field is not available):

SET @productId = AttributeValue("product_id")

Regarding linking to other data extensions with AMPscript: As far a I know it is not possible to directly target a linked data extension unless that data extension is used for the subscriber preview. To retrieve values from another data extension with AMPscript you should use functions like LookupRows() and LookupOrderedRows(). Use the same fields to link the data extensions to each other as it is shown in the Contact Builder.

Hope this helps.

AttributeValue() function

LookupRows() function

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.