I have setup a triggered send AMPscripts in a cloud page, also created Tiggered Send under interaction, everything seems to be normal. But when I submit the form I am getting this error which I managed to pass through the parameters on to my error page.
Error 180008: Unable to queue Triggered Send Request.
There are no Valid Subscribers" in a Marketing Cloud API Triggered Send
Here is the AMPscript setup:
%%[
[name="profileFormPost";type="POST"]
SET @FirstName = RequestParameter("FirstName")
SET @Surname = RequestParameter("Surname")
SET @email = RequestParameter("email")
SET @SubFirstName = RequestParameter("SubFirstName")
SET @SubSurname = RequestParameter("SubSurname")
SET @Subemail = RequestParameter("Subemail")
SET @Travel_option = IIF(RequestParameter("Travel_option")=='true',1,0)
SET @Additional_option = IIF(RequestParameter("Additional_option")=='true',1,0)
SET @AdditionalFeed = RequestParameter("AdditionalFeed")
SET @AddFirstName1 = RequestParameter("AddFirstName1")
SET @AddSurname1 = RequestParameter("AddSurname1")
SET @AddFirstName2 = RequestParameter("AddFirstName2")
SET @AddSurname2 = RequestParameter("AddSurname2")
SET @AddFirstName3 = RequestParameter("AddFirstName3")
SET @AddSurname3 = RequestParameter("AddSurname3")
SET @AddFirstName4 = RequestParameter("AddFirstName4")
SET @AddSurname4 = RequestParameter("AddSurname4")
SET @RSVP_Submit_Date = RequestParameter("RSVP_Submit_Date")
/* Update DE */
SET @status =
InsertData
(
"RSVP_Test",
"FirstName", @FirstName,
"Surname", @Surname,
"email", @email,
"SubFirstName", @SubFirstName,
"SubSurname", @SubSurname,
"Subemail", @Subemail,
"Travel_option", @Travel_option,
"Additional_option", @Additional_option,
"AdditionalFeed", @AdditionalFeed,
"AddFirstName1", @AddFirstName1,
"AddSurname1", @AddSurname1,
"AddFirstName2", @AddFirstName2,
"AddSurname2", @AddSurname2,
"AddFirstName3", @AddFirstName3,
"AddSurname3", @AddSurname3,
"AddFirstName4", @AddFirstName4,
"AddSurname4", @AddSurname4,
"RSVP_Submit_Date", @RSVP_Submit_Date
)
/* Triggered Send */
var @emailaddrr, @ts, @tsDef, @ts_subkey, @ts_sub, @ts_statusCode, @errorCode
SET @emailaddrr = "[email protected]"
SET @ts = CreateObject("TriggeredSend")
SET @tsDef = CreateObject("TriggeredSendDefinition")
SET @ts_subkey = @emailaddrr
SetObjectProperty(@tsDef, "CustomerKey", "xxxxxx")
SetObjectProperty(@ts, "TriggeredSendDefinition", @tsDef)
SET @ts_sub = CreateObject("Subscriber")
SetObjectProperty(@ts_sub, "SubscriberKey", @ts_subkey)
SetObjectProperty(@ts_sub, "EmailAddress", @ts_subkey)
SET @attr1 = CreateObject("Attribute")
SET @attr2 = CreateObject("Attribute")
SET @attr3 = CreateObject("Attribute")
SET @attr4 = CreateObject("Attribute")
SET @attr5 = CreateObject("Attribute")
SET @attr6 = CreateObject("Attribute")
SET @attr7 = CreateObject("Attribute")
SET @attr8 = CreateObject("Attribute")
SET @attr9 = CreateObject("Attribute")
SET @attr10 = CreateObject("Attribute")
SET @attr11 = CreateObject("Attribute")
SET @attr12 = CreateObject("Attribute")
SET @attr13 = CreateObject("Attribute")
SET @attr14 = CreateObject("Attribute")
SET @attr15 = CreateObject("Attribute")
SET @attr16 = CreateObject("Attribute")
SET @attr17 = CreateObject("Attribute")
SET @attr18 = CreateObject("Attribute")
SetObjectProperty(@attr1, "Name", "FirstName")
SetObjectProperty(@attr2, "Name", "Surname")
SetObjectProperty(@attr3, "Name", "email")
SetObjectProperty(@attr4, "Name", "SubFirstName")
SetObjectProperty(@attr5, "Name", "SubSurname")
SetObjectProperty(@attr6, "Name", "Subemail")
SetObjectProperty(@attr7, "Name", "Travel_option")
SetObjectProperty(@attr8, "Name", "Additional_option")
SetObjectProperty(@attr9, "Name", "AdditionalFeed")
SetObjectProperty(@attr10, "Name", "AddFirstName1")
SetObjectProperty(@attr11, "Name", "AddSurname1")
SetObjectProperty(@attr12, "Name", "AddFirstName2")
SetObjectProperty(@attr13, "Name", "AddSurname2")
SetObjectProperty(@attr14, "Name", "AddFirstName3")
SetObjectProperty(@attr15, "Name", "AddSurname3")
SetObjectProperty(@attr16, "Name", "AddFirstName4")
SetObjectProperty(@attr17, "Name", "AddSurname4")
SetObjectProperty(@attr18, "Name", "RSVP_Submit_Date")
SetObjectProperty(@attr1, "Value", @FirstName)
SetObjectProperty(@attr2, "Value", @Surname)
SetObjectProperty(@attr3, "Value", @email)
SetObjectProperty(@attr4, "Value", @SubFirstName)
SetObjectProperty(@attr5, "Value", @SubSurname)
SetObjectProperty(@attr6, "Value", @Subemail)
SetObjectProperty(@attr7, "Value", @Travel_option)
SetObjectProperty(@attr8, "Value", @Additional_option)
SetObjectProperty(@attr9, "Value", @AdditionalFeed)
SetObjectProperty(@attr10, "Value", @AddFirstName1)
SetObjectProperty(@attr11, "Value", @AddSurname1)
SetObjectProperty(@attr12, "Value", @AddFirstName2)
SetObjectProperty(@attr13, "Value", @AddSurname2)
SetObjectProperty(@attr14, "Value", @AddFirstName3)
SetObjectProperty(@attr15, "Value", @AddSurname3)
SetObjectProperty(@attr16, "Value", @AddFirstName4)
SetObjectProperty(@attr17, "Value", @AddSurname4)
SetObjectProperty(@attr18, "Value", @RSVP_Submit_Date)
AddObjectArrayItem(@ts_sub, "Attributes", @attr1)
AddObjectArrayItem(@ts_sub, "Attributes", @attr2)
AddObjectArrayItem(@ts_sub, "Attributes", @attr3)
AddObjectArrayItem(@ts_sub, "Attributes", @attr4)
AddObjectArrayItem(@ts_sub, "Attributes", @attr5)
AddObjectArrayItem(@ts_sub, "Attributes", @attr6)
AddObjectArrayItem(@ts_sub, "Attributes", @attr7)
AddObjectArrayItem(@ts_sub, "Attributes", @attr8)
AddObjectArrayItem(@ts_sub, "Attributes", @attr9)
AddObjectArrayItem(@ts_sub, "Attributes", @attr10)
AddObjectArrayItem(@ts_sub, "Attributes", @attr11)
AddObjectArrayItem(@ts_sub, "Attributes", @attr12)
AddObjectArrayItem(@ts_sub, "Attributes", @attr13)
AddObjectArrayItem(@ts_sub, "Attributes", @attr14)
AddObjectArrayItem(@ts_sub, "Attributes", @attr15)
AddObjectArrayItem(@ts_sub, "Attributes", @attr16)
AddObjectArrayItem(@ts_sub, "Attributes", @attr17)
AddObjectArrayItem(@ts_sub, "Attributes", @attr18)
AddObjectArrayItem(@ts, "Subscribers", @ts_sub)
SET @ts_statusCode = InvokeCreate(@ts, @ts_statusMsg, @errorCode)
IF @status == 1 AND @ts_statusCode == "OK" THEN
Redirect(CloudPagesURL(152))
ELSE
Redirect(CloudPagesURL(151, 'TMsg', @ts_statusMsg, 'TStatus', @ts_statusCode, 'Terror', @errorCode))
ENDIF
]%%