Update Requisitions with Agreement Reference

You may have contract purchase agreements (CPA) with your suppliers to agree on specific terms and conditions without indicating the goods and services that you will be purchasing. You may also have blanket purchase agreements (BPA) for goods or services you plan to buy from a specific supplier, and at previously negotiated prices. You can use the Purchase Requisitions resource not only to create requisitions that reference these types of agreements, but also to update requisitions with such agreement reference.

Let’s discuss these scenarios briefly.
  • Update a requisition line with a BPA reference.

  • Update a requisition line with a CPA reference.

Here's a typical process flow for this scenario:

  1. 1The preparer creates a requisition and either forgets to reference the agreement, or the agreement isn’t approved before the requisition is created.
  2. The buyer of your organization configures agreements in Oracle Fusion Purchasing with prices, if applicable, and terms and conditions that were previously negotiated with a specific supplier.
  3. After the agreements are approved and in open status, the preparer can update the previously created requisition with the agreement reference provided by the buyer.

Update a Requisition Line with a BPA Reference

Let's consider a preparer who creates a requisition for a standard desktop without an agreement reference. Before submitting the requisition, the preparer updates the requisition with the correct agreement and supplier. There is an approved purchase blanket agreement with supplier CV_SuppA05, and the agreement has an open status. The agreement has the terms and conditions, and a price of EUR$ 1,036.01 for standard desktop item AS54888. The number of the agreement is 1003036.

To update a requisition line with a BPA reference:

  1. Identify the requisition header ID and the requisition line ID that needs to be updated.
  2. Identify the agreement number, the agreement line number for the item, the supplier name, and the purchasing site name associated with the requisitioning BU.
  3. Optionally, identify the agreement ID and the agreement line ID.
  4. Perform a PATCH operation on this URL, providing the following details in the request body.

    Patch with agreement number and agreement line number:

    PATCH

    "SourceAgreement": "1003036",
    "SourceAgreementLineNumber": "1",
    "Supplier": "CV_SuppA05",
    "SupplierSite": "CVSuppA05Site01"

    Patch with agreement ID and agreement line ID:

    PATCH

    "SourceAgreementHeaderId": 300100594014593,
    "SourceAgreementLineId": 300100594014596

If you have blanket purchase agreements (BPA) for goods or services in a currency other than the requisitioning BU's functional currency, you must invoke calculateTaxAndAccounting or submitRequisition custom operations after the line is created or updated to calculate the prices in the functional currency using the default conversion rate type, conversion date, and conversion rate information.

The prices are calculated in the functional currency, according to the conversion rate that's returned from the default conversion rate type of the requisitioning BU, and the system date in the timezone of the inventory organization. If the default conversion rate type isn't configured, the corporate conversion rate type is used.

You can view this information in the line response:

"UnitPrice": 775.78086416,
    "CurrencyCode": "EUR",
    "Currency": "Euro",
    "ConversionRateType": "Corporate",
    "ConversionRateDate": "2024-04-24",
    "ConversionRate": 0.748816,
    "Price": 1036.01,

In addition, if your blanket purchase agreement line allows price override (Allow price override is checked), then you should be able to create or update requisition lines referencing the agreement line and provide a price in the Post/Patch payload that is different from the agreement line price. Notice that you can override the price up to the price limit indicated in the agreement line. And if the blanket purchase agreement line allows description update (Allow item description update is checked), then you should be able to create or update requisition lines referencing the agreement line and provide an item description in the Post/Patch payload that is different from the agreement line item description.

Example URL

Use this resource URL format:

PATCH

/fscmRestApi/resources/version/purchaseRequisitions
cURL Command
curl -u "username:password" -H "Content-Type: application/vnd.oracle.adf.resourceitem+json" -d 'request payload'  https://servername/fscmRestApi/resources/version/purchaseRequisitions/purchaseRequisitionsUniqID/child/lines/linesUniqID

Example

curl -u  "username:password" -H "Content-Type: application/vnd.oracle.adf.resourceitem+json" -d 'request payload'  "https://servername/fscmRestApi/resources/version/purchaseRequisitions/300100593994545/child/lines/300100593994546"

Example Request

