Loading

Revenue Cloud API: Creating Ramp Deals Using Create Ramp Deal API and Place Sales Transaction (PST)

Дата публикации: Jul 6, 2026
Описание

When creating a Ramp Deal programmatically in Revenue Cloud, a single API call is not sufficient. The Create Ramp Deal API only stages the ramp configuration in a temporary context — it does not write any changes to the database. A second call to the Place Sales Transaction (PST) API is required to commit the staged configuration.

Common issues arise from two sources:

**Incorrect resource ID in the endpoint path:** The path parameter for the Create Ramp Deal endpoint requires the Quote Line Item ID (or Order Item ID), not the Quote ID or Transaction ID.

**Incorrect payload structure in PST:** The `method` and `id` fields inside the `graph.records` array must be nested within the `attributes` object. Placing them as sibling fields alongside `attributes` produces these errors:

- `Can't find the method attribute in the header.` — `method` is outside `attributes`

- `Can't find the id attribute in the header.` — `id` is outside `attributes`

Additionally, the contextId returned from Step 1 is temporary. If PST is not called promptly after the Create Ramp Deal API, the context expires and Step 1 must be repeated.

This two-step process applies to line-level ramps only. For group-level ramps, use PST directly with the `groupRampAction` property — the Create Ramp Deal API is not used.

Решение

The following steps stage a ramp configuration and persist it to the database using the Create Ramp Deal API followed by PST.

### Step 1 — Stage the Ramp Configuration

Call the Create Ramp Deal endpoint using the Quote Line Item ID (or Order Item ID) as the path parameter.

**Endpoint:**

 

POST : /services/data/v67.0/connect/revenue-management/sales-transaction-contexts/{transactionLineId}/actions/ramp-deal-create

 

**Sample Payload:**

{

  "transactionId": "0Q0D5000000x9xx",

  "transactionLineId": "0QLD5000001YYlfxx",

  "subscriptionTerm": 24,

  "subscriptionTermUnit": "MONTHS",

  "segmentType": "YEARLY",

  "executionSettings": {

    "executePricing": true,

    "executeConfigRules": false

  }

}

 

The 'transactionLineId' in both the path and payload is the Quote Line Item ID or Order Item ID — not the Quote ID. The response returns a 'contextId'. Copy this value immediately and proceed to Step 2. The context is temporary and expires if not used promptly.

 

### Step 2 — Persist Changes via Place Sales Transaction (PST)

Call the PST endpoint using the `contextId` from Step 1. This call commits the staged ramp configuration to the database.

 

**Endpoint:**

POST: /services/data/v67.0/connect/rev/sales-transaction/actions/place


**Sample Payload:**

 

{

  "pricingPref": "SKIP",

  "contextDetails": {

    "contextId": "<contextId from Step 1 response>"

  },

  "graph": {

    "graphId": "updateQuote",

    "records": [

      {

        "referenceId": "refQuote",

        "record": {

          "attributes": {

            "type": "Quote",

            "method": "PATCH",

            "id": "0Q0D5000000x9BcKAI"

          }

        }

      }

    ]

  }

}

 

The 'method' and 'id' fields must be nested inside the 'attributes' object, as shown above. Do not move them outside of 'attributes' or place them as sibling fields alongside it — doing so causes the errors described in the Description section.

 

Use 'pricingPref: "FORCE"` when 'executePricing: true' was set in Step 1, since pricing was already calculated during staging. Use the contextId exactly as returned from Step 1 — do not reuse a contextId from a previous session.

Дополнительные ресурсы
Номер статьи базы знаний

005388578

 
Загрузка
Salesforce Help | Article