This documentation goes over everything needed for our Shopify Bot. Information about the config and setup is all stated below. We also have answered some of the fequently asked questions, and give information that needs to be know or just may help users.
Important Note
Changing or modifing any of the bots code except what is withinconfig.json
is not recommended at any time.
Once you have purchased the Shopify Bot and your payment is recieved you will get access to download the bot.
You will need to have Node.js version
16.13.1
or higher installed onto your computer.
Go to your profile on our store page and you will see a download button. After you download you will get a .zip
file.
.zip
wherever you want the bot's files to be..zip
file and drag the contents into the other file you created..zip
are in the folder where you want the bot's files.Once you have the files installed open the command window of your choice. Once you have it open make sure you are in the directory of your bot.
To get the correct Director, just do cd "directory" or for windows you can likely shift and right click within the folder and hit "Open Powershell window here"
Once you are in your command window and have the correct directory open do the following command: npm i
Doing this will install all the nessisary node packages to run the bot.
You must have the original package.json
that was given in the download for this to work properly.
Before we get to all the settings within the config.json
a couple base variables need to be set for the bot and the shopify.
The bot token is an extremely important part of the setup. Without the token the bot wouldn't start or work at all.
Once you have your token go into your config.json
and put the token in the where it says "Token": "Bot Token Here"
.
It should look something like this: "Token": "NzIyMjExMjM1NTQ1NzQzMzYx.XufxoA.sHrNVRY69wUMKeDKj0eA1AOTRKs"
Without these tokens and the required permissions, the bot will not be able to preform most tasks.
Analytics: Read access
Customers: Read and write
Draft orders: Read and write
Gift cards: Read and write
Inventory: Read and write
Marketing events: Read and write
Order editing: Read and write
Orders: Read and write
Product listings: Read and write
Products: Read and write
Discounts: Read and write
Legal policies: Read access
config.json
. (Store name is just the part of the url infront of the .shopify.com/admin
)This bot has a nice and simple set of options within the config.json
.
You can find a blank and original config.json
in the Resrouce section of this page.
If in the config a section had [] around it then DO NOT remove them. Those are there because it allows you to set serveral items, if you only want one itme then just do this:
["Thing"]
and multiply should look like this:["Thing", "Thing2", "Ect"]
. Also if the [] are not present then DO NOT add them as the bot is not looking for serveral inputs.
If you need help with the config or break something reach out to the Agent Squad Productions Support Team! We can help you set things up or explain things further.
{
"prefix": ".",
"token": "BOT TOKEN HERE",
"owners": ["DISCORD_USER_ID"],
"defaultPerms": ["SEND_MESSAGES", "VIEW_CHANNEL"],
"staffRoles": ["DISCORD_ROLE_ID", "DISCORD_ROLE_ID_2"],
"activities": ["your store", "an amazing server", "shadowdevs.com"],
}
This sets your bot's prefix. The prefix is what is put infront of all commands to use them. You can also ping the bot as a prefix. (Do not type "ping" or anything, the ping function will always work.)
This should already be setup. If not go back to here and do so.
This is an array of the people who have access to Owner Only commands, sections, etc.
This is an array of the base level perms the bot requires users to have to be able to access commands.
Full permissions list can be found here.
The ID of the discord role(s) which are considered staff and have access to all shopify commands commands except, policy
and product
commands.
This is an array of items the bot is "watching". (Bot's status messages.)
{
"shopifySettings": {
"shopName": "example-store",
"apiKey": "API_KEY",
"password": "ADMIN_API_ACCESS_TOKEN"
},
}
The name of the shopify store that is given to you by shopify. When veiwing any admin page on your store, it will be the first part of the link in the search bar. (The text before .shopify.com
.)
The API key for your shopify app.
This should already be setup. If not go back to here and do so.
The Admin API Access Token (new apps) or password (old apps).
This should already be setup. If not go back to here and do so.
{
"settings": {
"showPII": false,
"embedColor": "#5865F2",
"clientJoinNotification": true,
"clientJoinRoleAdd": true,
"clientRole": "DISCORD_ROLE_ID",
"companyLineAsDiscord": true
},
}
This option when turned on will have the bot display personally identifable information, which is not recommended as depending on who / where you are doing business it is likely illegal.
We made it an option as some store owners may be doing business in certain places that allow it.
Just because you are in an area that allows it doesn't mean you can, if you sell to places that do, then you are liable.
Shadow Development takes 0 liability for your action and you can not attempt to hold us account able!
The color of all embeds produced by the bot. (Execpt ones built by the embed builder.)
Have a notification within the clientJoin
channel whenever a client is detected joining.
true
or false
only!!
Give a certain role to any client that joins the discord.
true
or false
only!
The role given to clients if clientJoinRoleAdd
is active.
This means your customers put their discord id in the "company" line on their account page.
It is required to have this on, and your customers doing it for clientJoinNotification
, clientJoinRoleAdd
, and customer lookup by discord to work.
true
or false
only!
{
"logs": {
"clientJoin": "DISCORD_CHANNEL_ID",
"shopifyCommandLogs": "DISCORD_CHANNEL_ID"
},
}
Channel where clientJoinNotification
s are sent if activated.
Where all logs for commands such as order & product creations & edit goes.
{
"branding": {
"name": "Shadow Development",
"logo": "https://shadowdevs.com/img/Logo-Discord.png"
},
}
Your company, community, server, etc's name.
A link to the logo for your server, company, etc.
{
"faq": [
{
"title": "FAQ: How do I get my Discord ID?",
"command": "discordid",
"answer": "To get your Discord ID follow these steps:\nGo to your settings > Advanced > enabled 'Developer Mode' > then head out of your settings > right click your profile in chat or on the side bar > click copy ID\n*If your confused, this video will help you enable Developer Mode: https://youtu.be/13LeA6m9kU8*"
},
{
"title": "Common Question #1",
"command": "quest",
"answer": "An answer"
},
{
"title": "Common Question #2",
"command": "quest2",
"answer": "An epic answer"
},
{
"title": "Common Question #3",
"command": "quest3",
"answer": "A cool answer"
}
]
}
Note: Title is the question.
Each section within {}
is considered a FAQ subcommand. These sections can be called when doing faq <command>
(<command>
being what is input within the section).
The title and answer are input into a nice embed and produced to any user who requests it by doing one of the commands.
Just doing the faq
command will produce a list of all the FAQ commands for each title.
You can add as many sections as you want, just ensure everything follows the same format as shown above.
Below are all the configs used for this bot. A default and blank version is provided incase you break something, want to start over, or need to look at the original configs.
{
"prefix": ".",
"token": "BOT_TOKEN",
"owners": ["DISCORD_USER_ID"],
"defaultPerms": ["SEND_MESSAGES", "VIEW_CHANNEL"],
"staffRoles": ["DISCORD_ROLE_ID", "DISCORD_ROLE_ID_2"],
"activities": ["your store", "an amazing server", "shadowdevs.com"],
"shopifySettings": {
"shopName": "example-store",
"apiKey": "API_KEY",
"password": "ADMIN_API_ACCESS_TOKEN"
},
"settings": {
"showPII": false,
"embedColor": "#5865F2",
"clientJoinNotification": true,
"clientJoinRoleAdd": true,
"clientRole": "DISCORD_ROLE_ID",
"companyLineAsDiscord": true
},
"logs": {
"clientJoin": "DISCORD_CHANNEL_ID",
"shopifyCommandLogs": "DISCORD_CHANNEL_ID"
},
"branding": {
"name": "Shadow Development",
"logo": "https://shadowdevs.com/img/Logo-Discord.png"
},
"faq": [
{
"title": "FAQ: How do I get my Discord ID?",
"command": "discordid",
"answer": "To get your Discord ID follow these steps:\nGo to your settings > Advanced > enabled 'Developer Mode' > then head out of your settings > right click your profile in chat or on the side bar > click copy ID\n*If your confused, this video will help you enable Developer Mode: https://youtu.be/13LeA6m9kU8*"
},
{
"title": "Common Question #1",
"command": "quest",
"answer": "An answer"
},
{
"title": "Common Question #2",
"command": "quest2",
"answer": "An epic answer"
},
{
"title": "Common Question #3",
"command": "quest3",
"answer": "A cool answer"
}
]
}
{
"prefix": "",
"token": "",
"owners": [""],
"defaultPerms": [""],
"staffRoles": [""],
"activities": [""],
"shopifySettings": {
"shopName": "",
"apiKey": "",
"password": ""
},
"settings": {
"showPII": false,
"embedColor": "",
"clientJoinNotification": true,
"clientJoinRoleAdd": true,
"clientRole": "",
"companyLineAsDiscord": true
},
"logs": {
"clientJoin": "",
"shopifyCommandLogs": ""
},
"branding": {
"name": "",
"logo": ""
},
"faq": [
{
"title": "",
"command": "",
"answer": ""
}
]
}