🍎
Comprehensive Technical Tutorial for AEP
  • Comprehensive Technical Tutorial for Adobe Experience Platform
    • Architecture
    • Video Overview
  • 0 - Getting started
    • 0.0 Which environment do I use?
    • (Deprecated) Install the Chrome extension for the Experience League documentation
    • 0.1 Use Demo System Next to setup your Adobe Experience Platform Data Collection client property
    • 0.2 Create your Datastream
    • 0.3 Set up the website
    • 0.4 Set up the mobile app
    • 0.5 Ingest Data to AEP through the Website
    • 0.6 Ingest Data to AEP through the Mobile App
    • 0.7 Visualize your own Real-time Customer Profile - UI
    • 0.8 See your Real-time Customer Profile in action in the Call Center
    • 0.9 Set up and use the AEP API to visualize your Real-Time Customer Profile
    • 0.10 Install the Experience Platform Debugger Extension
    • 0.11 What if I want to demonstrate basic AEP concepts directly on a live website?
  • 1 - Adobe Experience Platform Data Collection and the Web SDK extension
    • 1.1 Understanding Adobe Experience Platform Data Collection
    • 1.2 Edge Network, Datastreams and Server Side Data Collection
    • 1.3 Introduction to Adobe Experience Platform Data Collection
    • 1.4 Client-side Web Data Collection
    • 1.5 Implement Adobe Analytics and Adobe Audience Manager
    • 1.6 Implement Adobe Target
    • 1.7 XDM Schema requirements in Adobe Experience Platform
    • Summary and Benefits
  • 2 - Data Ingestion
    • 2.1 Explore the Website
    • 2.2 Configure Schemas and Set Identifiers
    • 2.3 Configure Datasets
    • 2.4 Data Ingestion from Offline Sources
    • 2.5 Data Landing Zone
    • Summary and Benefits
  • 3 - Real-time Customer Profile
    • 3.1 Visit the website
    • 3.2 Visualize your own real-time customer profile - UI
    • 3.3 Visualize your own real-time customer profile - API
    • 3.4 Create a segment - UI
    • 3.5 Create a segment - API
    • 3.6 See your Real-time Customer Profile in action in the Call Center
    • Summary and benefits
  • 4 - Query Service
    • 4.0 Prerequisites
    • 4.1 Getting Started
    • 4.2 Using the Query Service
    • 4.3 Queries, queries, queries... and churn analysis
    • 4.4 Generate a dataset from a query
    • 4.5 Query Service and Power BI
    • 4.6 Query Service and Tableau
    • 4.7 Query Service API
    • Summary and benefits
  • 5 - Intelligent Services
    • 5.1 Customer AI - Data Preparation (Ingest)
    • 5.2 Customer AI - Create a New Instance (Configure)
    • 5.3 Customer AI - Scoring Dashboard and Segmentation (Predict & Take Action)
  • 6 - Real-time CDP - Build a segment and take action
    • 6.1 Create a segment
    • 6.2 Review how to configure DV360 Destination using Destinations
    • 6.3 Take Action: send your segment to DV360
    • 6.4 Take Action: send your segment to an S3-destination
    • 6.5 Take Action: send your segment to Adobe Target
    • 6.6 External Audiences
    • 6.7 Destinations SDK
    • Summary and benefits
  • 7 - Adobe Journey Optimizer: Orchestration
    • 7.1 Create your event
    • 7.2 Create your journey and email message
    • 7.3 Update your Data Collection property and test your journey
    • Summary and benefits
  • 8 - Adobe Journey Optimizer: External data sources and custom actions
    • 8.1 Define an event
    • 8.2 Define an external data source
    • 8.3 Define a custom action
    • 8.4 Create your journey and messages
    • 8.5 Trigger your journey
    • Summary and benefits
  • 9 - Adobe Journey Optimizer: Offer Decisioning
    • 9.1 Offer Decisioning 101
    • 9.2 Configure your offers and decision
    • 9.3 Prepare your Data Collection Client property and Web SDK setup for Offer Decisioning
    • 9.4 Combine Adobe Target and Offer Decisioning
    • 9.5 Use your decision in an email
    • 9.6 Test your decision using the API
    • Summary and benefits
  • 10 - Adobe Journey Optimizer: Event-based Journeys
    • 10.1 Configure an event-based journey - Order Confirmation
    • 10.2 Configure a batch-based newsletter journey
    • 10.3 Apply personalization in an email message
    • 10.4 Setup and use push notifications
    • 10.5 Create a business event journey
    • Summary and benefits
  • 11 - Customer Journey Analytics - Build a dashboard using Analysis Workspace on top of Adobe Experie
    • 11.1 Customer Journey Analytics 101
    • 11.2 Connect Adobe Experience Platform Data Sets in Customer Journey Analytics
    • 11.3 Create a Data View
    • 11.4 Data Preparation in Customer Journey Analytics
    • 11.5 Visualization using Customer Journey Analytics
    • Summary and benefits
  • 12 - Ingest & Analyze Google Analytics data in Adobe Experience Platform with the BigQuery Source Co
    • 12.1 Create your Google Cloud Platform Account
    • 12.2 Create your first query in BigQuery
    • 12.3 Connect GCP & BigQuery to Adobe Experience Platform
    • 12.4 Load data from BigQuery into Adobe Experience Platform
    • 12.5 Analyze Google Analytics Data using Customer Journey Analytics
    • Summary and benefits
  • 13 - Real-Time CDP: Segment Activation to Microsoft Azure Event Hub
    • 13.1 Configure your Microsoft Azure EventHub environment
    • 13.2 Configure your Azure Event Hub Destination in Adobe Experience Platform
    • 13.3 Create a segment
    • 13.4 Activate segment
    • 13.5 Create your Microsoft Azure Project
    • 13.6 End-to-end scenario
    • Summary and benefits
  • 14 - Real-Time CDP Connections: Event Forwarding
    • 14.1 Create a Data Collection Event Forwarding property
    • 14.2 Update your Datastream to make data available to your Data Collection Event Forwarding property
    • 14.3 Create and configure a custom webhook
    • 14.4 Create and configure a Google Cloud Function
    • 14.5 Forward events towards the AWS ecosystem
    • Summary and benefits
  • 15 - Stream data from Apache Kafka into Adobe Experience Platform
    • 15.1 Introduction to Apache Kafka
    • 15.2 Install and configure your Kafka cluster
    • 15.3 Configure HTTP API Streaming endpoint in Adobe Experience Platform
    • 15.4 Install and configure Kafka Connect and the Adobe Experience Platform Sink Connector
    • Summary and benefits
