aep-tag-tool 1.1.0
Install from the command line:
Learn more about npm packages
$ npm install @knennigtri/aep-tag-tool@1.1.0
Install via package.json:
"@knennigtri/aep-tag-tool": "1.1.0"
About this version
Import, Export, and Delete web properties from Adobe Expience Platform Tags, previously known as Launch.
This is a project to automates postman collections using the Reactor API. This project makes it easier to quickly import a Tag property into an Adobe Organization for demo purposes or if you are using the same Tag property across organizations. The collections are generic enough to run with without modifications.
To install the command line tool globally, run:
npm install -g @knennigtri/aep-tag-tool
Export a tag property:
aep-tag-tool -c auth-config.json --export PR12345678901234567890
Import a tag property:
aep-tag-tool -c auth-config.json --import tagPropertyData.json
Delete a tag properties that contain 2022 in the title
aep-tag-tool -c auth-config.json --delete "2023"
- Create and Adobe IO project
- Add the Experiance Platform Launch API
- Generate a public/private key pair
- (JWT only) Download the public/private key
- Go to the Credentials screen and download the JSON. Adobe has deprecated JWT and OAuth is preferred.
- Add the Experiance Platform Launch API
For OAuth credentials, make sure the JSON contains at least:
{
"ORG_ID": "xxxxxxxxxxxxxxxxxxxxx@AdobeOrg",
"CLIENT_SECRETS": [ "xxxxxxxxxxxxxxxxxxxxx" ],
"CLIENT_ID": "xxxxxxxxxxxxxxxxxxxxx",
"SCOPES": [
"xxxxxxxxx",
"xxxxxxxxx",
"xxxxxxxxx"
]
}
For JWT credentials, download the private key add PRIVATE_KEY:
{
"CLIENT_SECRET": "xxxxxxxxxxxxxxxxxxxxx",
"ORG_ID": "xxxxxxxxxxxxxxxxxxxxx@AdobeOrg",
"API_KEY": "xxxxxxxxxxxxxxxxxxxxx",
"TECHNICAL_ACCOUNT_ID": "[email protected]",
"TECHNICAL_ACCOUNT_EMAIL": "[email protected]",
"PUBLIC_KEYS_WITH_EXPIRY": {},
"PRIVATE_Key": "path/to/private.key"
}
Alternatively, you can use yaml as well:
---
CLIENT_ID: xxxxxxxxxxxxxxxxxxx
CLIENT_SECRET: xxxxxxxxxxxxxxxxxxx
ORG_ID: xxxxxxxxxxxxxxxxxxx@AdobeOrg
SCOPES: [xxxxx, xxxxxx, xxxxx]
---
aep-tag-tool -h
Usage: aep-tag-tool [ARGS]
Arguments:
-c, --config <myconfig.yml> Specify a config file
-e, --export <PID> Mode to export a given property ID.
-i, --import <propertyFile.json> Mode to import a property given a config file.
-d, --delete <searchStr> Mode to delete properties containing a specific string
-C,-E,-D,-R,-L,-P [import] Options to partially import. See -h import
-f, --file <file> [import] file containing import json
-t, --title <title> [import] optional new title of tag property;
-p, --pid <pid> [export, import] property ID
-s, --search <str> [delete] search string for properties deletion
-o, --output <folder> [export] folder path to save export property. Default ./
-g <postman_globals.json> Not supported currently
-v, --version Displays version of this package
--jwt Use if using JWT Auth. Deprecated by Adobe. Default is OAuth.
-h, --help
config
export
import
delete
debug
Export mode allows for a web property from AEP Tags to be exported as JSON. Exporting a tag will create a new file with the same name as the web property. The JSON file contents will have:
- exported property id
- property title
- extensions
- edata elements
- rules and their rule components
Requires:
-c, --config <myconfig.yml> Specify a config file
-e, --export <PID> Mode to export a given property ID.
Optionally include the PID with a parameter
-p, --pid <pid> [export, import] property ID
Optionally specify the output folder
-o, --output <folder> [export] folder path to save export property. Default ./
Import mode allows for an exported web property from AEP Tags to be imported into an Adobe organization. Import mode will:
- Create a new web property (
obj.propertyName
) with a host and dev/stage/prod environments - Add imported extensions (
obj.extensions
) - Create imported data elements (
obj.dataElements
) - Create imported rules (
obj.rules.*
) - Build the library into dev
- Publish the library into prod
You can optionally specify what to create/import/publish with the CEDRLP parameters.
Importing into a different Adobe organization should be used with caution since many extension settings are specific to the Adobe organization they are exported from. See Import into other Organizations.
Requires:
-c, --config <myconfig.yml> Specify a config file
-i, --import <propertyFile.json> Mode to import a property given a config file.
Optionally include the property file with a parameter
-f, --file <file> [import] file containing import json
-t, --title <title> [import] optional new title of tag property;
-p, --pid <pid> [export, import] property ID
Note: PID is ignored unless importing to an existing property (-C is omited)
propertyFile.json file requires:
- propertyFile.propertyName
- propertyFile.extensions
- propertyFile.dataElements
- propertyFile.rules.[rules]
You can specify exactly what you want to create/import with these params.
No matter the parameter order, they will always execute in the order below.
-C
Creates a new property.
If -C
is not used with the remaining parameters, a PID is required in parameters
-E
Imports extensions. propertyFile.extensions
is required.
-D
Imports data elements. propertyFile.dataElement
is required.
-R
Imports rule components. propertyFile.rules.[rules]
is required.
-L
Builds a library of all items into the Dev environment
-P
Publishes the library into Prod
- Export the desired property as specified above
- In the new Organization, create an Adobe IO project with the Launch API
- download the OAuth JSON
- The command below will only import (E)xtensions, (D)ata Elements and (R)ules from the origPropertyExport.json and build a (L)ibrary into the Dev Environment:
aep-tag-tool -c newOrg-oauth-config.json --import origPropertyExport.json -EDRL
- Manually update any values unique to the Adobe org. Typically in the Extension values.
- Verify the import and build and deploy a new Library
Quickly delete web properties that might have been created with this tool. Delete mode allows you to search for web properties in an Adobe organization based on a search string. If any web properties contain the search string, they are deleted. This is particularly useful if you are developing your own property to import/export since all properties end with a timestamp. Searching (-s) for 2022-10-25
would delete MyProperty 2022-10-25T20:57:42.049Z
, MyProperty 2022-10-25T21:57:42.049Z
, and MyProperty 2022-10-25T20:58:42.049Z
.
Requires:
-c, --config <myconfig.yml> Specify a config file
-d, --delete <searchStr> Mode to delete properties containing a specific string
Optionally include the search string with a parameter
-s, --search <str> [delete] search string for properties deletion
The Postman collections apart of this tool can also be used with Postman or npm newman. See the extra docs to learn more.
- Download the OAuth Authentication Collection
- Download the Import Collection
- Download the Export Collection
- Download the Delete Collection
- Download a sample Environment file
- See configuration instructions: docs/environment.md
- Download the JWT Authentication Collection
Details
- aep-tag-tool
- knennigtri
- about 1 year ago
- ISC
- 7 dependencies
Assets
- aep-tag-tool-1.1.0.tgz
Download activity
- Total downloads 0
- Last 30 days 0
- Last week 0
- Today 0