Showing posts with label Integration. Show all posts
Showing posts with label Integration. Show all posts

Thursday, June 14, 2018

Adobe Search & Promote Integration

Background:

Integration of Adobe Search and Promote with AEM gives marketers extra edge to control their site search results compare to conventional OOTB Lucene or Solr searches. Marketers can control the ordering of results based on analytics performance, relevance and marketing needs. It gives capability to Inject promotional content with auto complete and type ahead features. Integrating S&P with AEM is quite simple.

Note: Adobe Search & Promote has been deprecated in AEM 6.5.

Prequisites:

1. You should have Adobe S&P license
2. S&P user account (Adobe will provide user account to manage S&P server settings once you purchase the license)

Integration Steps:

To call the Adobe Search&Promote service from your website, perform the following tasks:

1.   Specify the URL of the Cloud.
2.  Configure the connection to the Search&Promote service.
3. Configuring the Data Center
4.  Add Search&Promote components to Sidekick.
5. Use the components to author the content. (See Adding Search&Promote Features to a Web Page.)


Note:
If you are using Search&Promote with a custom proxy configuration, you need to configure both HTTP Client proxy configurations as some functionalities of AEM are using the 3.x APIs and some others the 4.x APIs:
  • 3.x is configured with http://localhost:4502/system/console/configMgr/com.day.commons.httpclient
  • 4.x is configured with http://localhost:4502/system/console/configMgr/org.apache.http.proxyconfigurator

  1. Changing the Search&Promote service URL

The default URL that is configured for the Search&Promote service is http://searchandpromote.omniture.com/px/. To use a different service, use the OSGi console to specify a different URL.

a. Open the OSGi console and click the Configuration tab. (http://localhost:4502/system/console/configMgr.)
b. Click the Day CQ Search&Promote Configuration item.
c. Enter the URL in the Remote Server URI box, and click Save.

2. Configuring the connection to Search&Promote

Configure one or more connections to Search&Promote so that your web pages can interact with the service. To connect, you need the member identification and account number of your Search&Promote account.

1.  From the Tools icon > Deployment, select Cloud Services.

This takes you to the Cloud Services Dashboard. If on a local machine, the url of the dashboard will look something like this:
http://localhost:4502/libs/cq/core/content/tools/cloudservices.html

2. In the Cloud Services page, click on the Adobe Search&Promote link or the Search&Promote icon.

If this is the first time you are configuring Adobe Search&Promote, click Configure Now to open the Create Configuration panel. Any existing Search&Promote Configuration appears below Available Configurations on the Cloud Services dashboard Adobe Search&Promote list item.

3.  Enter a Title that is recognizable to page authors, and enter a unique Name, then click Create.

The Edit Component window opens.

4. Add the following to the fields in the Edit Component dialog box.

Member ID
Account number


Note: In order to get this information yourself, first you need to log into http://searchandpromote.omniture.com/center/ using your valid Seach&Promote credentials (email/password). Then, you need to look at your url in your brouser's address bar which should look something like this:
http://searchandpromote.omniture.com/px/home/?sp_id=XXXXXXXX-spYYYYYYYY

Where:

XXXXXXXX corresponds with your Member id
spYYYYYYYY corresponds with your Account Number

5. Click Connect To Search&Promote.

When the connection success message appears, click OK.
(After connecting, the button text changes to Re-Connect To Search&Promote.)

6. Click OK.

The Search&Promote Settings page appears for the configuration that you have just created.

3.      Configuring the Data Center

If your Search&Promote account is in Asia or Europe, you need to change the default data center so it points to the right one (the default data center is for North American accounts).

To configure the data center:

1.  Navigate to the Web console at http://localhost:4502/system/console/configMgr/com.day.cq.searchpromote.impl.SearchPromoteServiceImpl

2.  Depending on the location of the server, change the URI to one of the following:

North America: https://center.atomz.com/px/
EMEA: https://center.lon5.atomz.com/px/
APAC: https://center.sin2.atomz.com/px/
3.  Click Save.

4.     Adding Search&Promote components to Sidekick

In Design mode, edit a par component to allow the Search&Promote components in Sidekick.

For information about using the components, see See Adding Search&Promote Features to a Web Page.)