Powered by GitBook
On this page
  • 13.5.1 Getting familiar with Azure Event Hub functions
  • 13.5.2 Open Visual Studio Code and Logon to Azure
  • Open Visual Studio Code
  • Logon to Azure
  • 13.5.3 Create an Azure Project
  • 13.5.4 Run Azure Project
  • 13.5.5 Stop Azure Project
  1. 13 - Real-Time CDP: Segment Activation to Microsoft Azure Event Hub

13.5 Create your Microsoft Azure Project

Segment Activation to Microsoft Azure Event Hub - Define an Azure Function

Previous13.4 Activate segmentNext13.6 End-to-end scenario

Last updated 2 years ago

13.5.1 Getting familiar with Azure Event Hub functions

Azure Functions allows you to run small pieces of code (called functions) without worrying about application infrastructure. With Azure Functions, the cloud infrastructure provides all the up-to-date servers you need to keep your application running at scale.

A function is triggered by a specific type of event. Supported triggers include responding to changes in data, responding to messages (for example Event Hubs), running on a schedule, or as the result of an HTTP request.

Azure Functions is a serverless compute service that lets you run event-triggered code without having to explicitly provision or manage infrastructure.

Azure Event Hubs integrates with Azure Functions for a serverless architecture.

13.5.2 Open Visual Studio Code and Logon to Azure

Visual Studio Code makes it easy to...

  • define and bind Azure functions to Event Hubs

  • test locally

  • deploy to Azure

  • remote log function execution

Open Visual Studio Code

To open Visual Studio Code enter visual in your operating system's search (Spotlight search on OSX, Search in Window's Taskbar). If you do not find it, you need to repeat the steps outlined in Exercise 0 - Pre-requisites.

Logon to Azure

When you logon with your Azure account that you used to register in Exercise 0 - Pre-requisites, Visual Studio Code will let you find and bind all Event Hub resources.

Click the Azure icon in Visual Studio Code. If you do not have that option, something might have gone wrong with the installation of the required extensions.

Next select Sign in to Azure:

You will be redirected to you browser to login. Remember to select the Azure account that you used to register.

When you see the following screen in your browser, you are logged in with Visual Code Studio:

Return to Visual Code Studio (you will see the name of your Azure subscription, for example Azure subscription 1):

