Generating VariantConfigIds
This page provides an overview of how to generate VariantConfigIds for a Vehicle configured on your website.
Context
Ekho requires variantConfigIds
for its checkoutCart_oncreate_v2
endpoint. You must programmatically generate them based on the specific Vehicle configuration a Buyer has selected.
Please follow the guide below to generate the correct variantConfigId
and successfully call checkoutCart_oncreate_v2
.
Required Items
Ekho’s internal productId
for the Vehicle model.
Steps
-
Collect all accessory names in the Vehicle’s configuration into an array. E.g.
Red
,Extra Storage
, etc. These names should align with the possible accessories specified in the Vehicle onboarding sheet you sent to Ekho. -
Remove symbols & spaces from the accessory names and sort alphabetically.
-
Concatenate the names in the array using
'-'
. This is avariantId
. -
Concatenate the Vehicle’s
productId
with thevariantId
using'-'
.Example:
ProductID-AccessoryA-AccessoryB-AccessoryC
-
Use the final string as a
variantConfigId
, as specified in the belowcheckoutCart_oncreate_v2
schema: