Adobe Marketing Cloud Client, Delivery API
Last updated 3 years ago by target-admin .
ISC · Repository · Original npm · Tarball · package.json
$ cnpm install @adobe/marketing-cloud-client 
SYNC missed versions from official npm registry.

Marketing Cloud Client

Marketing Cloud Client allows clients to get execute requests against Adobe edge network and retrieve personalized content that can be used to personalize an user experience. Behind the scenes Marketing Cloud Client wraps two of the Adobe solutions, MCID and Target.

Marketing Cloud Client usage

Marketing Cloud Client is pretty straightforward to use. Here are the steps:

  1. Create an Marketing Cloud Client instance
  2. Retrieve variation
  3. Apply the personalized content extracted from variation

Here is a very simple example:

const options = {
  config: {
    client: "foo",
    organizationId: "foo@AdobeOrg",
    timeout: 5000
const expClient = MarketingCloudClient.create(options);
const request = {
  "mbox" : "some-mbox"

expClient.getVariation(request).then(variation => console.log('Variation', variation));

Marketing Cloud Client API

The Marketing Cloud Client has the following API.

  1. MarketingCloudClient.getVisitorCookieName(organizationId: string): string - used to retrieve MCID cookie name
  2. MarketingCloudClient.getTargetCookieName(): string - used to retrieveTarget Cookie name
  3. MarketingCloudClient.create(options: Object): MarketingCloudClient - creates an instance of Marketing Cloud Client.

The options object has the following structure:

Name Required Default Description
config Yes None General config
targetCookie No None Target cookie
visitorCookie No None Visitor cookie

The config object should have the following structure

Name Required Default Description
client Yes None Target client
organizationId Yes None Organization ID
timeout No None Target request timeout
secure No true Target request over HTTP or HTTPS
  1. MarketingCloudClient.getVariation(request: Object): Promise - retrieves a variation. The request object uses the same JSON structures that can be found here: https://www.adobe.io/apis/marketingcloud/target/docs/reference/delivery.html. The response promise wraps a variation.

The variation result object has the following structure:

Name Type Description
targetCookie Object Object with {name, value, expires}, that should be used to save Target cookie
visitorState Object Object that contains SDID and other details used by Visitor API
content String or Object Personalized content, can be string or object

Current Tags

  • 0.9.0                                ...           latest (3 years ago)

1 Versions

  • 0.9.0                                ...           3 years ago
Today 0
This Week 1
This Month 3
Last Day 1
Last Week 0
Last Month 1
Dependencies (2)
Dev Dependencies (9)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |