Service Provider

When an Asset is being serviced, there can be many stakeholders. The Asset commonly will have a Customer who owns it, but there may be 3rd parties that manage servicing on behalf of the Customer.

An example of this is a Property Manager for a street of apartment buildings. A tenant with a broken dishwasher reports the issue to their Property Manager. The Property Manager confirms the dishwasher has an issue and requests a service from our Property Maintenance company. In this scenario, all communication and billing for the service is directed to the Property Manager, not the tenant.

This is achieved by creating the Project, Case, Task, and/or Transaction against the Customer that is 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 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 that don't have an ongoing contracts or may become active/inactive over time. Without strict data management, there is no certainty that the configured behavior will be accurate. These accounts may find it useful to not have any 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

When controls over the available billable Customers is required, it is often easier to manage the relationship between a Customer and an Asset with a custom record. A custom record that is a child of both Customer and Asset records will be visible from either of these records.

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

General Notices