Here's an example of the request body in JSON format:
{
    "SourceAgreement": "1003036",
    "SourceAgreementLineNumber": "1",
    "Supplier": "CV_SuppA05",
    "SupplierSite": "CVSuppA05Site01"
}

Example Response

Here's an example of the response body in JSON format:
{
    "RequisitionHeaderId": 300100593994545,
    "RequisitionLineId": 300100593994546,
    "LineNumber": 1,
    "SmartFormId": null,
    "SmartFormName": null,
    "LineTypeId": 1,
    "LineTypeCode": "Goods",
    "RequisitionLineSource": "REST_INTEGRATION",
    "CategoryId": 91,
    "CategoryName": "Finished Goods_91",
    "ItemDescription": "Standard Desktop",
    "ItemId": 149,
    "Item": "AS54888",
    "ItemRevision": null,
    "Quantity": 1,
    "SecondaryQuantity": null,
    "UnitPrice": 1036.01,
    "CurrencyCode": "EUR",
    "Currency": "US Dollar",
    "UOMCode": "Ea",
    "UOM": "Each",
    "SecondaryUOMCode": null,
    "SecondaryUOM": null,
    "ConversionRateType": null,
    "ConversionRateDate": null,
    "ConversionRate": null,
    "Price": 1036.01,
    "LineStatus": "INCOMPLETE",
    "LineStatusDisplayValue": "Incomplete",
    "Amount": null,
    "CurrencyAmount": null,
    "UrgentFlag": null,
    "NegotiatedByPreparerFlag": true,
    "NegotiationRequiredFlag": null,
    "SourceAgreementTypeCode": "BLANKET",
    "SourceAgreementType": "Blanket Purchase Agreement",
    "SourceAgreementHeaderId": 300100594014593,
    "SourceAgreement": "1003036",
    "SourceAgreementLineId": 300100594014596,
    "SourceAgreementLineNumber": 1,
    "UNNumberId": null,
    "UNNumber": null,
    "HazardClassId": null,
    "HazardClass": null,
    "HazardClassCode": null,
    "UNSPSCCode": null,
    "ManufacturerName": null,
    "ManufacturerPartNumber": null,
    "BPAPriceUserOverrideFlag": false,
    "NewSupplierFlag": null,
    "SupplierId": 1717,
    "Supplier": "CV_SuppA05",
    "SupplierSiteId": 4060,
    "SupplierSite": "CVSuppA05Site01",
    "SupplierContactId": 300100550176374,
    "SupplierContact": null,
    "SupplierContactEmail": null,
    "SupplierContactPhone": null,
    "SupplierContactFax": null,
    "AdditionalContactEmail": null,
    "SuggestedSupplier": null,
    "SuggestedSupplierSite": null,
    "SuggestedSupplierContact": null,
    "SuggestedSupplierContactPhone": null,
    "SuggestedSupplierContactFax": null,
    "SuggestedSupplierContactEmail": null,
    "SupplierItemNumber": null,
    "RequesterId": 100010026863783,
    "Requester": "Furey,Clare",
    "RequesterDisplayName": "Clare Furey",
    "RequesterEmail": "cfurey@oracle.com",
    "SuggestedBuyerId": null,
    "SuggestedBuyer": null,
    "SuggestedBuyerEmail": null,
    "ModifiedByBuyerId": null,
    "ModifiedByBuyer": null,
    "AssignedBuyerId": null,
    "AssignedBuyer": null,
    "AssignedBuyerDisplayName": null,
    "AssignedBuyerEmail": null,
    "RequestedDeliveryDate": "2024-04-30",
    "DestinationTypeCode": "EXPENSE",
    "DestinationType": "Expense",
    "DestinationOrganizationId": 204,
    "DestinationOrganizationCode": "V1",
    "DestinationOrganization": "Vision Operations",
    "DestinationSubinventory": null,
    "OneTimeLocationFlag": false,
    "DeliverToLocationId": 204,
    "DeliverToLocationCode": "V1- New York City",
    "DeliverToAddress": "90 Fifth Avenue, New York,NY 10022-3422, New York, United States",
    "FormattedDeliverToAddress": "90 Fifth Avenue<BR>New York,NY 10022-3422<BR>New York<BR>United States",
    "NoteToBuyer": null,
    "NoteToReceiver": null,
    "NoteToSupplier": null,
    "RequisitionLineInPool": null,
    "POAutomationFailedReasonCode": null,
    "POAutomationFailedReason": null,
    "POHeaderId": null,
    "POLineId": null,
    "PurchaseOrder": null,
    "POBuyerId": null,
    "BuyerOnPurchaseOrder": null,
    "SupplierOnPurchaseOrder": null,
    "ProcurementBUId": 204,
    "ProcurementBU": null,
    "SourceTypeCode": "EXTERNAL",
    "SourceType": "Supplier",
    "SourceOrganizationId": null,
    "SourceOrganizationCode": null,
    "SourceOrganization": null,
    "SourceSubinventory": null,
    "TransferOrderHeaderId": null,
    "TransferOrder": null,
    "TransferOrderLineId": null,
    "NegotiationHeaderId": null,
    "Negotiation": null,
    "NegotiationLineNumber": null,
    "ResponseNumber": null,
    "ResponseLineNumber": null,
    "OnNegotiationFlag": null,
    "WorkOrderId": null,
    "WorkOrder": null,
    "WorkOrderOperationId": null,
    "WorkOrderOperationSequence": null,
    "WorkOrderProduct": null,
    "WorkOrderSubType": null,
    "BackToBackFlag": null,
    "ConfiguredItemFlag": false,
    "DeliverToCustomerId": null,
    "DeliverToCustomer": null,
    "DeliverToCustomerLocationId": null,
    "RequestedShipDate": null,
    "SalesOrderLineNumber": null,
    "SalesOrder": null,
    "SalesOrderScheduleNumber": null,
    "ShipToCustomerId": null,
    "ShipToCustomer": null,
    "ServiceLevelCode": null,
    "ServiceLevel": null,
    "ModeOfTransportCode": null,
    "ModeOfTransport": null,
    "CarrierId": null,
    "Carrier": null,
    "CreatedBy": "CVBUYER01",
    "CreationDate": "2024-04-24T17:50:19.185+00:00",
    "LastUpdatedBy": "CVBUYER01",
    "LastUpdateDate": "2024-04-24T18:04:00.036+00:00",
    "LastSubmittedDate": null,
    "LastApprovalDate": null,
    "OriginalSubmittedDate": null,
    "OriginalApprovalDate": null,
    "CancelDate": null,
    "CancelReason": null,
    "RequisitionLinePOInstanceId": null,
    "BuyerProcessingFlag": null,
    "RequisitionLineGroup": "LINES_REQUIRING_ATTENTION",
    "LineImageURL": null,
    "SupplierItemAuxiliaryId": null,
    "DisableAutosourceFlag": false,
    "DeliverToOneTimeAddress": null,
    "LineTypeOrderTypeLookupCode": "QUANTITY",
    "ReturnedByBuyerId": null,
    "ReturnedByBuyerDisplayName": null,
    "ReturnReason": null,
    "LifecycleStatusCode": null,
    "LifecycleStatus": null,
    "ActionRequiredCode": null,
    "ActionRequired": null,
    "POCancelReason": null,
    "POHoldReason": null,
    "PublicShoppingListHeaderId": null,
    "InformationTemplateTouchedFlag": null,
    "FundsStatusCode": null,
    "FundsStatus": null,
    "LifecycleSecondaryStatus": null,
    "ItemUserOverrideFlag": null,
    "BPADescriptionUserOverrideFlag": false,
    "EPPLineId": null,
    "MarketplaceItemId": null,
    "links": [ …
    ]
}

