Sales Agreement (POST)

Create a sales agreement from an external source, including quote, opportunity, or custom object.

Resource

/services/data/vXX.X/connect/manufacturing/sales-agreements

Available Version

51.0

Requires Chatter

No

HTTP Methods

POST

Special Access Rules

To use this resource, your Salesforce org must have the Manufacturing Cloud license with the Sales Agreements permission set.

Prerequisite

Before you use the resource, use the new ConvertToSalesAgreement mapping usage type available in ObjectHierarchyRelationship settings to map an input object (quote or opportunity) to an output object (sales agreement) and define field mappings. All the products from the source object child entity will be added to the sales agreement. For example, see the ObjectHierarchyRelationship metadata type for the mapping definition from Opportunity to SalesAgreement (parent level mapping) and OpportunityLineItem to SalesAgreementProduct (child level mapping). To use decimal values, map the quantity values to InitialPlannedQtyValue.

Request Body for POST

JSON Example

{
  "sourceObjectId": "0kFT1000000000RMAQ",
  "salesAgreementDefaultValues": {
      "salesAgreement": {
          "StartDate": "2020-01-01",
          "ScheduleFrequency": "Monthly",
          "ScheduleCount": "10"
      },
      "salesAgreementProduct": {
          "PricebookEntry": "01uxx00000091jOAAQ",
          "Name": "test-sap1",
          "InitialPlannedQuantity":"1"
      }
  }
}

Properties

Name Type Description Required or Optional Available Version
salesAgreement​​​DefaultValues Sales Agreement Default​​ Fields Input[] Default field values for the SalesAgreement and SalesAgreementProduct entities that aren’t defined in the mapping definition.

Note: You can remove a mapping field from the definition by providing the output field value as blank for SalesAgreement or SalesAgreementProduct.

Optional 51.0
sourceObjectId String ID of the source object containing the mapping definition used to create the sales agreement record. Required 51.0

Response Body for POST