Introduction
Last updated
Last updated
Any store automation would start with setting up a script.
After opening the Developer Console, you can select the type of script you want to create. Following that, you should see a blank template where you can insert all your logic with the help of the Liquid language.
After a script is created, it is in an inactive state. You can activate it through context menu triggered with a cog wheel next to the script title. Now your script is live. To see it running, you can either wait for your store events to trigger the script (if your script responds to webhooks), wait for the scheduler to run it, trigger it manually (for scheduled scripts with a manual trigger), query the autogenerated endpoint (for HTTP scripts), or wait for incoming emails received in your DataJet email inbox (for Email scripts).
Scripts can be triggered in a number of different ways:
Automatically: following a schedule of your choice (scheduled script with a timer trigger).
Manually: by clicking the 'Run' button next to the script title.
Via HTTP call: hitting the autogenerated endpoint may trigger the script (and return a response).
Event in your store: if your script responds to any event in your store (e.g., a new order).
Incoming email: if your scripts responds to email received to your DataJet email address (your-store@task.datajet-app.com)
Each currently running script will appear under the 'Runs' section. Here, you can also copy the run ID or stop the script.
Each script will log specific actions. All logs appear under the 'Logs' section. Each log belongs to one of the following categories:
INFO: provides simple informational logs to inform you about the current status.
WARNING: indicates something unexpected happened; however, script execution can continue.
CRITICAL: denotes a critical error, resulting in script execution being stopped.
ACTION: signifies that an action has been performed. Actions utilize app credits.
You might opt in for email notifications anytime critical error happens. Just go to the app settings and provide your email address.
Whenever a task performs an action (which can range from uploading a file to FTP, adding a tag, creating a fulfillment, etc.), a certain amount of credits will be deducted from your credits quota. Your credits quota depends on the plan you are subscribed to and renews at the beginning of each new billing period. The DataJet Plan comes with unlimited credits.
Automatic email notifications are sent when usage reaches 80% of available credits.