@knennigtri/at-tool
v1.0.3
Published
CLI for the Adobe Target API
Downloads
1
Maintainers
Readme
Contents
Adobe Target automations
Actions currently supported:
- Create Target offers based on HTML files
- Delete Target offers based on modifiedAt string
Command Line Tool
Run commands on a single Adobe organization
at-tool -a aio-auth.json [ARGS]
Run commands on many Adobe organizations
at-tool -a path/to/auth/jsons [ARGS]
Create HTML offers based on a folder of HTML files:
at-tool -a aio-auth.json offers:create folder/of/html/files
Create a single HTML offer:
at-tool -a aio-auth.json offers:create path/to/myOffer.html
Delete all offers created in January 2024:
at-tool -a aio-auth.json offers:delete "2024-01"
Create config file for Authentication
- Create and Adobe IO project
- Add the Adobe Target API
- Select oAuth Credentials
- Go to the Credentials screen and download the JSON.
- Add the Adobe Target API
For OAuth credentials, verify the JSON contains at least:
{
"ORG_ID": "xxxxxxxxxxxxxxxxxxxxx@AdobeOrg",
"CLIENT_SECRETS": [ "xxxxxxxxxxxxxxxxxxxxx" ],
"CLIENT_ID": "xxxxxxxxxxxxxxxxxxxxx",
"SCOPES": [
"xxxxxxxxx",
"xxxxxxxxx",
"xxxxxxxxx"
]
}
If running this tool with many Adobe Organizations, you will need to create a AIO Project and download the oAuth json per Organization. Add all the jsons to a single folder to run the tool against all Adobe organizations using
at-tool -a path/to/aio/jsons/
Usage
at-tool -h
Usage: at-tool TYPE:MODE DATA
TYPE: offers | audiences
MODE: create | delete
Required:
-A, --auth <auth.json> AIO project json or oAuth json
Options:
-v, --version Displays version of this package
-h, --help
-d, --debug See debug Options
Optionally use: at-tool -h auth|offers|audiences
Offer Deletion
Offers are deleted based on the modifiedAt property. The Adobe Target API stores the last modified string as:
"modifiedAt": "2023-12-20T18:11:22Z"
The at-tool checks modifiedAt.contains("searchString"). If true, the offer is deleted.