EVENT REGISTRATION CLOUDPAGE

EventFlow

Event Registration CloudPage Thumbnail

Navigate To:

Github Repository Button

Description

An event registration CloudPage for ‘EventFlow’ built in Salesforce Marketing Cloud using SSJS, AMPscript, HTML, and CSS, which utilizes the REST API to trigger a Welcome Journey upon successful form submission.

Scenario

You are working with an event management company that organizes workshops.

They want to set up an event registration CloudPage where users can sign up for an upcoming workshop.

Requirements

-The user’s information should be stored in a data extension named EventRegistrationDE

-The user should be enrolled in a confirmation journey, which sends a welcome email and further event details

-Log successful registrations and any errors encountered during the process in a data extension named EventRegistrationLog

-Customers can register for one event only

-The CloudPage should expire after the event date, preventing any further registrations

SSJS & AMPscript Features:

-Conditional Logic

-Data Extension Operations

-Encryption & Decryption

-API Calls

-JSON Processing

-Error Handling

-Logging & Debugging

Studios/Builders:

-Email Studio

-Content Builder

-Contact Builder

-Web Studio

-Journey Builder

Project Walkthrough:

Step 1: Created a Data Flow Diagram to visualize entire development process

Data Flow Diagram

Gray Horizontal Line

Step 2: Created two data extensions: EventRegistrationDE (used to trigger the Welcome Journey) and EventRegistrationLog (used to capture successful registrations and error logs) in Email Studio

Data Extensions

Gray Horizontal Line

Step 3: Created 2 Symmetric Keys and 1 Salt Key in Marketing Cloud Setup > Key Management

Populated Pre-Shared Key and Salt values by generating a random 16-digit hex code using an online Hex Number Generator

Symmetric Key #1:

Symmetric Key 1

Symmetric Key #2:

Symmetric Key 2

Salt Key:

Salt Key

Gray Horizontal Line

Step 4: Created “API Encryption Generation” Email in Content Builder

Code:

Github Repository Button

API Encryption Generation Email

Gray Horizontal Line

Step 5: Previewed email by clicking on “Preview and Test” tab

*Email is used to generate the encrypted Client ID and Client Secret, and confirm that the original and decrypted values are both the same*

API Encryption Email - Preview and Test

Gray Horizontal Line

Step 6: Created Enc_API_Credentials data extension and added API values manually through Contact Builder

*Had to create new API integration containing new Client ID and Client Secret so the values within the DE differ*

Enc_API_Credentials

Gray Horizontal Line

Step 7: Developed the CloudPage using SSJS, AMPscript, HTML, and CSS

Code:

Github Repository Button

CloudPage

Gray Horizontal Line

Step 8: Built the journey and set the appropriate settings in Journey Builder

*This journey is solely for testing purposes, whereas a real-world scenario would also include the sending of a Welcome Email for this use case*

Journey:

Journey Unactivated

Gray Horizontal Line

Decision Split:

Decision Split

Journey Data is used in the decision split to route contacts based on their entry-time data, even if the source data changes later

Journey Data

Gray Horizontal Line

Journey Settings:

Journey Settings

Gray Horizontal Line

Step 9: Fill out information in form and click “Submit Registration”

CloudPage Before

Gray Horizontal Line

Step 10: View registration message and inputted data in top left corner (solely for testing purposes)

Successful Registration Example:

CloudPage After - Success

Failed Registration Example:

Due to having already submitted, invalid API token, journey failed to trigger, missing parameters, etc.

CloudPage After - Failed

Gray Horizontal Line

Step 11: For successful registrations, confirmed API Event has triggered and contact is injected into Journey

Gray Horizontal Line

Step 12: Confirmed that the user’s information has been successfully stored in the data extension EventRegistrationDE

*Screenshot was taken before Peter was submitted, so he doesn’t appear in DE yet, but you can see the other records populate*

Event Registration Data Extension - After

Gray Horizontal Line

Step 13: Confirmed logging of successful registrations and any errors encountered during the process in the data extension EventRegistrationLog

Event Registration Log - After