# Introduction
DTCLI is a Command Line Interface to do the following in DTP ( Dropthought Platform ) across different environments.
# Downloads
# Utility
# Config File
{
"app": {
"env": "test",
"email": "account@dropthought.com",
"programId": "ce969d85-aabd-49e4-a8a5-0bb5d846bf07",
"data": {
"from": "2016-01-01",
"to": "2020-12-31",
"path": "./Downloads/filename.csv",
"ignore": [
"Survey Open",
"Survey Taken"
],
"metadata": {
},
"question": {
},
"timestamp": {
},
"timezone": "America/Los_Angeles"
}
}
}
# Prerequisites
The following prerequisites are necessary for the cli to function seamlessly.
- A program should be published to a list of contacts.
- Avoid publishing a program multiple times.
# Supported Source
- sms
- qr
- link
- kiosk
# Usage
Download dtcli.exe on windows (or) dtcli on MacOS in a folder & place the same companion json file in same folder.
- Configure the enviornment to work with dtcli ( test , stage , demo and app).
- Configure the account email like demo@yopmail.com registered in the environment test,stage,demo or app in email key.
- Configure the programId you would like to either extend its validity (or) load feedback into program.
ProgramId can be picked up from the Clicking on the Published Program on the top of Program Overview

- Configure the from & to date if you are using extendProgram to extend the validity of expired or active program to the dates defined.
this is optional step for loadEvent Command - Export CSV File for that ProgramId Configured in the dtcli.json file using export command , file will be created in the as defined in path
- MacOs
dtcli export - Windows
dtcli.exe export
- Configure path of the a csv file which will be used by loadEvent command to load into programId defined in the configuration.
- Configure Columns in ignore key to ignore it during the loadEvent Command , otherwise these columns will be treated as metadata.
its an optional step for extendProgram Command - run the following command now to sync up the data sheet and the program using helper command
- MacOs
dtcli extractHeader - Windows
dtcli.exe extractHeader
Output of this command will print out something
"metadata":{
"0":"Id",
"1":"First Name",
"30":"Source"
},
"question":{
"13":"47fa9e7a-718b-402f-98d3-3b5154fb196f",
"14":"7a4d98d7-587e-43bc-a549-778153536e2c",
"15":"2f90ef06-b19c-48a0-bac2-a138541f860f",
},
"timestamp":{
"12":"TimeStamp"
}
Copy the output of this json output and replace it in dtcli.json file in fields metadata , questions and timestamp.
`
- the number of metadata fields in the output will be the list of metadata list used to publish the program during feedback
- the number of question fields in the output will be the list of questions created in the program during publish
- timestamp will the actual time feedback has been loaded into the program `
Pre Requisite to Use load feedback into program.
- Program should have been published with a list which matches the list of the file configured in the path key.
# extendProgram
This Command extends the validity of a program defined in the dtcli.json file based on app.data.from and app.data.to keys in the given environment app.env key.
MacOS (or) Linux
./dtcli extendProgram
Windows
dtcli.exe extendProgram
# export
This Command exports the a csv file based on the programId in the path defined in dtcli.json file.
MacOS (or) Linux
./dtcli export
Windows
dtcli.exe export
# extractHeader
This Command extracts the metadata , timestamp & questions defined in the csv file and prints a helper information of configuration to be copied and pasted in dtcli.yml file.
MacOS (or) Linux
./dtcli extractHeader
Windows
dtcli.exe extractHeader
# loadEvent
This Command loads the Feedback or Events based on the dtcli.yml file and reading the csv file into respective enviornment based on metadata , questions & timestamp
MacOS (or) Linux
./dtcli loadEvent
Windows
dtcli.exe loadEvent
# validateConfig
This Command prints the key and value configured in the dtcli.yml
MacOS (or) Linux
./dtcli validateConfig
Windows
dtcli.exe validateConfig
# version
This Command prints the version of dtcli toolkit.
MacOS (or) Linux
./dtcli version
Windows
dtcli.exe version