Discussions

Ask a Question
Back to all

ProcessCashAdjustment on a multi-ShipToParty invoice - How to target one party's line?

Hi all,

Here's our situation:

Members self-select optional sections (committees they pay a small annual fee to join) through a self-service page. A back-end service adds and removes the corresponding subscriptions and adjusts the matching invoice line.

The complication is that many of our members are billed through their firm. One group-billing invoice carries dues and section lines for anywhere from a handful to several hundred individual contacts, each as a separate ShipToParty on its own line.

The problem is: ProcessCashAdjustment appears to resolve InvoiceLineAdjustments by InvoiceId + ProductCode only. On an invoice where the member is paying for themselves (and therefore there is only the one party), that line is unique. On a group bill invoice it will match every line carrying that product code, so an adjustment intended for one member is applied to every member on the invoice who holds the same section.

Here's my questions:

  1. Is there any supported discriminator, at the line level or the parameters level, that scopes ProcessCashAdjustment to a single ShipToParty on a group bill invoice?
  2. If no discriminator exists, what is the supported pattern for adjusting a single line for one contact on a shared group-billing invoice?

Here's an example for our test environment:

Invoice 420748: 90 lines, 22 distinct ShipToParty values, HasMultipleShipToParty: true, IsLinkedToSubscriptions: true.

Out intent is to remove sections CC and IP for contact 47077 only.

Result from using our self-service page: one POST /api/Invoice/_execute with ProductCode: "IP" updated three subscriptions belonging to three different members. Their LastUpdated stamps, from a single call:

47077 | IP 2026-09-16T09:45:33.077 <- intended
94252 | IP 2026-09-16T09:45:33.123 <- not intended
644859 | IP 2026-09-16T09:45:33.157 <- not intended

All three received CancelledAsOf. The call returned HTTP 200. A second call for ProductCode: "CC" behaved the same way across the two contacts holding CC.

Our self-service page has applicable filters for InvoiceLineId, LineNumber, and ShipToParty from a GET call to /api/Invoice before we call ProcessCashAdjustment. We're just not aware of a way to use those filters in the POST. Are you?

Here are our payloads:

There's two processes using ProcessCashAdjustment. One is for deleting a section, and one for re-activating a section. Here's our Remove payload:

{
"$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
"OperationName": "ProcessCashAdjustment",
"EntityTypeName": "Invoice",
"Parameters": { "$values": [ {
"$type": "Asi.Soa.Commerce.DataContracts.InvoiceActionCashAdjustmentData, Asi.Contracts",
"InvoiceId": "420748",
"AdjustmentDate": "2026-09-16",
"InvoiceLineAdjustments": { "$values": [ {
"$type": "Asi.Soa.Commerce.DataContracts.PartialInvoiceLine, Asi.Contracts",
"Item": {
"$type": "Asi.Soa.Commerce.DataContracts.ItemSummaryData, Asi.Contracts",
"Description": "Intellectual Property Law Section",
"ItemClass": {
"$type": "Asi.Soa.Commerce.DataContracts.ItemClassSummaryData, Asi.Contracts",
"ItemClassId": "SEC",
"Name": "Section"
},
"ItemCode": "IP",
"ItemId": "IP",
"Name": "Intellectual Property Law Section"
},
"ItemSet": null,
"ProductCode": "IP",
"IsRemoved": true
} ] }
} ] },
"UseJson": false
}

Our Re-activate payload (used when a previously removed section is re-selected) is the same shape as Delete, only with "IsRemoved": false and an "AdjustmentPrice". Both directions have the same targeting problem.

Every field in that PartialInvoiceLine is identical for all three contacts' lines: same Item block, same ProductCode. We can see no field in the contract that would distinguish them.

We are trying to mimic the iMIS EMS UI feature described on this page:[ https://documentation.advsol.com/imis/docs/list-billing#processing-list-billing-renewals](https://documentation.advsol.com/imis/docs/list-billing "https://documentation.advsol.com/imis/docs/list-billing"). Where you see 3# describes the ability to add/remove the line item. That's the functionality (a per member operation on the group bill) that we can achieve in EMS UI but are unclear how to do programmatically.

Can you help? Thanks in advance!

Brian

Contact us
Copyright © Advanced Solutions International, All rights reserved.