Back

This article is part of a series on Microsoft Azure.

Build the Webhook

Before we build the Webhook, take a look at what the POST call to Azure will look like, as well as expected success/error messages. This will help you understand why the Webhook is built the way it is.

Now it’s time to build the Webhook. This is the easy part!

  1. Open AudienceStream and naviate to Act > Connectors
  2. Add the Webhook connector
  3. Select the Actions tab
  4. Chose the POST Action and click the “+Create Action” button
  5. Give your Action a name
  6. Choose the Source of your data
  7. Enter your API URL
    https://{servicebusNamespace}.servicebus.windows.net/{queue}/messages?timeout=60&api-version=2014-01
    Azure API URL.png
  8. Leave the Header Cookie Data section empty
  9. “Headers” section
    1. In the first drop-down select “Custom Value”
    2. In the second input enter the generated Shared Access Signature from above
      Example: SharedAccessSignature sr=https%3A%2F%2Ftealiumlabs.servicebus.windows.net%2F&sig=yMhcni4ANpCyLYHBKKn%2BVzyXa9lcOzUYvZdwM&se=1472079309&skn=RootManageSharedAccessKey (edited for security)
    3. In the third input, enter “Authorization”
      Azure Headers.png
  10. In the “Body Content Type - Mime Type” section, select “application/atom+xml”
    Azure Body Content Type Mime Type.png
  11. In the “Body Content Type - Parameters” Section
    1. Map a Custom Value of “entry”
    2. To a Custom Value of “type”
      Azure Content Type Parameters.png
  12. Save the Action
  13. Save/Publish AudienceStream

Test the AudienceStream Webhook to Microsoft Azure

With Azure configured to accept the data, and AudienceStream configured to send the data, you can now test the setup. Begin a Trace then have your visitor complete the necessary steps to join the necessary Audience to trigger the Webhook.

If unsuccessful you will see the action Fail in Trace.

Azure Trace Failure.png

Follow the standard steps to review the error logs, but typically the issue revolves around a failed Shared Access Signature. This page helps determine the type of error occurring.

Azure Trace Failure Log.png

If successful, Trace will state the action was processed and provide an output of the data sent in the Webhook.

Azure Trace.png