Optical Lab Integrations
LensAdvisor integrates with lens labs either via email or API integrations.
- In the Optical Labs section of the app, you can turn on any number of connectors, optical labs, or opt for simple email integration under 'My Private Lab'.
- Then, from the Order Detail page you can choose to send each pair of eyewear to your chosen optical lab.
▾ connector documentation ▾
Sending orders to your chosen lab's order system can be done through connectors, or directly to the lab's API if they have one available.
Ocuco
Collapsible content
Ocuco - Frame Metadata
Frame Metadata
Frame metadata is set on the Shopify product.
- Navigate to Shopify > Custom Data > Add Definition
- Create a new product metadata definition with the following:
-
Name:
Ocuco Frame Data -
Namespace and key:
lensadvizor.ocuco_labs-frame -
Type:
JSON
A custom field will now be available on your products, and you can add metadata using the following format:
{ "frame_upc": "ABC123", "frame_status": "SUPPLIED", "frame_model": "XYZJKL", "instructions": "product:title", "frame_eye": "50", "frame_a": "60", "frame_mounting": "STANDARD", "frame_edge": "EDGED" }
A metadata value with a prefix of product:
will pull that data from the order line item's product fields.
For example, product:title
will return the product's title, and product:sku
will return the SKU.
A metadata value with a prefix of Variant:
will pull that data from the order line item's variant fields.
For example, Variant:sku
will return the order line item's title, and Variant:option1
will return the value from whatever the first option is on the Variant
Ocuco - Lens Metadata
Lens Metadata
Lens Metadata is set on any LensAdvisor object as key-value pairs. You can pass data for any of the following keys:
- lens_od_material_code
- lens_os_material_code
- lens_od_material_desc
- lens_os_material_desc
- lens_od_style_code
- lens_os_style_code
- lens_os_style_desc
- lens_od_style_desc
- lens_od_color_code
- lens_os_color_code
See Adding Lab Metadata below for instructions on how to enter Lab Metadata
Ocuco - Miscellaneous Metadata
Ocuco Miscellaneous Data
Ocuco passes some data as 'miscellaneous' data.
Miscellaneous Data can be added as lab metadata on any LensAdvisor object in the format of:
- key: ocuco_misc_[any value]
- value: JSON
JSON for Miscellaneous data will be in the following format:
{ "sku": "ABC123", "item_source": "COAT", "item_description": "", "item_value": "" // only use if item_source is TINT }
item_source is one of the following:
- MISC
- FRAME
- FLENS
- SFLENS
- NONSTK
- REM
- PACK
- TINT
- COAT
- EDGING
- PACKAGE
- OVERSIZE
- RXPRISM
- RXAdd
VisionWeb
Collapsible content
VisionWeb - Frame Data
Frame Metadata
Frame metadata is set on the Shopify product.
- Navigate to Shopify > Custom Data > Add Definition
- Create a new product metadata definition with the following:
- Name: VisionWeb Frame Data
- Namespace and key: lensadvizor.visionweb-frame
- Type: JSON
A custom field will now be available on your products, and you can add metadata using the following format:
{ "jobType": "Supply", "ED": "55", "Dbl": "20", "Eye": "50", "ABox": "50", "BBox": "42.5", "FrameSKU": "Variant:sku", "FrameUPC": "Variant:barcode", "FrameType": "ZYLO", "FrameColor": "Variant:option1", "FrameModel": "product:title", "FrameManufacturer": "ABCXYZ", "FrameTempleLength": "140" }
A metadata value with a prefix of product:
will pull that data from the order line item's product fields.
For example, product:title
will return the product's title, and product:sku
will return the SKU.
A metadata value with a prefix of Variant:
will pull that data from the order line item's variant fields.
For example, Variant:sku
will return the order line item's title, and Variant:option1
will return the value from whatever the first option is on the Variant
VisionWeb - Lens Data
Lens Metadata
Lens Metadata is set on any LensAdvisor object as key-value pairs. You can pass any of the following data through.
Examples of Lens Metadata Keys:
- LELensDesign
- RELensDesign
- LELensMaterial
- RELensMaterial
- LETreatment1
- RETreatment1
- LETreatment2
- RETreatment2
- LETreatmentComments
- RETreatmentComments
See Adding Lab Metadata below for instructions on how to enter Lab Metadata
Optivision
Collapsible content
General
Collapsible content
Adding Lab Metadata
Lab Metadata is a series of key:value pairs.
This data will be used to modify the request to the selected lab's API.
Example:
Key: RELensMaterial
Value: PO-58-NONE-NONE-00
Calculating and Cascading Metadata
By default, if the same key exists at a lower level in the metadata chain, the value of the lower level will replace the value of the higher level for the same key.
Example:
Lens Level:
Key: RELensMaterial
Value: PO-58-NONE-NONE-00
Lens Option Level:
Key: RELensMaterial
Value: PO-67-POLR-BRWN-00
Final Result:
Key: RELensMaterial
Value: PO-67-POLR-BRWN-00
Using Variables in Metadata
Metadata can have variables where the lower level of metadata will instead replace parts of the higher level of metadata. This is accomplished by 'creating a variable' and 'setting a variable'.
Creating a Variable in a String
This is done by using the format of [variable=value].
Setting a Variable in a String
This is done by using the format of .
Example:
Lens Level:
Key: RELensMaterial
Value: PO-58-[lens_type=NONE]-[lens_color=NONE]-00
Lens Option Level:
Key: RELensMaterial
Value:
Final Result:
Key: RELensMaterial
Value: PO-67-POLR-GREY-00