Update Requisition Line with a CPA Reference

Let's consider a preparer who creates a requisition for a standard desktop without an agreement reference. Before submitting the requisition, the preparer updates the requisition with the correct agreement and supplier. There's an approved contract purchase agreement with supplier CV_SuppA05, and the agreement has an open status. The number of the agreement is 1003037. Since the agreement doesn't specify prices, the price of the item provided during POST is considered.

To update a requisition line with a CPA reference:

  1. Identify the requisition header ID and the requisition line ID that needs to be updated.
  2. Identify the agreement number, the supplier name, and the purchasing site name associated with the requisitioning BU.
  3. Optionally, identify the agreement ID.
  4. Perform a PATCH operation on this URL, providing the following details in the request body.
    • Patch with agreement number
      "SourceAgreement": "1003037",
      "Supplier": "CV_SuppA05",
      "SupplierSite": "CVSuppA05Site01"
      
    • Patch with agreement ID
      "SourceAgreementHeaderId": 300100594037684,

Example URL

Here's an example of the response body in JSON format:

PATCH

/fscmRestApi/resources/version/purchaseRequisitions

cURL Command

curl -u username:password -X POST -H "Content-Type:application/vnd.vision.adf.resourceitem+json" -d 'request payload' 
"https://servername/fscmRestApi/resources/version/purchaseRequisitions/purchaseRequisitionsUniqID/child/lines/linesUniqID"

