In this blog, we are going to see how we can send a SFMC triggered email via AMPscript and Triggered Sends.
Create a Triggered Send Data extension:
Go to Email Studio --> Email --> Data extensions --> Create data extension
Select 'Standard Data extension'
In creation method, select 'create from template' and select 'TriggeredSendDataExtension'
Add few other attributes according to requirement as shown in the below screenshot:
Create a Triggered send UI In SFMC:
Go to Email Studio --> Email --> Interactions --> Triggered Sends
Select create and give a name for triggered email
Select the email which needs to be sent
Select the triggered data extension wherein the records needs to be added and select the all subscriber list to add the records in the same list.
Click on Save and select 'Start/Restart' to activate the triggered sends
Add AMPscript in Cloud Page:
In order to create triggered send and triggered send definition, we need to use CreateObject function which is @ts ,@tsDef and @ts_sub.
We will specify the attributes of the Triggered Send object and the Subscriber object using SetObjectProperty function.
In order to trigger an email, we would need to use the InvokeCreate function.
Simple form for Demo:
On click of submit, you can see that the same records gets inserted into data extension and will receive an email immediately to the respective email address including first name and last name with personalization.
Hope now you have an idea on how to implement triggered sends in the SFMC cloud page.
Please feel free to leave your feedback/comment in case of any queries.