165 lines
8.4 KiB
Bash
165 lines
8.4 KiB
Bash
# Copy this file to .env and fill in your values.
|
|
# You can also edit these from within the app: Settings menu -> Edit Settings.
|
|
|
|
# --- Database ---
|
|
# Local (default): sqlite:///orders.db
|
|
# Later, point at your MariaDB LXC, e.g.:
|
|
# DB_URL=mysql+pymysql://user:[email protected]:3306/order_manager
|
|
DB_URL=sqlite:///orders.db
|
|
|
|
# --- JIRA ---
|
|
# Your Atlassian site, e.g. https://yourcompany.atlassian.net
|
|
JIRA_URL=
|
|
# The email address tied to your JIRA API token
|
|
JIRA_EMAIL=
|
|
# Create one at https://id.atlassian.com/manage-profile/security/api-tokens
|
|
JIRA_API_TOKEN=
|
|
# JQL used to pull orders. This is your real filter (23753)'s exact query,
|
|
# used directly rather than "filter = 23753" so it doesn't depend on that
|
|
# filter being shared/visible to whichever account the API token belongs
|
|
# to. The 4-day lookback is your holiday/weekend carryover buffer; the
|
|
# status restriction matches this app's ACTIVE_STATUSES/CANCELLED_STATUSES
|
|
# below. Tickets that move to a status outside Created/Cancelled (e.g.
|
|
# fulfilled) stop matching this query on their own - the app's re-check
|
|
# mechanism (see README) is what still catches that transition by ticket
|
|
# key regardless of status, so update this JQL and the status settings
|
|
# together if either one ever changes.
|
|
JIRA_JQL=project = "AR" AND created >= -4d AND (status = Created or status = Cancelled) ORDER BY created DESC, cf[10349] ASC
|
|
# Deliverable/SKU-bearing custom fields, per company (comma-separated field IDs)
|
|
JIRA_SIGNIFY_SKU_FIELDS=customfield_10573,customfield_10570
|
|
JIRA_OAKSTREET_SKU_FIELDS=customfield_12790,customfield_13021
|
|
# Recipient/shipping contact fields - shared across both companies' tickets.
|
|
# Only used by the emergency "Send to ShipStation" action.
|
|
JIRA_FIELD_NAME=customfield_10662
|
|
JIRA_FIELD_PHONE=customfield_10424
|
|
JIRA_FIELD_EMAIL=customfield_10544
|
|
JIRA_FIELD_ADDRESS1=customfield_10654
|
|
JIRA_FIELD_ADDRESS2=customfield_10655
|
|
JIRA_FIELD_CITY=customfield_10480
|
|
JIRA_FIELD_STATE=customfield_10560
|
|
JIRA_FIELD_ZIP=customfield_10479
|
|
JIRA_FIELD_NPI=customfield_10349
|
|
|
|
# --- ShipStation (API V2) ---
|
|
# Used to pull tracking numbers for JIRA tickets (order/shipment numbers
|
|
# there are the same as the JIRA ticket number), and for the emergency
|
|
# "Send to ShipStation" action.
|
|
SHIPSTATION_API_KEY=
|
|
# Store IDs - only needed for the emergency send (creating a new order
|
|
# needs to know which store to put it in; pulling tracking numbers doesn't).
|
|
SHIPSTATION_SIGNIFY_STORE_ID=se-221889
|
|
SHIPSTATION_OAKSTREET_STORE_ID=se-367672
|
|
# ShipStation needs to know where a package ships FROM. Find these in
|
|
# ShipStation under Settings > Shipping > Warehouses/Ship From Locations.
|
|
SHIPSTATION_SIGNIFY_WAREHOUSE_ID=se-180473
|
|
SHIPSTATION_OAKSTREET_WAREHOUSE_ID=se-437417
|
|
|
|
# --- ShipStation Test Mode ---
|
|
# When on, every ShipStation action (emergency send, tracking pull, return
|
|
# labels) uses your test/sandbox API key instead of production - no real
|
|
# charges, nothing appears in your production ShipStation account.
|
|
# Toggleable from the Data menu too (stays in sync with this setting).
|
|
SHIPSTATION_TEST_MODE=false
|
|
TEST_SHIPSTATION_API_KEY=
|
|
# Each of these is optional - leave blank and test mode falls back to using
|
|
# your production value (useful if your test/sandbox account happens to
|
|
# mirror production's store/warehouse/carrier IDs). Fill one in only if
|
|
# your test account actually uses a different ID for that specific thing.
|
|
TEST_SHIPSTATION_SIGNIFY_STORE_ID=
|
|
TEST_SHIPSTATION_OAKSTREET_STORE_ID=
|
|
TEST_SHIPSTATION_SIGNIFY_WAREHOUSE_ID=
|
|
TEST_SHIPSTATION_OAKSTREET_WAREHOUSE_ID=
|
|
TEST_SIGNIFY_RETURN_CARRIER_ID=se-6366092
|
|
TEST_SIGNIFY_RETURN_SERVICE_CODE=ups_ground
|
|
TEST_OAKSTREET_RETURN_CARRIER_ID=se-6366092
|
|
TEST_OAKSTREET_RETURN_SERVICE_CODE=ups_ground
|
|
|
|
# --- Companies ---
|
|
# SKU prefix -> company. Add more "PREFIX:Company" pairs as you add companies.
|
|
COMPANY_SKU_MAP=SH:Signify Health,OK:Oak Street Health,RMD:Oak Street Health
|
|
# Fallback pattern for recognizing the AR-###### ticket number if it's ever
|
|
# not found in ShipStation's usual shipment_number/external_shipment_id fields.
|
|
TICKET_NUMBER_REGEX=\b[A-Z]{2,6}-\d{3,}\b
|
|
|
|
# --- Status Tracking ---
|
|
# Statuses that count as real active work - shown on the Active Orders tab
|
|
# and re-checked on every import (comma-separated). Anything NOT in this
|
|
# list and NOT in CANCELLED_STATUSES below is treated as done and shown on
|
|
# the Done tab - including JIRA-side automation statuses this app was never
|
|
# explicitly told about (e.g. "1st Contact Attempt"), since they aren't
|
|
# "Created" or "Cancelled" either.
|
|
ACTIVE_STATUSES=Created
|
|
# Statuses that get their own Cancelled tab, highlighted red, and trigger a
|
|
# popup when a ticket newly transitions into one (comma-separated).
|
|
CANCELLED_STATUSES=Cancelled
|
|
# The two statuses your team uses at end-of-day close-out, depending on
|
|
# whether ShipStation's automation also generated a return label. Reaching
|
|
# either one moves a ticket off Active Orders and into Done (since neither
|
|
# is in ACTIVE_STATUSES or CANCELLED_STATUSES above).
|
|
FULFILLED_STATUS_WITH_RETURN=Waiting For Return
|
|
FULFILLED_STATUS_WITHOUT_RETURN=Device Return Not Needed
|
|
# Daily intake cutoff (24h HH:MM). Tickets created after this time on their
|
|
# arrival day are flagged "Past Cutoff" in the table and counted on the
|
|
# Dashboard - they didn't get a full window to be processed same-day.
|
|
INTAKE_CUTOFF_TIME=15:30
|
|
|
|
# --- Return Labels (SH007 / OK012 - emailed return labels) ---
|
|
# SKUs that mean "create + email a return label" instead of a normal outbound kit.
|
|
EMAILED_LABEL_SKUS=SH007,OK012
|
|
|
|
# Each company has its own UPS account even though they share one warehouse.
|
|
SIGNIFY_RETURN_CARRIER_ID=se-350817
|
|
# Assumption pending your confirmation - you gave the carrier/account but not
|
|
# a specific service level. Defaulting to UPS Ground; change if you use
|
|
# something else for returns. See ShipStation's carrier services list for
|
|
# other valid codes (e.g. ups_2nd_day_air, ups_ground_saver).
|
|
SIGNIFY_RETURN_SERVICE_CODE=ups_ground
|
|
OAKSTREET_RETURN_CARRIER_ID=se-599657
|
|
OAKSTREET_RETURN_SERVICE_CODE=ups_ground
|
|
|
|
# When you're charged for a return label: on_creation / on_carrier_acceptance
|
|
# (only charged if the customer actually uses it - needs the carrier to have
|
|
# enabled this on your account first) / carrier_default.
|
|
SHIPSTATION_RETURN_CHARGE_EVENT=carrier_default
|
|
|
|
# Both companies return to the same warehouse, just under their own name -
|
|
# confirmed real address below. (Occasional shipments to company HQ instead
|
|
# of the warehouse aren't handled yet - flagged for later.)
|
|
SIGNIFY_RETURN_NAME=Signify Health
|
|
SIGNIFY_RETURN_PHONE=469-718-0004
|
|
SIGNIFY_RETURN_ADDRESS1=1000 Spinks Road Suite 100
|
|
SIGNIFY_RETURN_ADDRESS2=
|
|
SIGNIFY_RETURN_CITY=Lewisville
|
|
SIGNIFY_RETURN_STATE=TX
|
|
SIGNIFY_RETURN_ZIP=75067
|
|
OAKSTREET_RETURN_NAME=Oak Street Health
|
|
OAKSTREET_RETURN_PHONE=469-718-0004
|
|
OAKSTREET_RETURN_ADDRESS1=1000 Spinks Road Suite 100
|
|
OAKSTREET_RETURN_ADDRESS2=
|
|
OAKSTREET_RETURN_CITY=Lewisville
|
|
OAKSTREET_RETURN_STATE=TX
|
|
OAKSTREET_RETURN_ZIP=75067
|
|
|
|
# RubiconMD - Oak Street subsidiary (RMD-prefixed SKUs). Uses Oak Street's
|
|
# own shipping account/address in every respect - this is the one thing
|
|
# that's actually different, the name shown on the return label.
|
|
RUBICONMD_RETURN_NAME=Rubicon MD
|
|
|
|
# --- Packing ---
|
|
# Serial-number fields to suggest per device keyword found in a ticket's line
|
|
# items, as a starting point in the Pack Ticket dialog (staff can always add
|
|
# a custom field for anything not matched here). Format:
|
|
# keyword:Field One|Field Two,keyword2:Field Three
|
|
DEVICE_FIELD_SUGGESTIONS=laptop:Laptop Serial Number|Laptop Asset Tag,optiplex:OptiPlex Serial Number|OptiPlex Asset Tag,desktop:Desktop Serial Number|Desktop Asset Tag,phone:Phone IMEI|Phone Serial Number|Phone ICCID|Phone Asset Tag,ipad:iPad IMEI|iPad Serial Number|iPad ICCID|iPad Asset Tag,spiro:Spiro Serial Number|Spiro Asset Tag,apc:UPS/APC Serial Number|UPS/APC Asset Tag,monitor:Monitor Serial Number|Monitor Asset Tag,accessor:Accessory Notes,camera:Camera Serial Number|Camera Asset Tag
|
|
|
|
# Maps a ShipStation service code (from the outbound label) to your team's
|
|
# term for the Shipping Method column - confirmed against your real usage.
|
|
SHIPPING_METHOD_LABELS=ups_next_day_air:Priority Overnight,ups_2nd_day_air:Two Day,ups_ground:Ground
|
|
|
|
# --- Ticket validation ---
|
|
# Return types with no matching device expected - exempt from the
|
|
# return/device mismatch check (emailed labels, DPS Device, scheduled
|
|
# pickups don't have a corresponding device line item by design).
|
|
RETURN_DEVICE_EXEMPT_KEYWORDS=emailed,dps,scheduled pickup,padded envelope
|
|
|