In a realm with Customer Key enabled, you have the option to create an unsubscribe form using the Email address or the Customer Key to search for the contact. Customer Key is only available on some systems.
To create an Unsubscribe Form using Customer Key
- Go to CONTACTS > SUBSCRIPTION FORM WIZARD.
- Select a List.
- From Generate select 'Unsubscribe Form'.
- Select 'Use customer key for contact lookup'.
- Enter a Goto URL for the landing page. If no landing page is defined, the form will use the Landing Page defined in your List properties. If no Landing Page is defined, the contact will see a default platform welcome page.
- Enter an Error Landing Page. If no landing page is defined, the form will use the Landing Page defined in your List properties. If no Landing Page is defined, the contact will see a default platform error page.
- Click NEXT.
- Select the form code and paste into a text editor to customize the form further, then place the form code iinto your website.
Please consider carefully how you wish to proceed when using the Customer Key for Unsubscribe Forms. If you choose to create an Unsubscribe Form using the Customer Key, you must be sure your contact knows their Customer Key (perhaps it is an account number), or you must include code in your form to insert the Customer Key for the contact.
In most cases, it will be easier for the contact to use their Email Address instead of their Customer Key. If you want to create an Unsubscribe Form using the Email Address instead, then select 'Use email for contact lookup' in step 4.
Example
The following is an example of how the form code will appear, where [siteURL] is the URL of your domain, [slid] is the special list id, [gotoURL] is the success Landing Page, and [errorURL] is the Error Landing Page. In this basic example, the Customer Key field is labeled "Account Number" and assumes the contact will know this information.
<form action="http://[siteURL]/bin/listctrl" method="POST" name="unsubscribe_form"> <input type="hidden" id="slid" name="slid" value="[slid]" /> <input type="hidden" id="cmd" name="cmd" value="unsubscribe" /> <input type="hidden" id="goto" name="goto" value="[gotoURL]" /> <input type="hidden" id="errors_to" name="errors_to" value="[errorURL]" /> Account Number: <input type="text" name="customer_key" size="20" /> <input type="submit" value="Unsubscribe" /> </form>
Testing the Form
Once you have created a form, test it to ensure it is functioning as expected. To test your unsubscribe form:
- Login to your realm.
- Go to CONTACTS > SEARCH FOR CONTACT.
- Click ADD.
- Enter an Email address and Customer Key to create a test contact. Click the Subscription tab and select the list to test against, then click SAVE.
- Save the form as an .html file.
- Open the .html file in your browser.
- Fill the form fields with the test Email address or Customer Key, then submit the form.
- Login to your realm.
- Go to CONTACTS > SEARCH FOR CONTACT.
- Enter the Email address or Customer Key submitted above, then click SEARCH.
- Double click the contact record to view the details.
- Verify the subscription was removed in the Subscription tab.