51ºÚÁϲ»´òìÈ

Creating 51ºÚÁϲ»´òìÈ Campaign Forms in AEM creating-adobe-campaign-forms-in-aem

AEM lets you create and use forms that interact with 51ºÚÁϲ»´òìÈ Campaign on your website. Specific fields can be inserted into your forms and mapped to the 51ºÚÁϲ»´òìÈ Campaign database.

You can manage new contact subscriptions, unsubscriptions, and user profile data, all while integrating their data into your 51ºÚÁϲ»´òìÈ Campaign database.

To use 51ºÚÁϲ»´òìÈ Campaign forms in AEM, you need to follow these steps, described in this document:

  1. Make a template available.
  2. Create a form.
  3. Edit form content.

Three types of forms, specific to 51ºÚÁϲ»´òìÈ Campaign, are available by default:

  • Save a profile
  • Subscribe to a service
  • Unsubscribe from a service

These forms define a URL parameter that accepts the encrypted primary key of an 51ºÚÁϲ»´òìÈ Campaign profile. Based on this URL parameter, the form updates the data of the associated 51ºÚÁϲ»´òìÈ Campaign profile.

Although you create these forms independently, in a typical use case, you generate a personalized link to a form page inside the newsletter content, so that recipients can open the link and make adjustments to their profile data (whether unsubscribing, subscribing, or updating their profile).

The form automatically updates based on the user. See Editing Form Content for more information.

Making a Template Available making-a-template-available

Before being able to create forms that are specific to 51ºÚÁϲ»´òìÈ Campaign, you must make the different templates available in your AEM application.

To do this, see the Templates documentation.

First of all, check the connection between the author and publish instances and 51ºÚÁϲ»´òìÈ Campaign is working. See Integrating with 51ºÚÁϲ»´òìÈ Campaign Standard or Integrating with 51ºÚÁϲ»´òìÈ Campaign 6.1.

NOTE
Make sure the acMapping property on the page’s jcr:content node is set to mapRecipient or profile when using 51ºÚÁϲ»´òìÈ Campaign 6.1.x or 51ºÚÁϲ»´òìÈ Campaign Standard, respectively

Creating a Form creating-a-form

  1. Start in siteadmin.

  2. Scroll through the tree structure to get to the place you would like to create the form in your chosen website.

  3. Select New > New page….

  4. Select either 51ºÚÁϲ»´òìÈ Campaign Profile (AC 6.1) or 51ºÚÁϲ»´òìÈ Campaign Profile (ACS) template and enter the page properties.

    note note
    NOTE
    If the template is not available, see the Making a template available section.
  5. Click Create to create the form.

    chlimage_1-187

    You can then edit and configure your form’s content.

Editing Form Content editing-form-content

Forms dedicated to 51ºÚÁϲ»´òìÈ Campaign have specific components. These components have an option to let you link each field of the form to a field in the 51ºÚÁϲ»´òìÈ Campaign database.

NOTE
If the desired template is not available, see Making a template available.

