Use cases: web forms use-cases-web-forms

Create a subscription form with double opt-in create-a-subscription--form-with-double-opt-in

When you offer information services, recipients need to subscribe to receive all linked communications. To avoid improper communications and make sure the recipient subscribed intentionally, we recommend sending a subscription confirmation request to create a double opt-in. The subscription will only be effective once the user clicks the link included in the confirmation message.

This example is based on the following scenario:

  1. Creating a newsletter subscription form on a website that contains a checkbox for subscribing to a temporary service. This service will enable you to deliver subscription confirmation messages.
  2. Creating the subscription confirmation delivery with a delivery template linked to the Web form. It contains the confirmation link that calls up the form for newsletter subscription and displays a subscription approval message.

Step 1 - Creating information services step-1---creating-information-services

  1. Create the newsletter subscription service to be offered to your recipients. For more information on how to create a newsletter, refer to this section.

    Service dialog for the Weekly Newsletter service with Label, Internal name, Type Email and Mode Newsletter fields.

  2. Create a second information service, a temporary service linked to a delivery template for sending subscription confirmation messages.

    Temporary Service (tempservice) dashboard showing Type Email, Mode Newsletter and its folder.

Step 2 - Creating confirmation messages step-2---creating-confirmation-messages

Confirmation messages are sent via a dedicated delivery template referenced at the temporary service level.

  1. In the Explorer , select Resources > Templates > Delivery templates.

  2. Create a delivery template for sending the subscription confirmation messages.

  3. Click the To button in the Email parameters to associate the delivery template with the Subscriptions target mapping instead of Recipients.

    Select target dialog on the delivery template with the Subscriptions (nms) target mapping selected.

  4. Since the recipients of this delivery haven’t confirmed their approval, they are still on the database denylist. For them to receive this communication, you need to authorize deliveries based on this template to target recipients on the denylist.

    To do this, click the Exclusions tab.

  5. Click the Edit… link and uncheck the Exclude recipients who no longer want to be contacted option.

    note important
    IMPORTANT
    This option may only be disabled in this type of context.
  6. Personalize your delivery and insert the confirmation link into the message content. This link lets you access the Web form to record subscription confirmation.

    Confirmation email in the delivery editor with a first name personalization field and a Click here link.

  7. With the DCE, link your URL to the Web form. Since the Web form is not yet created, replace the value as soon as you create it.

    Hypertext link pane with the Web application field, still empty, for the Click here link in the confirmation email.

  8. Finally, link this template to the temporary service previously created.

    Temporary Service Edit tab with the confirmation delivery selected in the Subscription field.

Step 3 - Creating the subscription form step-3---creating-the-subscription-form

The Web form enables both recipient subscription and subscription confirmation.

The Web form workflow will include the following activities:

Web form workflow: Preloading, Test, then Email empty leads to Script Blocklist, Subscription, Storage, End.

