Integration Overview

Learn how Wunderkind interacts with Bloomreach API for AMP implementations

API Usage

  • See our Help Center for an overview of required API permissions for Bloomreach AMP. Wunderkind's API group needs Customer properties > Set and Events > Set (including on newly created event types) in the Tracking API group (Bloomreach reference).
  • Wunderkind does not send message content. It writes a trigger event to Bloomreach's Tracking API, and the On event scenario in your Bloomreach project does the sending.
  • The call is Bloomreach's Batch commands endpoint: POST https://api-engagement.bloomreach.com/track/v2/projects/{project_token}/batch (UK projects use the UK instance host).
    • Each request carries two commands. $.commands[0] is a customers command that identifies the recipient and sets the email customer attribute. $.commands[1] is a customers/events command that writes the trigger event; its properties object ($.commands[1].data.properties) carries every dynamic field used in the scenario.
    • The trigger event's event_type is purpose-specific. Each AMP scenario starts with an On event trigger on its own event type, so a scenario only runs when Wunderkind writes that event.
    • By default, Wunderkind identifies the user by email, passed as the project's hard ID (registered in most projects). If no customer profile exists for that identifier, Bloomreach creates one when the command is processed — no separate profile-creation call is needed.

Sample API Request

{
  "commands": [
    {
      "name": "customers",
      "data": {
        "customer_ids": {
          "registered": "[email protected]"
        },
        "properties": {
          "email": "[email protected]"
        }
      }
    },
    {
      "name": "customers/events",
      "data": {
        "customer_ids": {
          "registered": "[email protected]"
        },
        "event_type": "wknd-cartabandonment",
        "properties": {
          "Origin": "wunderkind",
          "DataOnly": "Y",
          "UserType": "prospect",
          "WkChannel": "email",
          "WkPurpose": "cart abandonment",
          "WkCouponCode": "",
          "WkCouponPurpose": "",
          "WkOpen": "some-url.com",
          "WkCartReplenUrl": "some-url.com",
          "Items": [
            {
              "WkCopy": "Product name",
              "WkId": "012345",
              "WkImageUrl": "some-url.jpg",
              "WkUrl": "some-url.com"
            },
            {
              "WkCopy": "Product name",
              "WkId": "012345",
              "WkImageUrl": "some-url.jpg",
              "WkUrl": "some-url.com"
            },
            {
              "WkCopy": "Product name",
              "WkId": "012345",
              "WkImageUrl": "some-url.jpg",
              "WkUrl": "some-url.com"
            },
            {
              "WkCopy": "Product name",
              "WkId": "012345",
              "WkImageUrl": "some-url.jpg",
              "WkUrl": "some-url.com"
            }
          ]
        }
      }
    }
  ]
}

Event Properties by Scenario Type

Cart Abandonment

{
  "Origin": "wunderkind",
  "DataOnly": "Y",
  "UserType": "prospect",
  "WkOpen": "some-url.com",
  "WkPurpose": "cart abandonment",
  "WkChannel": "email",
  "WkCouponCode": "",
  "WkCouponPurpose": "",
  "WkCartReplenUrl": "some-url.com",
  "Items": [
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com"
    }
  ]
}

Product Abandonment

{
  "Origin": "wunderkind",
  "DataOnly": "Y",
  "UserType": "prospect",
  "WkOpen": "some-url.com",
  "WkPurpose": "product abandonment",
  "WkChannel": "email",
  "WkCouponCode": "",
  "WkCouponPurpose": "",
  "Items": [
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com"
    }
  ]
}

Category Recap

{
  "Origin": "wunderkind",
  "DataOnly": "Y",
  "UserType": "prospect",
  "WkOpen": "some-url.com",
  "WkPurpose": "category recap",
  "WkChannel": "email",
  "WkCouponCode": "",
  "WkCouponPurpose": "",
  "WkCategoryUrl": "some-category-url.com",
  "Items": [
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com"
    }
  ]
}

Back in Stock

{
  "Origin": "wunderkind",
  "DataOnly": "Y",
  "UserType": "prospect",
  "WkOpen": "some-url.com",
  "WkPurpose": "back in stock",
  "WkChannel": "email",
  "WkCouponCode": "",
  "WkCouponPurpose": "",
  "Items": [
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com"
    }
  ]
}

Price Drop

{
  "Origin": "wunderkind",
  "DataOnly": "Y",
  "UserType": "prospect",
  "WkOpen": "some-url.com",
  "WkPurpose": "price drop",
  "WkChannel": "email",
  "WkCouponCode": "",
  "WkCouponPurpose": "",
  "Items": [
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com",
      "WkPrice": "49.99",
      "WkSalePrice": "39.99"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com",
      "WkPrice": "49.99",
      "WkSalePrice": "39.99"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com",
      "WkPrice": "49.99",
      "WkSalePrice": "39.99"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com",
      "WkPrice": "49.99",
      "WkSalePrice": "39.99"
    }
  ]
}

Low Stock

{
  "Origin": "wunderkind",
  "DataOnly": "Y",
  "UserType": "prospect",
  "WkOpen": "some-url.com",
  "WkPurpose": "low stock",
  "WkChannel": "email",
  "WkCouponCode": "",
  "WkCouponPurpose": "",
  "Items": [
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com",
      "WkQuantity": "1"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com",
      "WkQuantity": "1"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com",
      "WkQuantity": "1"
    },
    {
      "WkCopy": "Product name",
      "WkId": "012345",
      "WkImageUrl": "some-url.jpg",
      "WkUrl": "some-url.com",
      "WkQuantity": "1"
    }
  ]
}

Did this page help you?