5.  Binding Search&Promote account to individual sites

Configure web pages so that they use a specific Search&Promote service. Search&Promote components automatically use the service of their host page.

When you configure the Search&Promote properties for a page, all child pages inherit the settings. If required, you can configure child pages to override the inherited settings.

  1. Open the Page Properties dialog box. For example, on the Websites page, right-click the page and click Properties.
  2. Click the Cloud Services tab.
  3. To disable the inheritance of cloud services configurations from a parent page, click the padlock icon next to the inheritance path.
  4. Click Add Service, select Adobe Search&Promote, and click OK.
  5. Select the connection configuration for your Search&Promote account, and then click OK.

6. Generating a sitemap

Generate a sitemap of your web site that the Search&Promote service can read for indexing purposes. Follow Adobe documentation for more details on this.

Sunday, October 8, 2017

OKTA SSO Integration

If you need to integrate OKTA SSO with AEM, you will need following things from the OKTA application-
  1. IDP certificate
  2. Single sign-on URL (also called IDP URL)
  3. Okta Logout URL (If your application need to support logout)

OKTA Configuration

Below are the things which need to be done at OKTA side:
1. Go to Self service App for OKTA
2. Click on Register new application
3. Fill in required details. Below are few important fields which must be configured carefully-
  • SAML Reciept: This is the returning URL to AEM  after successful user authentication in OKTA. This URL is generally in this format- https://youraemsitedomain.com/saml_login 

    It is Frequently found issue that this URL is not setup properly. So while trouble shooting validate that after successful authentication from OKTA user must return to exactly /saml_login page.  Validate this in SAML XML response too. No ending slashes or any other page. If user is not returning to /saml_login then there is an issue at OKTA side or at your web server side. In the most cases, correcting the SAML receipt URL at OKTA side fixes this issue. In worst case, check rewrite rules at your webserver if they are not screwing it up.
  • SAML Audience: This is your AEM domain name. Example value- youraemsitedomain.com    Ensure no http or https or www.
  • SAML Name Id: Use EmailAddress here.

AEM Configuration

Below are the key steps to configure OKTA SSO at AEM side:

1. Create certificate file
     Copy the certificate string in a text file and save it as idp_cert.cert in your local computer

2. Upload certificate in crx under path /etc/key using blow steps
  • Go to crxde
  • Create a node "saml" under /etc/key:
             jcr:primaryType- sling:Folder,
             idp_cert- Binary
        Save the node
  • Double click on binary type for the property name "idp_cert" and upload the certificate file that was created in step 1 above.
     After step 2 - The node should look like this-


3. Now, Go to AEM admin console and navigate to: Tools > Security > Users

  • Open user - "Administrator", Scroll down for Account settings
  • Click on Create KeyStore, Enter a value for the password in both text boxes (Note down this password, this will be required to setup the SAML OSGi configuration)
  • Click on Manage TrustStore. Click on Add Certificate from CER file
  • Click on Select Certificate file, Navigate to idp_cert.cert file that you created in step 1 and uncheck Map Certificate to user
  • Click on Submit.
   Screen should look like this-

   Note down the Alias Value on the left colum. This will be required to setup the SAML OSGi configuration.

4. At Tools > Security > Users
  • Open user - "authentication-service", Scroll down for Account settings
  • Click on Create KeyStore and provide the same password . Click OK. 
    This will initialize the Keystore and Authentication Service to use the certificate you provided earlier. On clicking manage trust store button on the same page, you can see your previously created certificate.

5. Configure Saml Authentication Service
  • Go to /system/console/configMgr
  • Open "SAML 2.0 Authentication Handler"
  • Add required details
6. Configure the Referred filter
  • On the System console configMgr, Open "Apache Sling Referrer filter"
  • Add the Okta domain name e.g. "mysite.okta.com"

Other things you may need to setup this functionality is:
  • Create new user group- for default user group configured in step 5
  • Create CUG for the path (May be this can be skipped, as it worked for me without CUG setup)

This article is specifically articulated for OKTA integration. Refer the Adobe documentation  for integrating SSO with other SAML providers - https://helpx.adobe.com/experience-manager/using/aem63_saml.html

