Get your user and company setup
distru-get-meReadGets the authenticated user and their company setup: timezone, US state, compliance system, active modules and key inventory and sales settings.
Inputs
Every tool also takes the common inputs.
| Field | Type | Required |
|---|---|---|
| includePermissions | boolean | No |
Output
Presence on a nested field assumes its parent exists.
| Field | Type | Presence |
|---|---|---|
| user | object | Always |
| user. | string | Always |
| user. | string | Can be null |
| user. | string | Always |
| user. | boolean | Always |
| user. | string[] | Can be absent |
| myCompany | object | Always |
| myCompany. | string | Always |
| myCompany. | string | Always |
| myCompany. | string | Always |
| timezone | string | Always |
| usState | string | Can be null |
| complianceType | enumBIOTRACKMETRCNONE | Can be null |
| activeModules | enum[]18 valuesANALYTICSAPIBIOTRACKBLAZECORECOST_ACCOUNTINGCULTIVATIONCULTIVATION_ANALYTICSDISTRU_COMMERCEDISTRU_CONNECTDUTCHIELABEL_PRINTINGLEAFLINKMETRCQBOROUTINGTREEZTRYM | Always |
| settings | object | Always |
| settings. | object | Always |
| settings. | boolean | Always |
| settings. | boolean | Always |
| settings. | object | Always |
| settings. | boolean | Always |
What the AI reads
Gets the authenticated user and their company setup: timezone, US state, compliance system, active modules and key inventory and sales settings. Call once at the start of a session to read dates in the right timezone and to know which compliance- and module-backed tools apply. With several accounts, call it once per account: user, company and settings differ. Pass includePermissions to check what the user may do before a write. isAdmin means full access: every permission plus admin-only actions. myCompany is the user's own company, as distru-search-companies returns it with isMyCompany: true. When settings.inventory.allowNegativeAvailableQuantity is false, Processing sales orders cannot reserve more than the available quantity for a given product and location. When settings.sales.salesOrderAutofulfill is true, saving a sales order as Processing fills its unfulfilled batch- and package-tracked lines with stock from the line's location. Batches: earliest expiration date, then smallest quantity. Packages: same test result as the line's last package, then earliest expiration date, earliest packaged date, smallest quantity. One line can span several packages.