## Overview

Quote Config POST Help

## Summary

This endpoint allows customizations to be made to the Quoted Line Items section of the Quote record.

## Request Arguments

Name | Type | Description | Required
--- | --- | --- | ---
worksheet_columns | array | A viewdef "fields"-style definition of the columns you want to display in the QLI section. These get written out to the custom/Products/clients/base/views/quote-data-group-list/quote-data-group-list.php file. | True
worksheet_column_related_fields | array | Array of the related field names needed for data to be returned for use by the quote-data-group-list | True
summary_columns | array | A viewdef "fields"-style definition of the columns you want to display in the Quote Summary header section. These get written out to the custom/Quotes/clients/base/views/quote-data-grand-totals-header/quote-data-grand-totals-header.php file. | True
summary_columns_related_fields | array | Array of the related field names needed for data to be returned for use by the quote-data-grand-totals-header | True
footer_rows | array | A viewdef "fields"-style definition of the columns you want to display in the Quote Grand Totals Footer section. These get written out to the custom/Quotes/clients/base/views/quote-data-grand-totals-footer/quote-data-grand-totals-footer.php file. | True
footer_rows_related_fields | array | Array of the related field names needed for data to be returned for use by the quote-data-grand-totals-footer | True

### Sample Request

    {
        "summary_columns": [
            {
                "name": "deal_tot",
                "label": "LBL_LIST_DEAL_TOT",
                "css_class": "quote-totals-row-item",
                "related_fields": [
                    "deal_tot_discount_percentage"
                ],
                "type": "currency",
                "labelModule": "Quotes"
            },
            {
                "name": "new_sub",
                "css_class": "quote-totals-row-item",
                "type": "currency",
                "label": "LBL_NEW_SUB",
                "labelModule": "Quotes"
            },
            {
                "name": "tax",
                "label": "LBL_TAX_TOTAL",
                "css_class": "quote-totals-row-item",
                "type": "currency",
                "labelModule": "Quotes"
            },
            {
                "name": "shipping",
                "css_class": "quote-totals-row-item",
                "type": "currency",
                "label": "LBL_SHIPPING",
                "labelModule": "Quotes"
            },
            {
                "name": "total",
                "label": "LBL_LIST_GRAND_TOTAL",
                "css_class": "quote-totals-row-item",
                "type": "currency",
                "labelModule": "Quotes"
            }
        ],
        "summary_columns_related_fields": [
            "base_rate",
            "deal_tot",
            "deal_tot_usdollar",
            "shipping",
            "subtotal",
            "subtotal_usdollar",
            "tax",
            "taxable_subtotal"
        ],
        "worksheet_columns": [
            {
                "name": "line_num",
                "label": null,
                "widthClass": "cell-xsmall",
                "css_class": "line_num tcenter",
                "type": "line-num",
                "readonly": true
            },
            {
                "name": "quantity",
                "label": "LBL_QUANTITY",
                "widthClass": "cell-small",
                "css_class": "quantity",
                "type": "float",
                "labelModule": "Products"
            },
            {
                "name": "product_template_name",
                "label": "LBL_ITEM_NAME",
                "widthClass": "cell-large",
                "type": "quote-data-relate",
                "required": true,
                "labelModule": "Quotes"
            },
            {
                "name": "mft_part_num",
                "label": "LBL_MFT_PART_NUM",
                "type": "base",
                "labelModule": "Products"
            },
            {
                "name": "discount_price",
                "label": "LBL_DISCOUNT_PRICE",
                "type": "currency",
                "convertToBase": true,
                "showTransactionalAmount": true,
                "related_fields": [
                    "discount_price",
                    "currency_id",
                    "base_rate"
                ],
                "labelModule": "Products"
            },
            {
                "name": "discount",
                "type": "fieldset",
                "css_class": "quote-discount-percent",
                "label": "LBL_DISCOUNT_AMOUNT",
                "fields": [
                    {
                        "name": "discount_amount",
                        "label": "LBL_DISCOUNT_AMOUNT",
                        "type": "discount",
                        "convertToBase": true,
                        "showTransactionalAmount": true
                    },
                    {
                        "type": "discount-select",
                        "name": "discount_select",
                        "no_default_action": true,
                        "buttons": [
                            {
                                "type": "rowaction",
                                "name": "select_discount_amount_button",
                                "label": "LBL_DISCOUNT_AMOUNT",
                                "event": "button:discount_select_change:click"
                            },
                            {
                                "type": "rowaction",
                                "name": "select_discount_percent_button",
                                "label": "LBL_DISCOUNT_PERCENT",
                                "event": "button:discount_select_change:click"
                            }
                        ],
                        "label": "LBL_DISCOUNT_AS_PERCENT"
                    }
                ],
                "labelModule": "Products"
            },
            {
                "name": "total_amount",
                "label": "LBL_LINE_ITEM_TOTAL",
                "type": "currency",
                "widthClass": "cell-medium",
                "showTransactionalAmount": true,
                "related_fields": [
                    "total_amount",
                    "currency_id",
                    "base_rate"
                ],
                "labelModule": "Quotes"
            }
        ],
        "worksheet_columns_related_fields": [
            "base_rate",
            "deal_calc",
            "discount_amount",
            "discount_price",
            "discount_select",
            "quantity",
            "subtotal",
            "tax_class",
            "total_amount",
            "description",
            "quote_id",
            "name",
            "product_template_id",
            "product_template_name"
        ],
        "footer_rows": [
            {
                "name": "new_sub",
                "type": "currency"
            },
            {
                "name": "tax",
                "type": "currency"
            },
            {
                "name": "shipping",
                "type": "quote-footer-currency",
                "css_class": "quote-footer-currency",
                "default": "0.00"
            },
            {
                "name": "total",
                "type": "currency",
                "css_class": "grand-total"
            }
        ],
        "footer_rows_related_fields": [
            "deal_tot",
            "deal_tot_usdollar",
            "shipping",
            "subtotal",
            "subtotal_usdollar",
            "tax",
            "taxable_subtotal"
        ]
    }