Thursday, August 4, 2016

AEM6 | Integration with Translations.com

Translations.com's GlobalLink Project Director integrates with Adobe Experience Manager, providing users with a powerful solution to initiate, automate, control, track, and complete all facets of the translation process.


Refer the following links for more details-
http://www.translations.com/products/globallink-AEM-adaptor,
http://www.translations.com/globallink/partners/adobe.html

Translations.com provide packages (in Zip farmat) which can be installed through AEM package manager. They provide two packages- 

a.       GlobalLink-Adaptor-4.7.6.zip (Check the latest packages from TDC site)

b.      GlobalLink-Workflows-2.1.zip (Check the latest packages from TDC site)

Please note that this is not an open source product and you need to contact to TDC to get these packages. Once packages installed, required page templates will be available. Look at the screenshot below-



You need to create pages for each template under /content/global-link (Their latest Adaptor package doesn't need this activity. Their configuration is available from /projects.html page of the AEM instance)-


Configuring Translation.com

First add the new Translation vendor to Translation configurations-































  • On the rail, click or tap Tools > Operations > Cloud > Cloud Services.
  • In the Adobe Marketing Cloud/Translation Integration area, click or tap Show Configurations.
  • Click the + link next to Available Configurations.
    file
  • Type a title for your configuration. The title identifies the configuration in the Cloud Services console as well as in page property drop-down lists. The default name is based on the title. Optionally, type a name to use for the repository node that stores the configuration. 
  • Click Create.
  • On the configuration page, click Edit.
  • On the Translation Integration Configuration tab, select the translation provider, and select the category to use for translating the content.  
  • (Optional) On the User Generated Content tab, select the repository node where the original user-generated content and the translations are stored.
  • Click OK.

  • Now, Go to the Adaptor configuration page in AEM- http://localhost:4502/content/global-link/globallink-adaptor-configuration.html and enter required details for TDC web service URL, account user name, password etc. Screen also asks you to define a language key mapping and properties to include for translation.

    Scheduling Translations

    I am taking here an example of Asset's description metadata field. To submit asset's “description” metadata for translation, follow below steps-

    2. Fill in required details.  Click on the “Find Metadata” button; it will show up the result assets available for translation. Only those assets will be listed which have description property set.
    3.       Expand the asset(s), and check the metadata fields need to be send for translation. Next, move to the “Target Languages” drop-down and select the desired languages. Click on the “Start Workflow” button to initiate the translation workflow. Look at the screenshot below-



    4.       After this, go to TDC submission list page to check status- http://localhost:4502/content/global-link/globallink-adaptor-submissions-list.html

    Verifying Translation

    Translation workflow will update node properties sent for translation with translated text automatically once response is received.

    In order to display translation in front end, you can customize AEM UI to show translated data. In this example I will add a new tab named "Alt Text Translation" to show all Alttext translations to the author. 


    Select "Default" (You can pick image, forms etc. depending on your requirement) and Click on pencil icon to edit it. 

    1. Use the "+" icon next to tags in left hand screen to add a new tab- "Alt Text Translation"
    2. Use the "Build Form" in right hand screen to add language fields.

    Look at the below snapshot on how should it look-



    Once you have saved the metadata template, you can go to Asset Properties from Assets section. The properties section will look like this-


    Note: This article is based on integration of an older version of Translations.com Global Link Adaptor. While working with new adapter version, all above steps may not be required.

    Tuesday, July 26, 2016

    SDI Integration to render dynamic content through web server

    Below are the steps to integrate Sling Dynamic Include in your project:

    1. Download the source code from- https://github.com/Cognifide/Sling-Dynamic-Include and put it in a folder
    2. Run a mvn clean install command in the folder containing pom.xml
    3. Go to the target folder and pick the created jar file (so generated SDI jar)
    4. Install the bundle in AEM OSGi or placeit in your project install folder
    5. Follow the steps given at- https://github.com/Cognifide/Sling-Dynamic-Include

    CDN | Clearing Cloudflare cache

    In order to clear Cloudflare cache automatically via code, follow below steps: 1. Develop Custom TransportHandler Develop a custom Trans...