Last active
June 9, 2020 00:31
-
-
Save jasonwaters/9a408ac65717c272efbce12d43d62c4d to your computer and use it in GitHub Desktop.
This is an example of how to specify an ipAddress when making a getOffers method call. Simply add it to the geo object of the request context.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TargetClient = require("@adobe/target-nodejs-sdk"); | |
const client = TargetClient.create({ | |
client: "adobesummit2018", | |
organizationId: "65453EA95A70434F0A495D34@AdobeOrg" | |
}); | |
client | |
.getOffers({ | |
request: { | |
context: { | |
channel: "web", | |
geo: { | |
ipAddress: "79.14.121.7" | |
} | |
}, | |
execute: { | |
mboxes: [{ name: "demo-marketing-offer1" }] | |
} | |
} | |
}) | |
.then(result => { | |
console.log(result); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment