We designed a cloudpage with a simple form (bootstrap CSS utilized) that has 2 'textarea' types of fields (so, basically, free comment areas). Since this survey will be sent to our subscribers existing in a dedicated data extension for whom we already have relevant data, including emailAddress, we'd like those who fill out the survey to enter a journey as they would if we'd used the SF SmartCapture form.
Now, I was told by an SF expert that the easiest solution would be to use the API entry event in Journey Builder, as opposed to triggered sends in Email Studio which I have used in the past (involving AMPscript code or WSProxy, etc.). Anyway, is there a way to do this elegantly with Journey Builder?
I already created a journey with an API event as trigger and selected a target DE. This type of an event generated automatically an event definition key.
Also, here's the code we used to design the CloudPage and the form: (I'm not pasting the entire html, no need):
%%[ /* Page 1 */
VAR @externalID, @url
SET @externalID=RequestParameter('CustomerID')
SET @url=CloudPagesURL(1691,'CustomerID', @externalID)
]%%
<!-- HTML - form part - page 1 -->
<div class="optin-form">
<form action="%%=CloudPagesURL(1691)=%%" method="GET">
<div class="form-group">
<label for="textArea1">Question 1?
</label>
<textarea class="form-control" name="textArea1" id="textArea1" rows="8"></textarea>
</div>
<div class="form-group">
<label for="textArea2">Question 2?
</label>
<textarea class="form-control" name="textArea2" id="textArea2" rows="8"></textarea>
</div>
<div class="btn-wrapper">
<button class="btn btn-default" type="submit">Submit</button>
</div>
<input type="hidden" name="CustomerID" value="%%=v(@externalID)=%%">
</form>
</div>
</div>
</div>
</div>
</div>
%%
Page 2
/*Page 2 AMPscript - validation */
%%[
VAR @externalID, @extID, @url, @textArea1, @textArea2
SET @externalID=RequestParameter('CustomerID')
SET @textArea1 = RequestParameter('textArea1')
SET @textArea2 = RequestParameter('textArea2')
IF NOT EMPTY(@textArea1) THEN
UpsertDE('Key_Priorities', 1, 'CustomerID', @externalID, 'Employee_life', @textArea1)
ENDIF
IF NOT EMPTY(@textArea2) THEN
UpsertDE('Key_Priorities', 1, 'CustomerID', @externalID, 'Customer_life', @textArea2)
ENDIF
SET @url=CloudPagesURL(1690, 'CustomerID', @externalID)
]%%
<!-- html page 2- form continue-->
<div class="background-gradiant">
<form action="%%=CloudPagesURL(1690)=%%" method="post">
<div class="container">
<div class="row">
<div class="col-xs-10 col-xs-offset-1 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3">
</div>
<div class="col-xs-10 col-xs-offset-1 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3 background-white">
<div class="title-h3" style="color: #000000;">Thank You!</div>