Product group

A product group is the equivalent of a product table in the Oneflow application. Each product group contains a list of products.

🚧

Note:

You can add up to 150 products in total to all product groups in one contract.

The table below displays all the attributes available for the product_groups array.

AttributeTypeDescription
_private_ownersideobjectThe product group attributes that are visible only to the owner-side party. See Private owner-side product group.
configurationobjectThe configuration of the product group. See Configuration.
created_frominteger(signed_integer_id)The ID of the original product group from which this product group was created. (If you created a contract using a template with a product group, this is the ID of that template's product group)
enabled_columnsarrayThe list of enabled columns of the product group. See Enabled columns.
idinteger(signed_integer_id)The ID of the product group.
productsarrayThe list of products in this product group. See Products.

Private owner-side product group

AttributeTypeDescription
created_timestring(datetime)The date and time when the product group was created.
updated_timestring(datetime)The date and time when the product group was last updated.

Configuration

AttributeTypeDescription
columnsarrayThe list of objects containing each column's details. See Columns.
counterpart_editbooleanIndicates whether or not the counterparty can edit the configuration.
hide_price_summationbooleanIndicates whether or not to display price sums.
price_affixesobjectIncludes the affixes of the prices. See Price affixes.

Columns

The table below shows all the attributes available for each column in the columns array.

AttributeTypeDescription
enabledbooleanIndicates whether or not to enable the column.
keystring(enum)The key of the column. Can be one of thename, description, price_1, price_2, count
labelstringThe label of the column.

Price affixes

The table below shows all the attributes available for the price_affixes object.

AttributeTypeDescription
postfixstringIndicates the postfix of the prices.
prefixstringIndicates the prefix of the prices.

Enabled columns

The table below shows all the attributes available for each column in the enabled_columns array.

AttributeTypeDescription
enabledbooleanIndicates whether the column is enabled or not.
keystring(enum)The key of the column. Can be one of thename, description, price_1, price_2, count

Products

The table below shows all the attributes available for each product in the products array.

AttributeTypeDescription
_private_ownersideobjectSee Private owner-side product.
counterparty_lockbooleanIndicates if the counterparty can edit the product in the contract. It defaults to false.
descriptionstring(RTF)The description of the product in rich text format.
idinteger(signed_integer_id)The ID of the product.
namestringThe name of the product.
price_1objectAll pricing information for a product. See Price.
price_2objectInformation about alternative pricing for a product, such as a monthly payment plan. See Price.
quantityobjectInformation about the product quantity. See Quantity.

Private owner-side product

AttributeTypeDescription
created_timestring(datetime)The date and time when the product was created.
custom_idstringA custom identifier you can use to address the products in a contract. Each custom_id must be unique for the products in a contract.
updated_timestring(datetime)The date and time when the product was last updated.

Price

AttributeTypeDescription
amountobjectFinal price including discount. Calculated from the base amount. See Final amount.
base_amountobjectThe base price of one item of product excluding discounts. See Base amount.
discount_amountobjectThis value should not be more than the base price. If the base amount is 0, a negative final price is possible. See Base amount.
discount_percentstring(percent)The percentage discount from the base price. The result is rounded to three decimal places.

Final amount

AttributeTypeDescription
amountstring(signed_amount)An amount. This value can be negative.

Base amount

AttributeTypeDescription
amountstring(amount)An amount that indicates a certain quantity. This value can be negative.

🚧

Note:

The discount_amount and the discount_percent attributes are mutually exclusive in any input. In the output, one of them will always be set to 0.

Quantity

The quantity of the purchased products.

AttributeTypeDescription
amountintegerThe number of individual products selected.
typestring(enum)One of the product's Quantity type

Quantity type

Describes the item quantity enumeration type.

NameDescription
multiple_choiceAdds a checkbox to the product. The product quantity for this type must be 1 (checked) or 0 (unchecked). You can select one of several checkboxes.
single_choiceAdds a radio button to the product. As with the checkbox, you must specify the product quantity for this type as 1 (checked) or 0 (unchecked). You can select at most one radio button in one product table, meaning that while many products in a product table can have a single_choice, you can select only 1.
quantityAdds a number field to a product to enter the number of products. If no other quantity type is specified, the default quantity type is quantity.
1412

A product table with all quantity types. Starting from the top: multiple_choice, single_choice, and quantity.