## Response Arguments

### NONE

### Response

Saved Config or SugarApiExceptionInvalidParameter

    {
        "summary_columns": [
            {
                "name": "deal_tot",
                "label": "LBL_LIST_DEAL_TOT",
                "css_class": "quote-totals-row-item",
                "related_fields": [
                    "deal_tot_discount_percentage"
                ],
                "type": "currency",
                "labelModule": "Quotes"
            },
            {
                "name": "new_sub",
                "css_class": "quote-totals-row-item",
                "type": "currency",
                "label": "LBL_NEW_SUB",
                "labelModule": "Quotes"
            },
            {
                "name": "tax",
                "label": "LBL_TAX_TOTAL",
                "css_class": "quote-totals-row-item",
                "type": "currency",
                "labelModule": "Quotes"
            },
            {
                "name": "shipping",
                "css_class": "quote-totals-row-item",
                "type": "currency",
                "label": "LBL_SHIPPING",
                "labelModule": "Quotes"
            },
            {
                "name": "total",
                "label": "LBL_LIST_GRAND_TOTAL",
                "css_class": "quote-totals-row-item",
                "type": "currency",
                "labelModule": "Quotes"
            }
        ],
        "worksheet_columns": [
            {
                "name": "line_num",
                "label": null,
                "widthClass": "cell-xsmall",
                "css_class": "line_num tcenter",
                "type": "line-num",
                "readonly": true
            },
            {
                "name": "quantity",
                "label": "LBL_QUANTITY",
                "widthClass": "cell-small",
                "css_class": "quantity",
                "type": "float",
                "labelModule": "Products"
            },
            {
                "name": "product_template_name",
                "label": "LBL_ITEM_NAME",
                "widthClass": "cell-large",
                "type": "quote-data-relate",
                "required": true,
                "labelModule": "Quotes"
            },
            {
                "name": "mft_part_num",
                "label": "LBL_MFT_PART_NUM",
                "type": "base",
                "labelModule": "Products"
            },
            {
                "name": "discount_price",
                "label": "LBL_DISCOUNT_PRICE",
                "type": "currency",
                "convertToBase": true,
                "showTransactionalAmount": true,
                "related_fields": [
                    "discount_price",
                    "currency_id",
                    "base_rate"
                ],
                "labelModule": "Products"
            },
            {
                "name": "discount",
                "type": "fieldset",
                "css_class": "quote-discount-percent",
                "label": "LBL_DISCOUNT_AMOUNT",
                "fields": [
                    {
                        "name": "discount_amount",
                        "label": "LBL_DISCOUNT_AMOUNT",
                        "type": "discount",
                        "convertToBase": true,
                        "showTransactionalAmount": true
                    },
                    {
                        "type": "discount-select",
                        "name": "discount_select",
                        "no_default_action": true,
                        "buttons": [
                            {
                                "type": "rowaction",
                                "name": "select_discount_amount_button",
                                "label": "LBL_DISCOUNT_AMOUNT",
                                "event": "button:discount_select_change:click"
                            },
                            {
                                "type": "rowaction",
                                "name": "select_discount_percent_button",
                                "label": "LBL_DISCOUNT_PERCENT",
                                "event": "button:discount_select_change:click"
                            }
                        ],
                        "label": "LBL_DISCOUNT_AS_PERCENT"
                    }
                ],
                "labelModule": "Products"
            },
            {
                "name": "total_amount",
                "label": "LBL_LINE_ITEM_TOTAL",
                "type": "currency",
                "widthClass": "cell-medium",
                "showTransactionalAmount": true,
                "related_fields": [
                    "total_amount",
                    "currency_id",
                    "base_rate"
                ],
                "labelModule": "Quotes"
            }
        ],
        "footer_rows": [
            {
                "name": "new_sub",
                "type": "currency"
            },
            {
                "name": "tax",
                "type": "currency"
            },
            {
                "name": "shipping",
                "type": "quote-footer-currency",
                "css_class": "quote-footer-currency",
                "default": "0.00"
            },
            {
                "name": "total",
                "type": "currency",
                "css_class": "grand-total"
            }
        ],
        "summary_columns_related_fields": [
            "base_rate",
            "deal_tot",
            "deal_tot_usdollar",
            "shipping",
            "subtotal",
            "subtotal_usdollar",
            "tax",
            "taxable_subtotal"
        ],
        "worksheet_columns_related_fields": [
            "base_rate",
            "deal_calc",
            "discount_amount",
            "discount_price",
            "discount_select",
            "quantity",
            "subtotal",
            "tax_class",
            "total_amount",
            "description",
            "quote_id",
            "name",
            "product_template_id",
            "product_template_name"
        ],
        "footer_rows_related_fields": [
            "deal_tot",
            "deal_tot_usdollar",
            "shipping",
            "subtotal",
            "subtotal_usdollar",
            "tax",
            "taxable_subtotal"
        ]
    }

## Change Log

Version | Change
--- | ---
v11.3 | Added `/Quotes/config` POST endpoint.