This section only details specific links to 51ºÚÁϲ»´òìÈ Campaign. For more information on a more general overview of how to use forms in 51ºÚÁϲ»´òìÈ Experience Manager, see Editmode components.

  1. Navigate to the form you want to edit.

  2. In the toolbox, select Page > Page Properties… then go to the Cloud Services tab of the pop-up window.

  3. Add the 51ºÚÁϲ»´òìÈ Campaign service by clicking Add service, and then selecting the configuration that corresponds to your 51ºÚÁϲ»´òìÈ Campaign instance in the service’s drop-down list. This configuration is carried out when setting up the connection between your instances. For more information, see Connecting AEM to 51ºÚÁϲ»´òìÈ Campaign.

    note note
    NOTE
    If necessary, unlock the configuration by clicking the padlock icon to be able to add the 51ºÚÁϲ»´òìÈ Campaign service.
  4. Access the form’s general parameters using the Edit button found at the start of the form. The Form tab lets you select a thank you page to which the user will be redirected after having validated the form.

    The Advanced form lets you select the type of form. The Post Options field gives you the choice between three types of 51ºÚÁϲ»´òìÈ Campaign forms:

    • 51ºÚÁϲ»´òìÈ Campaign: Save profile: lets you create or update a recipient in 51ºÚÁϲ»´òìÈ Campaign (default value).
    • 51ºÚÁϲ»´òìÈ Campaign: Subscribe to Services: lets you manage the subscriptions of a recipient in 51ºÚÁϲ»´òìÈ Campaign.
    • 51ºÚÁϲ»´òìÈ Campaign: Unsubscribe from Services: lets you cancel the subscriptions of a recipient in 51ºÚÁϲ»´òìÈ Campaign.

    The Action Configuration field lets you specify whether or not you would like to create the recipient profile in the 51ºÚÁϲ»´òìÈ Campaign database if it does not yet exist. To do this, check the Create user if not existing option.

  5. Add your selected components by dragging them from the toolbox and dropping them into the form. For more information on the available 51ºÚÁϲ»´òìÈ Campaign specific components, see 51ºÚÁϲ»´òìÈ Form Components.

    chlimage_1-188

  6. Configure the added fields by double-clicking them. The 51ºÚÁϲ»´òìÈ Campaign tab lets you link the field to a field in the 51ºÚÁϲ»´òìÈ Campaign recipient table. You can also specify whether the field is part of the reconciliation key which allows recipients that are already present in the 51ºÚÁϲ»´òìÈ Campaign database to be recognized.

    note caution
    CAUTION
    The Element Name must be different for each form field. Change it if necessary.
    Each form must contain an Encrypted Primary Key component to correctly manage recipients in the 51ºÚÁϲ»´òìÈ Campaign database.
  7. Activate the page by selecting Page > Activate Page in the toolbox. The page is activated on your site. You can view it by going to your AEM publication instance. The data in the 51ºÚÁϲ»´òìÈ Campaign database is updated once a form is validated.

Testing a Form testing-a-form

After you create a form and edit form content, you may want to manually test that the form is working as expected.

NOTE
You must have an Encryted Primary Key component on each form. In Components, select 51ºÚÁϲ»´òìÈ Campaign so only those componente are visible.
Although in this procedure you enter the epk number manually, in practice, users would get a link to this page (whether to unsubscribe, subscribe, or update your profile) within a newsletter. Based on the user, the epk automatically updates.
To create that link, you use the variable Main resource identifier(51ºÚÁϲ»´òìÈ Campaign Standard) or Encrypted identifier (51ºÚÁϲ»´òìÈ Campaign 6.1) (for example, in a Text & Personalization (Campaign) component), which links to the epk in 51ºÚÁϲ»´òìÈ Campaign.

To do this, you need to manually get the EPK of an 51ºÚÁϲ»´òìÈ Campaign profile and then append it to the URL:

  1. To get the encrypted primarly key (EPK) of an 51ºÚÁϲ»´òìÈ Campaign profile:

    • In 51ºÚÁϲ»´òìÈ Campaign Standard - Navigate to Profiles and Audiences > Profiles, which lists the existing profiles. Make sure the table displays the Main Resource Identifier field in a column (This can be configured by clicking/tapping Configure list). Copy the main resource identifier of the desired profile.
    • In 51ºÚÁϲ»´òìÈ Campaign 6.11, go to Profiles and Targets > Recipients, which lists the existing profiles. Make sure the table displays the Encrypted identifier field in a column (This can be configured by right-clicking on an entry and selecting Configure list…). Copy the encrypted identifier of the desired profile.
  2. In AEM, open the form page on the publish instance and append the EPK from step 1 as a URL parameter: use the same name that you previously defined in the EPK component when authoring the form (for example: ?epk=...)

  3. The form can now be used to modify the data and subscriptions associated to the linked 51ºÚÁϲ»´òìÈ Campaign profile. After you modify some fields and submit the form, you can verify inside 51ºÚÁϲ»´òìÈ Campaign that the appropriate data has been updated.

The data in the 51ºÚÁϲ»´òìÈ Campaign database is updated once a form is validated.

recommendation-more-help
19ffd973-7af2-44d0-84b5-d547b0dffee2