Create Customer Assets and Charges

You can use REST API to create and update customer and enterprise assets in the asset repository. You can create and update the assets, their associated structure, part list items, and charges details.

Let's discuss these scenarios:

  • Create a Customer Asset

  • Create an Asset Charge

Here's a typical application processing flow for the scenarios:

  1. You create a customer asset with the information for the party, site, and account information.

  2. You create an asset charge and associate it to the customer asset.

Create a Customer Asset

Example URL

Use this resource URL format.

POST

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' 
"https://servername/fscmRestApi/resources/version/installedBaseAssets"

Example Request

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

This table shows the values that are required to create customer asset:

Value Description

AssetNumber

Number that uniquely identifies the asset. This attribute is optional. If you do not provide it, the application uses the asset identifier.

ItemNumber

Number that uniquely identifies the item that the asset references. This attribute is required to create the asset if the ItemRequiredFlag attribute is true.

LotNumber

Number that uniquely identifying the lot that that the asset references to control the item in inventory. This attribute is applicable when the item is lot controlled. If the lot number does not exist in the inventory, then the application creates a lot in the inventory application.

Serial

Number that uniquely identifies the serial that the asset references. This attribute is used when item is serial controlled. If the serial number does not exist in the inventory, then the application creates a serial in the inventory application.

Quantity

Quantity for the item that the asset references. This attribute is required to create the asset.

OperatingOrganizationCode

Abbreviation that uniquely identifies the organization that creates or operates the asset. This attribute is optional to create a customer asset if not provided the item master organization is used.

SoldByBusinessUnitId

Value that uniquely identifies the business unit that sold the asset.

CurrentLocationContextCode

Abbreviation that uniquely identifies the location context where the asset currently resides. A list of accepted values is defined in the lookup type ORA_CSE_CURRENT_LOC_CONTEXT. For the case the expected value is ORA_CUSTOMER.

CustomerSiteId

Value that uniquely identifies the customer party site where the asset currently resides. The Customer party site must be part of the customer site party.

ShipmentDate

Date when the asset is shipped to the customer. This attribute is optional. If you do not provide it, the application uses the system date.

CustomerNumber

Number that uniquely identifies the customer party who currently owns or uses the asset. The customer is required to create a customer asset. You can provide either the CustomerId or the CustomerNumber attributes.

CustomerSitePartyId

Value that uniquely identifies the customer site party where the asset is located.

CustomerAccountId

Value that uniquely identifies the customer account to which the asset is billed.

CustomerAccountSiteId

Value that uniquely identifies the customer account site for the asset. This site must be part of the customer account.

CustomerAccountSiteUseId

Value that uniquely identifies the usage of the customer account site usage for the asset. This site usage must be part of the customer account site.

{
"AssetNumber": "F/0554-327-1",
"Description": "Professional combined Bench Grinder Fervi", 
"Quantity": 1,
"ItemNumber": "F/0554",
"CurrentLocationContextCode":"ORA_CUSTOMER",
"CustomerSiteId": 1033,
"OperatingOrganizationCode": "V1", 
"SoldByBusinessUnitId": 204,
"CustomerNumber": 1005,
"CustomerSitePartyId": 1005,
"CustomerAccountId": 1005,
"CustomerAccountSiteId": 1033,
"CustomerAccountSiteUseId": 1023,
"ShipmentDate": "2017-01-02"
}

Example Response

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

