Overriding taxes for commerce orders
As of 20.3.163 there is an option to override the tax amount and rate for order lines via the API using a boolean called IsTaxOverridden using a standard tax system.
1. Find or create a Cart for the user
Finding a cart
There are two important properties to search with when finding an existing cart: UserId and UpdateBy. Each of these is a PartyId and usually they are the same value.
https://{{URL}}/api/Cart?UserId=23284&UpdatedBy=23284
Creating a cart
If no results are returned, you can create a new Cart object for the user which will look something like this:
{
"$type": "Asi.Soa.Commerce.DataContracts.CartData, Asi.Contracts",
"UserId": "23284",
"ComboOrder": {
"$type": "Asi.Soa.Commerce.DataContracts.ComboOrderData, Asi.Contracts"
},
"UpdateInformation": {
"$type": "Asi.Soa.Core.DataContracts.EntityUpdateInformationData, Asi.Contracts",
"CreatedBy": "23284",
"CreatedOn": "2023-11-06T15:31:08.6076002-06:00",
"UpdatedBy": "23284",
"UpdatedOn": "2023-11-06T15:31:08.6076002-06:00"
}
}
Post it to the Cart endpoint and you should get a result back similar to this which contains the generated CartId:
{
"$type": "Asi.Soa.Commerce.DataContracts.CartData, Asi.Contracts",
"CartId": "6a62978b-339c-4d53-8778-fd55cb9153d6",
"UserId": "23284",
"ComboOrder": {
"$type": "Asi.Soa.Commerce.DataContracts.ComboOrderData, Asi.Contracts"
},
"UpdateInformation": {
"$type": "Asi.Soa.Core.DataContracts.EntityUpdateInformationData, Asi.Contracts",
"CreatedBy": "23284",
"CreatedOn": "2023-11-06T15:31:08.6076002-06:00",
"UpdatedBy": "23284",
"UpdatedOn": "2023-11-06T15:31:08.6076002-06:00"
}
}
2. Add products to the cart
You can then add products to the cart which will look like this:
{
"$type": "Asi.Soa.Commerce.DataContracts.CartData, Asi.Contracts",
"CartId": "b6f1536a-0205-45f6-a210-3638c9302944",
"UserId": "23284",
"ComboOrder": {
"$type": "Asi.Soa.Commerce.DataContracts.ComboOrderData, Asi.Contracts",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"Order": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderData, Asi.Contracts",
"BillToCustomerParty": {
"$type": "Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts",
"PartyId": "23284"
},
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"Delivery": {
"$type": "Asi.Soa.Commerce.DataContracts.DeliveryDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Commerce.DataContracts.DeliveryData, Asi.Contracts",
"Address": {
"$type": "Asi.Soa.Membership.DataContracts.FullAddressData, Asi.Contracts",
"AdditionalLines": {
"$type": "Asi.Soa.Membership.DataContracts.AddressLineDataCollection, Asi.Contracts",
"$values": []
},
"Address": {
"$type": "Asi.Soa.Membership.DataContracts.AddressData, Asi.Contracts",
"AddressId": "13760"
},
"AddresseeText": "New TaxTester\r\n",
"AddressPurpose": "Address",
"CommunicationPreferences": {
"$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts",
"Reason": "default"
},
{
"$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts",
"Reason": "mail"
},
{
"$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts",
"Reason": "bill"
},
{
"$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts",
"Reason": "ship"
}
]
},
"FullAddressId": "13760",
"Salutation": {
"$type": "Asi.Soa.Membership.DataContracts.PartySalutationData, Asi.Contracts",
"SalutationMethod": {
"$type": "Asi.Soa.Membership.DataContracts.PartySalutationMethodSummaryData, Asi.Contracts",
"PartySalutationMethodId": "main"
},
"Text": "New TaxTester"
},
"DisplayName": "New"
},
"AddressId": "13760",
"CustomerParty": {
"$type": "Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts",
"PartyId": "23284"
},
"DeliveryId": "2de7997b-c636-43fa-aa23-42025a784539",
"DeliveryMethod": {
"$type": "Asi.Soa.Commerce.DataContracts.DeliveryMethodData, Asi.Contracts"
}
}
]
},
"OrderDiscount": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"LineDiscountTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"Lines": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderLineDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Commerce.DataContracts.OrderLineData, Asi.Contracts",
"OrderLineId": "97f1ea70-3484-4ba9-bd65-2354f84c3188",
"AdditionalAttributes": {
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "WebsiteEditUrl",
"Value": "https://demodb.asiops.com:443/iCore/Store/StoreLayouts/Item_Detail.aspx?iProductCode=AsscCEOGuide&Category=PUB&WebsiteKey=4243d9e2-e91e-468c-97c2-2046d70c1e1a"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "UpdatedOn",
"Value": {
"$type": "System.Int64",
"$value": 638303901184242225
}
}
]
},
"ExtendedAmount": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 39.98,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"Item": {
"$type": "Asi.Soa.Commerce.DataContracts.ItemSummaryData, Asi.Contracts",
"ItemClass": {
"$type": "Asi.Soa.Commerce.DataContracts.ItemClassSummaryData, Asi.Contracts",
"ItemClassId": "SALES-PUB"
},
"ItemCode": "AsscCEOGuide",
"ItemId": "AsscCEOGuide",
"Name": "Association CEO's Guide"
},
"LineNumber": 1,
"QuantityBackordered": {
"$type": "System.Nullable`1[[Asi.Soa.Commerce.DataContracts.QuantityData, Asi.Contracts]], mscorlib"
},
"QuantityOrdered": {
"$type": "System.Nullable`1[[Asi.Soa.Commerce.DataContracts.QuantityData, Asi.Contracts]], mscorlib",
"Amount": 1.0
},
"QuantityShipped": {
"$type": "System.Nullable`1[[Asi.Soa.Commerce.DataContracts.QuantityData, Asi.Contracts]], mscorlib",
"Amount": 1.0
},
"Tax": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxData, Asi.Contracts",
"Details": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxDetailDataCollection, Asi.Contracts",
"$values": []
},
"TaxTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"TaxableAmountTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"InclusiveTaxTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"TaxSchedule": {
"$type": "Asi.Soa.Commerce.DataContracts.TaxScheduleSummaryData, Asi.Contracts",
"Name": ""
},
"TaxCategory": {
"$type": "Asi.Soa.Commerce.DataContracts.TaxCategorySummaryData, Asi.Contracts"
}
},
"UnitPrice": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 39.98,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"BaseUnitPrice": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 39.98,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"Discount": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"DiscountCode": "",
"CanCombine": true,
"SourceCode": ""
}
]
},
"LineTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 39.98,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"MiscellaneousChargesTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"OrderDate": "2023-09-15T15:55:18.4362226Z",
"OrderTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 39.98,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"OriginatorCustomerParty": {
"$type": "Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts",
"PartyId": "23284"
},
"ShippingTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"SoldToCustomerParty": {
"$type": "Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts",
"PartyId": "23284"
},
"SourceCode": "",
"AdditionalCharges": {
"$type": "Asi.Soa.Commerce.DataContracts.AdditionalChargeDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Commerce.DataContracts.AdditionalChargeData, Asi.Contracts",
"AdditionalChargeId": "EventCredits",
"Description": "Credits",
"TotalAmount": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"Tax": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxData, Asi.Contracts",
"Details": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxDetailDataCollection, Asi.Contracts",
"$values": []
},
"TaxTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"InclusiveTaxTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
}
}
}
]
},
"TaxInformation": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxInformationData, Asi.Contracts",
"InclusiveTaxTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"TaxTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"OrderTaxes": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxDataCollection, Asi.Contracts",
"$values": []
}
},
"TotalBasePrice": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 39.98,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"AdditionalAttributes": {
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "OrderTotalExcludingCredits",
"Value": {
"$type": "System.Decimal",
"$value": 39.98
}
}
]
}
},
"Invoices": {
"$type": "Asi.Soa.Commerce.DataContracts.InvoiceSummaryDataCollection, Asi.Contracts",
"$values": []
},
"Payments": {
"$type": "Asi.Soa.Commerce.DataContracts.RemittanceDataCollection, Asi.Contracts",
"$values": []
}
},
"UpdateInformation": {
"$type": "Asi.Soa.Core.DataContracts.EntityUpdateInformationData, Asi.Contracts",
"CreatedBy": "18052",
"CreatedOn": "2023-09-15T20:55:18.47",
"UpdatedBy": "18052",
"UpdatedOn": "2023-09-15T20:55:18.47"
}
}
You will notice that the Tax object is blank and there is no boolean indicating the tax is overridden yet.
3. Adding the Tax details and IsTaxOverridden boolean
The tax object and IsTaxOverridden boolean should look like this:
"IsTaxOverridden": true,
"Tax": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxData, Asi.Contracts",
"Details": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxDetailDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxDetailData, Asi.Contracts",
"TaxAmount": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 3.99,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"TaxAuthority": {
"$type": "Asi.Soa.Commerce.DataContracts.TaxAuthoritySummaryData, Asi.Contracts",
"Description": "California Sales Tax",
"Name": "CA",
"TaxAuthorityId": "CA",
"TaxAuthorityCode": "CA"
},
"TaxAuthorityRate": 0.10
}
]
},
"TaxTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"Amount" : 3.99,
"IsAmountDefined": true
},
"InclusiveTaxTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
}
},
They must be added to the Asi.Soa.Commerce.DataContracts.OrderLineData
objects.
The TaxAuthorityRate should be saved in decimal form. In the example above a 10 percent tax rate is stored at the line level as 0.10
along with the relevant tax authority details.
Required Fields:
- TaxAuthority (including TaxAuthorityId)
- TaxAuthorityRate
- TaxAmount
- IsTaxOverridden must be true for all commerce order lines. If the product is not taxable, just leave
Tax.Details
empty.
4. Update the pricing on the order
Use the Order endpoint to submit the Order portion of the ComboOrder as PricingUpdate request. This should return an updated OrderData with all pricing updated. Post to this endpoint:
https://{{URL}}/api/Order/_execute
With an object that looks like this (replace "{YourOrderHere}" with an object similar the above JSON):
{
"$type": "Asi.Soa.Commerce.DataContracts.OrderPriceUpdateRequest, Asi.Contracts",
"EntityTypeName": "Order",
"OperationName": "UpdatePricing",
"Order": {
{{YourOrderHere}}
}
}
Take that order and add it to your comboOrder to have the updated pricing and tax information.
The final cart object will look like this:
{
"$type": "Asi.Soa.Commerce.DataContracts.CartData, Asi.Contracts",
"CartId": "b6f1536a-0205-45f6-a210-3638c9302944",
"UserId": "23284",
"ComboOrder": {
"$type": "Asi.Soa.Commerce.DataContracts.ComboOrderData, Asi.Contracts",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"Order": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderData, Asi.Contracts",
"BillToCustomerParty": {
"$type": "Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts",
"PartyId": "23284"
},
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"Delivery": {
"$type": "Asi.Soa.Commerce.DataContracts.DeliveryDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Commerce.DataContracts.DeliveryData, Asi.Contracts",
"Address": {
"$type": "Asi.Soa.Membership.DataContracts.FullAddressData, Asi.Contracts",
"AdditionalLines": {
"$type": "Asi.Soa.Membership.DataContracts.AddressLineDataCollection, Asi.Contracts",
"$values": []
},
"Address": {
"$type": "Asi.Soa.Membership.DataContracts.AddressData, Asi.Contracts",
"AddressId": "13760"
},
"AddresseeText": "New NoTaxTest1\r\n",
"AddressPurpose": "Address",
"CommunicationPreferences": {
"$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts",
"Reason": "default"
},
{
"$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts",
"Reason": "mail"
},
{
"$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts",
"Reason": "bill"
},
{
"$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts",
"Reason": "ship"
}
]
},
"FullAddressId": "13760",
"Salutation": {
"$type": "Asi.Soa.Membership.DataContracts.PartySalutationData, Asi.Contracts",
"SalutationMethod": {
"$type": "Asi.Soa.Membership.DataContracts.PartySalutationMethodSummaryData, Asi.Contracts",
"PartySalutationMethodId": "main"
},
"Text": "New NoTaxTest1"
},
"DisplayName": "New"
},
"AddressId": "13760",
"CustomerParty": {
"$type": "Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts",
"PartyId": "23284"
},
"DeliveryId": "2de7997b-c636-43fa-aa23-42025a784539",
"DeliveryMethod": {
"$type": "Asi.Soa.Commerce.DataContracts.DeliveryMethodData, Asi.Contracts"
}
}
]
},
"OrderDiscount": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"LineDiscountTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"Lines": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderLineDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Commerce.DataContracts.OrderLineData, Asi.Contracts",
"OrderLineId": "97f1ea70-3484-4ba9-bd65-2354f84c3188",
"AdditionalAttributes": {
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "WebsiteEditUrl",
"Value": "https://demodb.asiops.com:443/iCore/Store/StoreLayouts/Item_Detail.aspx?iProductCode=AsscCEOGuide&Category=PUB&WebsiteKey=4243d9e2-e91e-468c-97c2-2046d70c1e1a"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "UpdatedOn",
"Value": {
"$type": "System.Int64",
"$value": 638303901184242225
}
}
]
},
"ExtendedAmount": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 39.98,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"Item": {
"$type": "Asi.Soa.Commerce.DataContracts.ItemSummaryData, Asi.Contracts",
"ItemClass": {
"$type": "Asi.Soa.Commerce.DataContracts.ItemClassSummaryData, Asi.Contracts",
"ItemClassId": "SALES-PUB"
},
"ItemCode": "AsscCEOGuide",
"ItemId": "AsscCEOGuide",
"Name": "Association CEO's Guide"
},
"LineNumber": 1,
"QuantityBackordered": {
"$type": "System.Nullable`1[[Asi.Soa.Commerce.DataContracts.QuantityData, Asi.Contracts]], mscorlib"
},
"QuantityOrdered": {
"$type": "System.Nullable`1[[Asi.Soa.Commerce.DataContracts.QuantityData, Asi.Contracts]], mscorlib",
"Amount": 1.0
},
"QuantityShipped": {
"$type": "System.Nullable`1[[Asi.Soa.Commerce.DataContracts.QuantityData, Asi.Contracts]], mscorlib",
"Amount": 1.0
},
"Tax": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxData, Asi.Contracts",
"Details": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxDetailDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxDetailData, Asi.Contracts",
"TaxAmount": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 3.99,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"TaxAuthority": {
"$type": "Asi.Soa.Commerce.DataContracts.TaxAuthoritySummaryData, Asi.Contracts",
"Description": "California Sales Tax",
"Name": "CA",
"TaxAuthorityId": "CA",
"TaxAuthorityCode": "CA"
},
"TaxAuthorityRate": 0.10
}
]
},
"TaxTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 3.99,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"InclusiveTaxTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
}
},
"UnitPrice": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 39.98,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"BaseUnitPrice": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 39.98,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"Discount": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"DiscountCode": "",
"CanCombine": true,
"SourceCode": "",
"IsTaxOverridden": true
}
]
},
"LineTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 39.98,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"MiscellaneousChargesTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"OrderDate": "2023-09-15T15:55:18.4362226Z",
"OrderTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 43.97,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"OriginatorCustomerParty": {
"$type": "Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts",
"PartyId": "23284"
},
"ShippingTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"SoldToCustomerParty": {
"$type": "Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts",
"PartyId": "23284"
},
"SourceCode": "",
"AdditionalCharges": {
"$type": "Asi.Soa.Commerce.DataContracts.AdditionalChargeDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Commerce.DataContracts.AdditionalChargeData, Asi.Contracts",
"AdditionalChargeId": "EventCredits",
"Description": "Credits",
"TotalAmount": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"Tax": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxData, Asi.Contracts",
"Details": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxDetailDataCollection, Asi.Contracts",
"$values": []
},
"TaxTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"InclusiveTaxTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
}
}
}
]
},
"TaxInformation": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxInformationData, Asi.Contracts",
"InclusiveTaxTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"TaxTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 3.99,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"OrderTaxes": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxData, Asi.Contracts",
"Details": {
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxDetailDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Commerce.DataContracts.OrderTaxDetailData, Asi.Contracts",
"TaxAmount": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 3.99,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"TaxAuthority": {
"$type": "Asi.Soa.Commerce.DataContracts.TaxAuthoritySummaryData, Asi.Contracts",
"Description": "California Sales Tax",
"Name": "CA",
"TaxAuthorityId": "CA",
"TaxAuthorityCode": "CA"
}
}
]
},
"TaxTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 3.99,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"InclusiveTaxTotal": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"TaxSchedule": {
"$type": "Asi.Soa.Commerce.DataContracts.TaxScheduleSummaryData, Asi.Contracts",
"TaxScheduleId": "CA",
"Name": "CA",
"Description": "California Sales Tax",
"ShowTaxDetails": false
}
}
]
}
},
"TotalBasePrice": {
"$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
"Amount": 39.98,
"Currency": {
"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
"CurrencyCode": "USD",
"DecimalPositions": 2
},
"IsAmountDefined": true
},
"AdditionalAttributes": {
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "OrderTotalExcludingCredits",
"Value": {
"$type": "System.Decimal",
"$value": 43.97
}
}
]
}
},
"Invoices": {
"$type": "Asi.Soa.Commerce.DataContracts.InvoiceSummaryDataCollection, Asi.Contracts",
"$values": []
},
"Payments": {
"$type": "Asi.Soa.Commerce.DataContracts.RemittanceDataCollection, Asi.Contracts",
"$values": []
}
},
"UpdateInformation": {
"$type": "Asi.Soa.Core.DataContracts.EntityUpdateInformationData, Asi.Contracts",
"CreatedBy": "18052",
"CreatedOn": "2023-09-15T20:55:18.47",
"UpdatedBy": "18052",
"UpdatedOn": "2023-09-15T20:55:18.47"
}
}
5. Add payment information and submit the cart
The tax authority information and rates will now be persisted on each line and the rates will be used for adjustments to the order.
IMPORTANT NOTES:
- This only works with a system set for standard taxation.
- Tax cannot be specifically set on shipping/handling - this will be auto-calculated using the rates passed in if shipping and handling charges are taxed in the system.
- Tax will not recalculate when quantities are adjusted in the cart since it is manually set.
- There is a limit of 3 different tax authorities per an order (e.g. City, County and State).
- If the TaxAuthority specified in the Tax Details does not exist in the system, it will be added (provided the TaxAuthorityId does not exceed the 15 character limit)
Updated about 1 year ago