Skip to main content

Posts

Showing posts from June, 2026

AMPscript Day 4 - Statement IIF() Function Guide

 Salesforce Marketing Cloud (SFMC) - IIF() Function Guide What is IIF()? IIF() is a shorthand AMPscript conditional function used to return one value when a condition is true and another value when false. Syntax: IIF(condition, value_if_true, value_if_false) Use case to perform: Use Case 1: Personalized Greeting IIF(Gender == "Male","Mr.","Ms.")  Use Case 2: Loyalty Member Classification IIF(MemberStatus == "Gold","Premium Benefits","Standard Benefits")  Use Case 3: Dynamic Discount Assignment IIF(TotalPurchase > 10000,"20% OFF","10% OFF")  Use Case 4: Age Verification IIF(Age >= 18,"Adult","Minor")  Use Case 5: Cart Abandonment Journey IIF(IsCartAbandoned == "True","Complete Your Purchase Today","Thank You For Shopping")  Use Case 6: Mobile App Adoption IIF(IsAppUser == "Yes","Open App","Download App")  Use Case 7: Lead S...

AMPscript - Day 3 - Conditional Statement & Control Flow

Basic IF-ELSE-ELSEIF-THEN-ENDIF: Confluence Link: https://elearningit24.atlassian.net/wiki/external/MjhmNTRmOWIzNmUyNDVkMTgzN2MxNmFiZjk2MzExMjQ Quick understanding of each Conditional Statements IF: Starts the statement and checks the very first condition. THEN: Defines the action or code block to run if the preceding IF condition is true. ELSEIF: Tests additional, alternative conditions if all previous IF or ELSEIF conditions were false. ELSE: A final "catch-all" block that runs only if none of the preceding IF or ELSEIF conditions were met. ENDIF: Closes the entire conditional statement and allows the rest of the program to continue running Conditional Flow: AMPscript conditional logic is used in Salesforce Marketing Cloud to control personalization, dynamic content, and decision-making inside Emails, CloudPages, and Journeys. AMPscript has only one core conditional statement: IF Statement: The IF statement checks a condition and executes code only if the condit...