To do this, follow the steps below:

  1. Create a Web form and choose the template Newsletter subscription (subNewsletter).

    New Web application dialog with the Newsletter subscription (subNewsletter) template selected.

  2. In the Edit tab, we need to configure the existing workflow since we want to add a confirmation message to the recipients who want to subscribe.

    To do so, double-click the Preloading box and configure it as follows.

    Preloading activity dialog with Auto-load data referenced in the form and Skip preloading if no ID selected.

    This means that if the user accesses this form via the link in the confirmation message, their profile information will be loaded. If they access the Web form via a page of the website, no information will be loaded.

  3. Add a Test activity to your workflow.

    Web form workflow with a Test activity that branches on Email empty to Subscription, Storage and End.

    The Test activity can concern the recipient email. In this case, configure it as follows:

    Test activity branch editor with the condition @email is not empty.

  4. Add two Script activities to your workflow.

    Web form workflow with a Script activity on each branch of the Test activity.

    The first Script activity will add recipients on denylist until they have confirmed their subscription to the newsletter. Its content must be as follows:

    code language-javascript
    ctx.recipient.@blackList=1
    

    Script Blocklist activity containing the script ctx.recipient.@blackList=1.

    The second Script activity authorizes deliveries to be sent to the users and subscribes them to the newsletter. The last two lines of the script will allow you to transfer your recipients from the temp folder to another folder and be reconciled with existing profiles as soon as they have confirmed the subscription.

    code language-javascript
    ctx.recipient.@blackList=0
    nms.subscription.Subscribe("INTERNAL_NAME_OF_THE_NEWSLETTER", ctx.recipient, false)
    ctx.recipient.folder = <folder name="nmsRootRecipient"/>
    nms.subscription.Unsubscribe("TEMP", ctx.recipient)
    
    note
    NOTE
    The Temp partition can also be purged on a regular basis using a workflow.

    Second Script activity containing the unblocklist, Subscribe, folder and Unsubscribe script lines.

  5. Double-click the Subscription activity to personalize the subscription form and link a checkbox with the temporary service previously created.

    Page editor with the consent checkbox linked to the Temporary Service in the Service field.

  6. Configure the Storage activity to save the information entered in the form page.

    This activity lets you create recipient profiles in a dedicated temporary folder to set them apart from the profiles in the database, whom communications can be sent to.

    Storage activity dialog with the Temp folder set as the creation folder.

    note
    NOTE
    You must not define any reconciliation options.
  7. Add two End activities to display a message for the user.

    The second End box will display the confirmation message once the subscription is complete.

    End activity dialog with the message Your subscription is complete. You will soon receive our Newsletter.

  8. Once the Web form is created and configured, you can now reference it in the delivery template to send confirmation messages.

    Confirmation delivery with the Click here link pointing to the Newsletter subscription double opt-in Web application.

Step 4 - Publishing and testing the form step-4---publishing-and-testing-the-form

You can now publish the form to make it accessible to users.

Web application dashboard with the Publish button and the message that it must be published to be accessed online.

Subscription to the newsletter involves the following steps:

  1. The user of the website logs on to the subscription page and approves the form.

    Newsletter subscription form in a browser with name and email filled in, consent box checked and I subscribe button.

    They are notified via a message in their browser that their request has been taken into account.

    Browser End page saying the request has been registered and a message will follow.

    The user is added to the Adobe Campaign database in the Temp folder, and their profile is on denylist until they confirm their subscription with the email.

    Temp recipients folder with the new profile selected and No longer contact (by any channel) checked.

  2. A confirmation message including a link for approving their subscription is sent to them.

    Subscription confirmation email with a Click here link to confirm the newsletter subscription.

  3. When they click this link, the approval page is displayed in their browser.

    Browser page titled Congratulations! confirming the subscription is now active.

    In Adobe Campaign, the user profile is updated:

    • they are no longer on denylist,

    • they are subscribed to the information service.

      Updated recipient profile with No longer contact cleared and the Newsletter Movie subscription listed.

Displaying different options depending on the selected values displaying-different-options-depending-on-the-selected-values

In the following example, the user is asked to select a type of vehicle. You can display the available vehicle categories according to the type selected. This means that the items displayed in the right-hand column depend on the user’s selection:

Car selection page with a Type of car drop-down list set to Select.

  • When the user selects ‘private vehicle’, the choice between “Compact” and “Minivan” is offered.

    Car selection page with Personal car selected, showing the Standard and Compact options.

  • When the user selects ‘commercial vehicle’, a selection is displayed in a drop-down list:

    Car selection page with Moving truck selected and a Class drop-down list of vehicle types.

In this example, the vehicle type is not stored in the database. The drop-down list is configured as follows:

Type of car combo box properties with the values Select, Personal car and Moving truck.

This information is stored in a local variable.

The right-hand column’s conditional display is configured in the containers:

Storage dialog with the Variable option selected for the Type of car field.

  • Conditional visibility of fields for a private vehicle:

    Visibility condition on the Personal Car container: type of car equal to Personal car.

  • Conditional visibility of fields for a commercial vehicle:

    Visibility condition on the Truck/Van container: type of car equal to Moving truck.

recommendation-more-help
campaign-help-v8