Category: AMPscript30

  • Day 20 – Add dynamic URL

    Challenge To create dynamic URL for subscriber to click on within the email body. Solution Preview Summary After concatenating the URL, I chose to add it to the text “Take the survey” via the Link button with Link to “Other” and then paste the AMPscript code to the Link URL column. Alternatively, it can […]

  • Day 19 – Show custom image based on loyalty details

    Challenge To show custom image based on subscriber’s loyalty level. Solution Preview Summary Use the ContentImagebyKey(“Customer Key”) function to retrieve the image to the email content – make sure to use the Customer Key on the image (can be found on the image details). I made a mistake by writing the “ELIF” keyword instead […]

  • Day 18 – Dental Appointment Reminder

    Challenge To create reminder emails that display the appointment details. Solution Preview Summary Use ContentBlockbyName(1, 2, 3, 4, 5) to retrieve the pre-set content block in the email body. My understand of the challenge is to create multiple content blocks based on different appointment code to show different instruction messages, but due to my […]

  • Day 17 – Confirmation and reminder of borrowed books

    Challenge To display books borrow history for today and before based on different transaction dates. Solution Preview Summary Use LookupOrderedRows() function to returns a specified number of rows in the defined order with specified conditions on fields. The function returns an empty set when no values match.

  • Day 16 – Confirmation after purchase

    Challenge To display dynamic content using For loop. Solution Preview Summary Similar logic with the Day 15 challenge. After adding the error handler, MC will be able to display the error message and the email will not render for that particular subscriber as the process will be stopped.

  • Day 15 – Show dynamic content with For loop

    Challenge To display dynamic content using For loop. Solution Preview Summary For loop syntax: The <start expression> should be the start counter (usually set to 1), and the <end expression> should be the end counter (usually set another variable to the total count of rows and use it as the end counter). Since the […]

  • Day 14 – Record send date to Data Extension

    Challenge To write the send date into another Data Extension. Solution Preview Summary UpsertDE(name of data extension from which to update the specified row, number of columns used to build WHERE clause, column name to build WHERE clause, value used to build WHERE clause, column name to build INSERT clause, value used to build […]

  • Day 13 – Offer limited discount codes from a different Data Extension

    Challenge To provide a limited amount of discount codes to customers, once discount codes run out offer a smaller discount. Solution Preview Summary ClaimRowValue(name of data extension for claim or retrieve action, name of column in data extension from which to retrieve the return value, name of column in data extension that indicates a […]

  • Day 12 – Display loyalty details from different Data Extension

    Challenge To display customers’ transaction and loyalty details on the email. Solution Preview Summary Use LookupRows(name of data extension from which to return specified rows, column name used to identify rows to return, value used to match rows to return) to look up rows in another Data Extension based on the matched values. Use […]

  • Day 11 – Retrieve data from different Data Extensions

    Challenge Solution Preview Summary Data Extension Import – when importing data to a data extension, if a primary key is selected and multiple rows of data with the same primary exist, only one of the rows will be imported. Thus if the Record Count is lower than it’s supposed to be, double-check on the […]