Example Request

Here's an example of the request body in JSON format:

{
    "SourceAgreement": "1003037",
    "Supplier": "CV_SuppA05",
    "SupplierSite": "CVSuppA05Site01"
}

Example Response

Here's an example of the response body in JSON format:

{
    "RequisitionHeaderId": 300100593979133,
    "RequisitionLineId": 300100593979134,
    "LineNumber": 1,
    "SmartFormId": null,
    "SmartFormName": null,
    "LineTypeId": 1,
    "LineTypeCode": "Goods",
    "RequisitionLineSource": "REST_INTEGRATION",
    "CategoryId": 91,
    "CategoryName": "Finished Goods_91",
    "ItemDescription": "Standard Desktop",
    "ItemId": 149,
    "Item": "AS54888",
    "ItemRevision": null,
    "Quantity": 1,
    "SecondaryQuantity": null,
    "UnitPrice": 1200,
    "CurrencyCode": "USD",
    "Currency": "US Dollar",
    "UOMCode": "Ea",
    "UOM": "Each",
    "SecondaryUOMCode": null,
    "SecondaryUOM": null,
    "ConversionRateType": null,
    "ConversionRateDate": null,
    "ConversionRate": null,
    "Price": 1200,
    "LineStatus": "INCOMPLETE",
    "LineStatusDisplayValue": "Incomplete",
    "Amount": null,
    "CurrencyAmount": null,
    "UrgentFlag": null,
    "NegotiatedByPreparerFlag": null,
    "NegotiationRequiredFlag": null,
    "SourceAgreementTypeCode": "CONTRACT",
    "SourceAgreementType": "Contract Purchase Agreement",
    "SourceAgreementHeaderId": 300100594037684,
    "SourceAgreement": "1003037",
    "SourceAgreementLineId": null,
    "SourceAgreementLineNumber": null,
    "UNNumberId": null,
    "UNNumber": null,
    "HazardClassId": null,
    "HazardClass": null,
    "HazardClassCode": null,
    "UNSPSCCode": null,
    "ManufacturerName": null,
    "ManufacturerPartNumber": null,
    "BPAPriceUserOverrideFlag": null,
    "NewSupplierFlag": null,
    "SupplierId": 1717,
    "Supplier": "CV_SuppA05",
    "SupplierSiteId": 4060,
    "SupplierSite": "CVSuppA05Site01",
    "SupplierContactId": 300100550176374,
    "SupplierContact": null,
    "SupplierContactEmail": null,
    "SupplierContactPhone": null,
    "SupplierContactFax": null,
    "AdditionalContactEmail": null,
    "SuggestedSupplier": null,
    "SuggestedSupplierSite": null,
    "SuggestedSupplierContact": null,
    "SuggestedSupplierContactPhone": null,
    "SuggestedSupplierContactFax": null,
    "SuggestedSupplierContactEmail": null,
    "SupplierItemNumber": null,
    "RequesterId": 100010026863783,
    "Requester": "Furey,Clare",
    "RequesterDisplayName": "Clare Furey",
    "RequesterEmail": "cfurey@oracle.com",
    "SuggestedBuyerId": null,
    "SuggestedBuyer": null,
    "SuggestedBuyerEmail": null,
    "ModifiedByBuyerId": null,
    "ModifiedByBuyer": null,
    "AssignedBuyerId": null,
    "AssignedBuyer": null,
    "AssignedBuyerDisplayName": null,
    "AssignedBuyerEmail": null,
    "RequestedDeliveryDate": "2024-04-30",
    "DestinationTypeCode": "EXPENSE",
    "DestinationType": "Expense",
    "DestinationOrganizationId": 204,
    "DestinationOrganizationCode": "V1",
    "DestinationOrganization": "Vision Operations",
    "DestinationSubinventory": null,
    "OneTimeLocationFlag": false,
    "DeliverToLocationId": 204,
    "DeliverToLocationCode": "V1- New York City",
    "DeliverToAddress": "90 Fifth Avenue, New York,NY 10022-3422, New York, United States",
    "FormattedDeliverToAddress": "90 Fifth Avenue<BR>New York,NY 10022-3422<BR>New York<BR>United States",
    "NoteToBuyer": null,
    "NoteToReceiver": null,
    "NoteToSupplier": null,
    "RequisitionLineInPool": null,
    "POAutomationFailedReasonCode": null,
    "POAutomationFailedReason": null,
    "POHeaderId": null,
    "POLineId": null,
    "PurchaseOrder": null,
    "POBuyerId": null,
    "BuyerOnPurchaseOrder": null,
    "SupplierOnPurchaseOrder": null,
    "ProcurementBUId": 204,
    "ProcurementBU": null,
    "SourceTypeCode": "EXTERNAL",
    "SourceType": "Supplier",
    "SourceOrganizationId": null,
    "SourceOrganizationCode": null,
    "SourceOrganization": null,
    "SourceSubinventory": null,
    "TransferOrderHeaderId": null,
    "TransferOrder": null,
    "TransferOrderLineId": null,
    "NegotiationHeaderId": null,
    "Negotiation": null,
    "NegotiationLineNumber": null,
    "ResponseNumber": null,
    "ResponseLineNumber": null,
    "OnNegotiationFlag": null,
    "WorkOrderId": null,
    "WorkOrder": null,
    "WorkOrderOperationId": null,
    "WorkOrderOperationSequence": null,
    "WorkOrderProduct": null,
    "WorkOrderSubType": null,
    "BackToBackFlag": null,
    "ConfiguredItemFlag": false,
    "DeliverToCustomerId": null,
    "DeliverToCustomer": null,
    "DeliverToCustomerLocationId": null,
    "RequestedShipDate": null,
    "SalesOrderLineNumber": null,
    "SalesOrder": null,
    "SalesOrderScheduleNumber": null,
    "ShipToCustomerId": null,
    "ShipToCustomer": null,
    "ServiceLevelCode": null,
    "ServiceLevel": null,
    "ModeOfTransportCode": null,
    "ModeOfTransport": null,
    "CarrierId": null,
    "Carrier": null,
    "CreatedBy": "CVBUYER01",
    "CreationDate": "2024-04-24T22:16:05.236+00:00",
    "LastUpdatedBy": "CVBUYER01",
    "LastUpdateDate": "2024-04-24T22:17:06+00:00",
    "LastSubmittedDate": null,
    "LastApprovalDate": null,
    "OriginalSubmittedDate": null,
    "OriginalApprovalDate": null,
    "CancelDate": null,
    "CancelReason": null,
    "RequisitionLinePOInstanceId": null,
    "BuyerProcessingFlag": null,
    "RequisitionLineGroup": "LINES_REQUIRING_ATTENTION",
    "LineImageURL": null,
    "SupplierItemAuxiliaryId": null,
    "DisableAutosourceFlag": false,
    "DeliverToOneTimeAddress": null,
    "LineTypeOrderTypeLookupCode": "QUANTITY",
    "ReturnedByBuyerId": null,
    "ReturnedByBuyerDisplayName": null,
    "ReturnReason": null,
    "LifecycleStatusCode": null,
    "LifecycleStatus": null,
    "ActionRequiredCode": null,
    "ActionRequired": null,
    "POCancelReason": null,
    "POHoldReason": null,
    "PublicShoppingListHeaderId": null,
    "InformationTemplateTouchedFlag": null,
    "FundsStatusCode": null,
    "FundsStatus": null,
    "LifecycleSecondaryStatus": null,
    "ItemUserOverrideFlag": null,
    "BPADescriptionUserOverrideFlag": null,
    "EPPLineId": null,
    "MarketplaceItemId": null,
    "links": [ . . .         
    ]
}