Create a lookup value

distru-create-reference-typeWriteQuickBooks

Adds a value to one of your named lists, such as a product tag, category, group or payment method. Only a payment method reaches QuickBooks.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
typeenum
PRODUCT_SUBCATEGORYCOMPANY_GROUPRELATIONSHIP_TYPEPRODUCT_TAGPRODUCT_GROUPPRODUCT_CATEGORYPAYMENT_METHOD
Yes
namestringYesUp to 255 characters (31 for PAYMENT_METHOD). Unique within the type and company (within the category for PRODUCT_SUBCATEGORY); case is ignored except for RELATIONSHIP_TYPE and COMPANY_GROUP, where "flower" and "Flower" can both exist.
paymentMethodTypeenum
BANK_REMITTANCEBANK_TRANSFERCASHCHECKCREDIT_CARD
NoPAYMENT_METHOD only. Required.
officialProductCategoryIdenum
CAPSULESCLONESCONCENTRATESEDIBLESFLOWERMERCHOTHERPREROLLSTINCTURESTOPICALSVAPES
NoPRODUCT_CATEGORY only. Required.
productCategoryIdstringNoPRODUCT_SUBCATEGORY only. Required. Resolve via distru-search-lookups (type PRODUCT_CATEGORY).

Output

This tool returns one of 7 shapes, depending on its inputs.

Presence on a nested field assumes its parent exists.

Result with tag

FieldTypePresence
tagobjectAlways
tag.idstringAlways
tag.namestringAlways

Result with productGroup

FieldTypePresence
productGroupobjectAlways
productGroup.idstringAlways
productGroup.namestringAlways

Result with paymentMethod

FieldTypePresence
paymentMethodobjectAlways
paymentMethod.idstringAlways
paymentMethod.namestringAlways
paymentMethod.typeenum
BANK_REMITTANCEBANK_TRANSFERCASHCHECKCREDIT_CARD
Can be null

Result with relationshipType

FieldTypePresence
relationshipTypeobjectAlways
relationshipType.idstringAlways
relationshipType.namestringAlways

Result with productCategory

FieldTypePresence
productCategoryobjectAlways
productCategory.idstringAlways
productCategory.namestringAlways
productCategory.officialProductCategoryIdstringCan be null

Result with productSubcategory

FieldTypePresence
productSubcategoryobjectAlways
productSubcategory.idstringAlways
productSubcategory.namestringAlways
productSubcategory.categoryobjectAlways
productSubcategory.category.idstringAlways

Result with companyGroup

FieldTypePresence
companyGroupobjectAlways
companyGroup.idstringAlways
companyGroup.namestringAlways
What the AI reads

Creates one of the company’s named lists other records point at, picked by type: PRODUCT_TAG, PRODUCT_GROUP, PAYMENT_METHOD, RELATIONSHIP_TYPE, PRODUCT_CATEGORY, PRODUCT_SUBCATEGORY, COMPANY_GROUP. Use distru-search-lookups first to avoid creating a duplicate. Each type only takes its own extra fields (see each field’s description); others are rejected. Unit types are not created here; resolve an existing one with distru-search-lookups (type UNIT_TYPE).