{
	"ActiveEndDate" : null,
	"AssetId" : 300100181428021,
	"AssetNumber" : "F/0554-327-1",
	"BOMExplosionFlag" : null,
	"CompetitorAssetFlag" : false,
	"CurrentLocationContextCode" : "ORA_CUSTOMER",
	"CurrentLocationId" : 1090,
	"CustomerAccountId" : 1005,
	"CustomerAccountSiteId" : 1033,
	"CustomerAccountSiteUseId" : 1023,
	"CustomerAssetEndDate" : null,
	"CustomerAssetStartDate" : "2017-01-02T00:00:00+00:00",
	"CustomerBillingPartyId" : 1005,
	"CustomerBillingPartySiteId" : 1033,
	"CustomerId" : 1005,
	"CustomerSiteId" : 1033,
	"CustomerSitePartyId" : 1005,
	"Description" : "Professional combined Bench Grinder Fervi",
	"DfltWoSubTypeCode" : null,
	"DfltWoTypeCode" : null,
	"InServiceDate" : null,
	"InstalledDate" : null,
	"LocatorId" : null,
	"IotEnabledFlag" : null,
	"ItemId" : 300100114215977,
	"OperatingOrganizationId" : 204,
	"ItemRevision" : null,
	"LocationOrganizationId" : null,
	"LotNumber" : null,
	"MaintainableFlag" : true,
	"NewWoAllowedFlag" : true,
	"PurchaseDate" : null,
	"Quantity" : 1,
	"RegistrationDate" : null,
	"SalesOrderId" : null,
	"SalesOrderLineId" : null,
	"SalesOrderLineNumber" : null,
	"SalesOrderNumber" : null,
	"SalesOrderSourceSystem" : null,
	"SalesOrderSourceSystemType" : null,
	"SerialNumber" : null,
	"ShipmentDate" : "2017-01-02T00:00:00+00:00",
	"SoldByBusinessUnitId" : 204,
	"SubinventoryCode" : null,
	"UOMCode" : "Ea",
	"UpdateContractFlag" : true,
	"WorkCenterId" : null,
	"WorkCenterName" : null,
	"LocationOrganizationCode" : null,
	"SoldByBusinessUnitName" : null,
	"CustomerSitePartyName" : null,
	"CustomerSitePartyNumber" : null,
	"CustomerSiteName" : null,
	"CustomerSiteNumber" : null,
	"CustomerAccountName" : null,
	"CustomerAccountNumber" : null,
	"CustomerAccountSiteName" : null,
	"CustomerAccountSiteNumber" : null,
	"CustomerAccountSiteUseCode" : null,
	"OperatingOrganizationCode" : null,
	"ManageAssetPrivilege" : "C",
	"ItemNumber" : null,
	"CustomerName" : null,
	"CustomerNumber" : null,
	"ItemRequiredFlag" : false,
	"Country" : null,
	"City" : null,
	"PostalCode" : null,
	"State" : null,
	"Address1" : null,
	"Address2" : null,
	"Address3" : null,
	"Address4" : null,
	"Province" : null,
	"County" : null,
	"OperatingOrganizationName" : null,
	"CurrentLocationContext" : null,
	"WorkCenterCode" : null,
	"LocatorName" : null,
	"CurrentLocationName" : null,
	"links" : [ {
		"rel" : "self",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181428021",
		"name" : "installedBaseAssets",
		"kind" : "item",
		"properties" : {
			"changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
		}
	}, {
		"rel" : "canonical",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181428021",
		"name" : "installedBaseAssets",
		"kind" : "item"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181428021/child/charges",
		"name" : "charges",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181428021/child/meters",
		"name" : "meters",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181428021/child/assetDFF",
		"name" : "assetDFF",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181428021/child/partsListComponents",
		"name" : "partsListComponents",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181428021/child/relationships",
		"name" : "relationships",
		"kind" : "collection"
	} ]
}

Create an Asset Charge

Example URL

Use this resource URL format.

Specify asset identifier to which the charge needs to be added; for example, 300100181428021.

POST

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' 
"https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181428021/child/charges"

Example Request

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

This table shows the values that are required to create an asset charge:

Value Description

ChargeComponentsRollupFlag

Contains one of the following values: True or False. If True, then the charge component represents the aggregated value of the rollup charge. If False, then the charge component does not represent this value. The default value is False.

ChargeDefinitionCode

Abbreviation that identifies the definition for the pricing charge. This attribute is required to define the asset charge.

ChargesRollupFlag

Contains one of the following values: True or False. If True, then the pricing charge is a rollup charge. If False, then the pricing charge is not a rollup charge. The default value is False.

CurrencyCode

Abbreviation that uniquely identifies the currency that the pricing charge uses. This attribute is required to define the asset charge.

PricedQuantityUOMCode

Abbreviation that identifies the unit of measure for the quantity that the application prices. This attribute is required to define the asset charge.

PriceElementCode

Abbreviation that identifies the pricing element of the pricing charge. This attribute is required to define the asset charge.

PriceElementUsageCode

Abbreviation that indicates whether the unit price in the pricing element is the list price or the net price.

PricePeriodicityCode

Abbreviation that identifies the recurring timeframe that the application uses to price the charge such as month or year.

PrimaryFlag

Contains one of the following values: True or False. If True, then the charge is a primary charge. If Flase, then the charge is not a primary charge. The default value is N.

TaxIncludedFlag

Contains one of the following values: True or False. If True, then the asset price includes taxes. If Flase, then the asset price does not include taxes. The default value is False.

UnitPrice

Unit price of the asset. This is the current price of the asset or price that the organization used when it sold the asset.

{
"ChargeDefinitionCode":"CHARGE1",
"PricedQuantityUOMCode":"Ea",
"UnitPrice":1000,
"CurrencyCode":"USD",
"PrimaryFlag":"Y",
"PricePeriodicityCode":1,
"ChargesRollupFlag":"Y",
"ChargeComponentsRollupFlag":"Y",
"PriceElementCode":1001,
"TaxIncludedFlag":"Y"
}

Example Response

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

{
	"AssetChargeId" : 300100181432037,
	"AssetId" : 300100181428021,
	"ChargeComponentsRollupFlag" : true,
	"ChargeDefinitionCode" : "CHARGE1",
	"ChargesRollupFlag" : true,
	"CurrencyCode" : "USD",
	"PriceElementCode" : "1001",
	"PriceElementUsageCode" : null,
	"PricePeriodicityCode" : "1",
	"PricedQuantityUOMCode" : "Ea",
	"PrimaryFlag" : true,
	"TaxIncludedFlag" : true,
	"UnitPrice" : 1000,
	"links" : [ {
		"rel" : "self",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181428021/child/charges/300100181432037",
		"name" : "charges",
		"kind" : "item",
		"properties" : {
			"changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
		}
	}, {
		"rel" : "canonical",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181428021/child/charges/300100181432037",
		"name" : "charges",
		"kind" : "item"
	}, {
		"rel" : "parent",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181428021",
		"name" : "installedBaseAssets",
		"kind" : "item"
	} ]
}