| name | repairshopr-asset-create-from-lenovo |
| description | Validate Lenovo serial and create asset in RepairShopr |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"technicians, kiosk applications","api":"GET /api/validate-and-create-asset/:serial/:customerId, POST /customer_assets"} |
What I do
I validate a Lenovo serial number against the Lenovo product database and, if valid, create an asset in RepairShopr linked to a customer. The asset is marked as type "Computer" with manufacturer "Lenovo".
When to use me
Use this when:
- Customer provides a laptop serial number during check-in
- You want to automatically create an asset record for that device
- You need to verify the serial corresponds to a valid Lenovo product
- You want to capture the Lenovo product name as the asset name
How to use
Required API base URL:
VITE_REPAIRSHOPR_SUBDOMAIN
VITE_REPAIRSHOPR_API_KEY
Parameters:
serial (string) - The Lenovo serial number (e.g., "PW01B6J5")
customerId (integer) - The RepairShopr customer ID to attach the asset to
Example call:
const result = await skill({ name: "repairshopr-asset-create-from-lenovo" }, {
serial: "PW01B6J5",
customerId: 35451526
})
Response includes:
valid (boolean) - Whether the serial is a valid Lenovo product
asset (object or null) - The created asset data if valid, including:
id - Asset ID (use in ticket creation)
name - Product name from Lenovo (e.g., "L13 Yoga Gen 2 ...")
asset_serial - Serial number
asset_type - "Computer"
properties - Includes manufacturer: "Lenovo" and Lenovo-specific fields
Notes
- If the serial is not found in Lenovo's database, returns
{ valid: false, asset: null }
- If Lenovo API fails, returns 500 error
- If asset creation fails but serial is valid, returns
{ valid: true, asset: null }
- Created asset can be attached to a ticket using
asset_ids parameter in ticket creation