Sales Agreement Product (PUT)

Add or update products and their pricing and attribute details in a sales agreement.

Resource

/connect/sales-agreements/salesAgreementId/product

Resource Example

https://yourInstance.salesforce.com/services/data/v68.0/connect/sales-agreements/0YAAAC00000B393/product

Available Version

60.0

HTTP Methods

PUT

Special Access Rules

The org must have Revenue Management for Sales Agreements enabled. The running user must have Manufacturing Cloud access to the product catalog feature and permission to update sales agreements, with the appropriate object and field permissions for Sales Agreement, Sales Agreement Product, Product, Price Book, and Price Book Entry.

Prerequisites

Configure pricing for sales agreements, including the default pricing context definition. Use an active price book entry for the product in the specified price book. If pricing isn’t configured, the response can return isSuccess as false with a pricing error.

Request Parameters

Name Type Description Required or Optional Available Version
salesAgreementId String ID of the sales agreement in which to add or update products. Required 60.0

Request Body for PUT

JSON Example

Here’s an example of a request to add a product to a sales agreement:

{
  "pricebook2Id": "01sAAC00002tGfhYBE",
  "salesAgreementProductDetails": [
    {
      "product2Id": "01tAAC0000ADt2cYBD",
      "pricebookEntryId": "01uAAC00000nRggYBE",
      "initialPlannedQuantity": 10,
      "salesPrice": 4500
    }
  ]
}

Here’s an example of a request that includes a product attribute:

{
  "pricebook2Id": "01sAAC00002tGfhYBE",
  "salesAgreementProductDetails": [
    {
      "product2Id": "01tAAC0000ADt2cYBD",
      "pricebookEntryId": "01uAAC00000nRggYBE",
      "initialPlannedQuantity": 10,
      "salesPrice": 4500,
      "discountPercentage": 5,
      "salesAgreementProductAttributeDetails": [
        {
          "attributeDefinitionName": "Color",
          "attributeValue": "Red",
          "isPriceImpacting": false
        }
      ]
    }
  ]
}

Properties

Note

Note

All request properties are optional in the API schema. To add products, provide at least one salesAgreementProductDetails entry with product2Id, pricebookEntryId, initialPlannedQuantity, and salesPrice.

Name Type Description Required or Optional Available Version
pricebook2Id String The ID of the price book associated with the sales agreement. Optional 60.0
salesAgreementProductDetails Sales Agreement Product Details Input[] The details of the sales agreement product. Optional 60.0