Service Provider
When an asset is being serviced, there can be many stakeholders. The asset usually has a customer who owns it, but sometimes a third party manages servicing for the customer.
For example, a property manager might oversee a street of apartment buildings. A tenant with a broken dishwasher reports the issue to their property manager. The property manager confirms the dishwasher issue and requests service from our property maintenance company. In this case, all service communication and billing goes to the property manager, not the tenant.
You do this by creating the project, case, task, or transaction against the customer to be billed. An asset has a valid set of customers that can be billed to which is defined by the models/asset.map.customers
and models/asset.customers
properties and the models/customer.map.assets
and models/customer.assets
properties.
Asset Owner
The default behavior is for the asset owner to be the only available customer. This makes sense if a home owner had a dishwasher that was broken and requested service directly from our property maintenance company.
How to Configure
No configuration is required for this behavior. The asset model by default is configured to refer to the Customer field on the Asset record. The customer model is preconfigured to search for assets whose customer matches the current customer model instance. For reference, this is the default configuration.
{
"models/asset": {
"prototype": {
"map": {
"customers": "formulatext:{custrecord_nx_asset_customer.internalid}"
},
"customers": {
"array": true,
"customer": {
"all": true,
"record": "customer",
"filters": ["internalid", "anyof", "${this.customer || 0}"]
}
}
}
}
"models/customer": {
"prototype": {
"map": {
"assets": "formulatext:''"
},
"assets": {
"array": true,
"asset": {
"all": true,
"record": "customrecord_nx_asset",
"filters": ["custrecord_nx_asset_customer", "anyof", "${this.id}"]
}
}
}
}
}
Important Considerations
Only the asset owner will be ever available.
Service Providers Multi Select
Often an asset will have defined contracts with one or more property managers. The asset owner will never be billed and should not be available to select when creating jobs.
How to Configure
This can be achieved by adding a Service Providers
Multi Select Customer field to the asset for the valid billers. Remap the models/asset.map.customers
property to the new field. Then update the models/customer.assets
default search to filter by the Service Providers field.
{
"models/asset": {
"prototype": {
"map": {
"customers": "custrecord_nxc_service_providers[]|"
}
}
}
"models/customer": {
"prototype": {
"assets": {
"asset": {
"filters": ["custrecord_nxc_service_providers", "anyof", "${this.id}"]
}
}
}
}
}
Important Considerations
Data must be managed to unsure selectable assets and customers are accurate.
All Customers
Assets may have property managers without ongoing contracts or who become active or inactive over time. If data isn’t strictly managed, it may be easier for these accounts to remove restrictions on which customers can be billed for an asset.
How to Configure
This can be configured by setting the models/asset.map.customers
and models/customer.map.assets
properties to true
.
{
"models/asset": {
"prototype": {
"map": {
"customers": true
}
}
}
"models/customer": {
"prototype": {
"map": {
"assets": true
}
}
}
}
Important Considerations
-
Less overhead for managing data
-
Possible to accidentally bill completely unrelated customers
Service Providers Child Record
If you need control over billable customers, it’s often easier to manage the customer-asset relationship with a custom record. A record that’s a child of both will be visible from either the Customer or Asset.
How to Configure
This example assumes a Service Providers
custom record exists with both a Customer and Asset List/Record parent field. Set the models/asset.map.customers
and models/customer.map.assets
properties to "" to defer to the more complex search properties.
Update the models/customer.assets
and models/asset.customers
properties by registering a new serviceproviders
search, querying the custom record and mapping back the Asset or Customer internal ID.
{
"models/asset": {
"prototype": {
"map": {
"customers": ""
},
"customers": {
"serviceproviders": {
"record": "customrecord_nxc_service_providers",
"filters": ["custrecord_nxc_service_providers_asset", "anyof", "${this.id}"],
"map": "custrecord_nxc_service_providers_customer"
}
}
}
}
"models/customer": {
"prototype": {
"map": {
"assets": ""
},
"assets": {
"serviceproviders": {
"record": "customrecord_nxc_service_providers",
"filters": ["custrecord_nxc_service_providers_customer", "anyof", "${this.id}"],
"map": "custrecord_nxc_service_providers_asset"
}
}
}
}
}
Important Considerations
-
Data is manageable from both the customer and asset record.
-
Capable of combining multiple searches.
-
Logic can be based on any searchable data in NetSuite.