13.5.3 Create an Azure Project

When you hover over Azure subscription 1, a menu will appear above the section, select Create New Project...:

Select a local folder of your choice to save the project and click Select:

You will now enter the project creation wizard. Select Javascript as the language for your project:

Select Azure Event Hub trigger as your project's first function template:

Enter a name for your function, use the following format --demoProfileLdap---aep-event-hub-trigger and press enter:

Select Create new local app setting:

Select an event hub namespace, you should see the Event Hub that you defined in Exercise 2. In this example the Event Hub namespace is vangeluw-aep-enablement:

Select your Event Hub, you should see the Event Hub that you defined in Exercise 2. In my case that is vangeluw-aep-enablement-event-hub:

Select RootManageSharedAccessKey as your Event Hub policy:

Enter to use $Default:

Select Add to workspace on how to open your project:

After you project is created, click on index.js to have the file open in the editor:

The payload sent by Adobe Experience Platform to your Event Hub will include segment id's:

[{
"segmentMembership": {
"ups": {
"ca114007-4122-4ef6-a730-4d98e56dce45": {
"lastQualificationTime": "2020-08-31T10:59:43Z",
"status": "realized"
},
"be2df7e3-a6e3-4eb4-ab12-943a4be90837": {
"lastQualificationTime": "2020-08-31T10:59:56Z",
"status": "realized"
},
"39f0feef-a8f2-48c6-8ebe-3293bc49aaef": {
"lastQualificationTime": "2020-08-31T10:59:56Z",
"status": "realized"
}
}
},
"identityMap": {
"ecid": [{
"id": "08130494355355215032117568021714632048"
}]
}
}]

Replace the code in your Visual Studio Code's index.js with the code below. This code will be executed each time Real-time CDP sends segment qualifications to your Event Hub destination. In our example, the code is just about displaying and enhancing the received payload. But you can imagine any kind of function to process segment qualifications in real-time.

// Marc Meewis - Solution Consultant Adobe - 2020
// Adobe Experience Platform Enablement - Module 13

// Main function
// -------------
// This azure function is fired for each segment activated to the Adobe Exeperience Platform Real-time CDP Azure 
// Eventhub destination
// This function enriched the received segment payload with the name fo the segment. 
// You can replace this function with any logic that is require to process and deliver
// Adobe Experience Platform segments in real-time to any application or platform that 
// would need to act upon an AEP segment qualiification.
// 

module.exports = async function (context, eventHubMessages) {

    return new Promise (function (resolve, reject) {

        context.log('Message : ' + JSON.stringify(eventHubMessages, null, 2));

        resolve();

    });    

};

The result should look like this:

13.5.4 Run Azure Project

Now it is time to run your project. At this stage we will not deploy the project to Azure. We will run it locally in debug mode. Select the Run icon, click the green arrow.

The first time you run you project in debug mode, you will need to attach a Azure storage account, click Select storage account.

From the list of storage accounts, select the one that you have created as part of 13.1.4 Setup your Azure Storage Account. Your storage account is named --demoProfileLdap--aepstorage, for instance: mmeewisaepstorage.

Your project is now up and running and is listing for events in the Event Hub. In the next exercise you'll demonstrate behavior on the Luma demo website that will qualify you for those segments. As a result you will receive a segment qualification payload in the terminal of your Event Hub trigger function:

13.5.5 Stop Azure Project

To stop your project, select the Terminal tab, click in the terminal window and press CMD-C on OSX or CTRL-C on Windows:

visual-studio-code-icon.png
3-01-vsc-open.png
3-02-vsc-pick-account.png
3-03-vsc-login-ok.png
3-04-vsc-logged-in.png
3-05-vsc-create-project.png
3-06-vsc-select-folder.png
3-07-vsc-select-language.png
3-08-vsc-function-template.png
3-09-vsc-function-name.png
3-10-vsc-function-local-app-setting.png
3-11-vsc-function-select-namespace.png
3-12-vsc-function-select-eventhub.png
3-13-vsc-function-select-eventhub-policy.png
3-14-vsc-eventhub-consumer-group.png
3-15-vsc-project-add-to-workspace.png
3-16-vsc-open-index-js.png
3-16b-vsc-edit-index-js.png
3-17-vsc-run-project.png
3-17-vsc-run-project.png
3-22-vsc-select-storage-account.png
3-23-vsc-application-started.png
3-24-vsc-application-stop.png