Demo Data Package
Demo Data Package Scenarios
34. Create an email campaign with expiration date
note the scenario below uses data from the deselect demo data package see docid 5 cozdtg0nwmlmeufrmbz scenario you want to create a customer birthday email campaign with a call to action that is only available for a limited amount of time you already have the birthdate of all the customers on your customers data extension (although, the birthdate's date values include the year that needs to be converted into the current year) in addition, you also want to add a new field to your target data extension that contains the call to action expiration date which is 45 days from the customers' birthdate in this case, we are going to create 2 selections to achieve the wanted result note this scenario uses the feature custom values, which is available in deselect segment advanced let's proceed! selection 1 converting the birthdate values to the current year's birthdate values 1\ input on the selections overview screen, click on new to create a new selection drag data extension deselect demo customers to the selected data extensions section 2\ output hit the create data extension button, enter a name, e g customers with current birthdate, and press save hit add all fields from deselect demo customers now we're going to add a custom value under custom values on the left, click add new value under name, enter " current year's birthdate " and hit next choose type apply formula to a field choose type apply any function and set the below setting on the field type, choose date on the syntax board, enter the below syntax dateadd(year, datediff(year, "deselect demo customers" "birthday", getdate()), "deselect demo customers" "birthday") hit save add the current year's birthdate custom value field to the target data extension fields hit save data extension and create 3\ preview when you click run preview on the preview screen, a results table will be shown with fields id, first name, last name, email, birthday, language, and country from deselect demo customers current year's birthdate from custom value selection 2 transform the current year's birthdate values to the call to action expiration date 1\ input on the selections overview screen, click on new to create a new selection drag data extension customers with current birthdate to the selected data extensions section 2\ output hit the create data extension button, enter a name, e g " customer with the call to action expiration date" , and press save add id and email and current year's birthdate fields to the target data extension fields now we're going to add a custom value under custom values on the left, click add new value under name, enter " call to action expiration date " and hit next choose type apply formula to a field choose type transform date and set the below syntax on the first drop down list with the label data extension choose customers with current birthdate on the second drop down list with the label field choose current year's birthdate on the add field, enter 45 and on the date part drop down list choose days under the format label choose date to include only the date on the convert timezone button, set it as disabled to keep the same time zone hit save add the call to action expiration date custom value field to the target data extension fields click save data extension and create we now have created an extra field in our target data extension that will contain the call to action expiration date the logic defined above will create a custom value for each row on the current year's birthdate column adding 45 days on each value as the call to action expiration date 3\ preview when you click run preview on the preview screen, a results table will be shown with fields id, email, and current year's birthdate from deselect demo customers call to action expiration date from custom value in the results, the date in the call to action expiration date field is 45 days later than in the current year's birthdate field