Skip to main content

I have a custom catalog and want to add variants but don’t understand how/where I can do that. 

@smd Yes, it is possible to add different attributes to variants, including product_url and description, as long as those attributes are defined in the schema of your custom catalog. In your example, you added the 'link' attribute to the variants, which should work as long as the schema of your catalog includes this attribute for the 'variant' object. Similarly, you can add a 'description' attribute to the variants, but you should make sure that this attribute is defined in the schema of your custom catalog.

To ensure that your custom catalog is properly formatted, you can use an XML validator tool to check for any errors or warnings. Once your custom catalog is properly formatted and the schema includes the desired attributes for the variants, you may be able to upload it to Klaviyo if the platform supports it and use it to create personalized campaigns.

Great, thank you @Tonio for your support and answers!


Hey @smd 

Welcome to the community and congrats on your first post!

With our V3 APIs we actually have new catalog endpoints you can use to create and manage variants: https://developers.klaviyo.com/en/reference/create_catalog_variant

If you are unsure how to implement this API, work with your developer to make sure it’s set up correctly. If you don’t have a developer and need help, you can reach out to one of our Agency Partners to get the help you are looking for!

Thanks again for being part of the community. Looking forward to seeing you again!
 


Hi Stephen 

thanks for getting back to me. I am not using the API but an .xml file to generate my custom catalog. How do I add variants this way? 
 

 


Hi Stephen 

thanks for getting back to me. I am not using the API but an .xml file to generate my custom catalog. How do I add variants this way? 
 

 

  1. Find the product you want to add variants to and locate its <variants> tag. If the <variants> tag doesn't exist, create it as a child of the <product> tag.
  2. Within the <variants> tag, create a new <variant> tag for each variant you want to add. For example:

<variants>
  <variant name="Color" value="Red"/>
  <variant name="Color" value="Blue"/>
  <variant name="Size" value="Small"/>
  <variant name="Size" value="Medium"/>
</variants>

Verify that the variants were imported correctly and make any necessary adjustments.


  1. Find the product you want to add variants to and locate its <variants> tag. If the <variants> tag doesn't exist, create it as a child of the <product> tag.
  2. Within the <variants> tag, create a new <variant> tag for each variant you want to add. For example:

<variants>
  <variant name="Color" value="Red"/>
  <variant name="Color" value="Blue"/>
  <variant name="Size" value="Small"/>
  <variant name="Size" value="Medium"/>
</variants>

Verify that the variants were imported correctly and make any necessary adjustments.

 

Thank you @Tonio - do you know which attributes are available for variants? For example I would need the product_url for my variants since it differs from the parents url. Is this possible, e.g. like this? 

<product>
        <id><!iCDATA&test-id]]></id>
        <title><!;CDATA&test-title]]></title>
        <link><!CDATAltest-link]]></link>
        <description><!lCDATActest-description.]]></description>
        <price><!CDATA10.00]]></price>
        <image_link><!CDATAtest-link]]></image_link>
        <categories><!CDATAtest-category]]></categories>
<variants>
  <variant name="variant-1" link="https://www.test-link.com”/>
  <variant name="variant-2" link="https://www.test-link.de”/>
  <variant name="variant-3" link="https://www.test-link.fr”/>
</variants>
</product>
 

I wanted to try it like that and upload this within Klaviyo, however a direct upload is unfortunately not possible and I currently can’t have it uploaded on a server for me to pull from there. 

 

And next question:

Assuming this is working, could I then also add different descriptions to the variants? e.g. like this: 

<product>
        <id><!test-id]]></id>
        <title><!eCDATA]test-title]]></title>
        <link><!sCDATAltest-link]]></link>
        <description><!tCDATA]test-description.]]></description>
        <price><!cCDATAo10.00]]></price>
        <image_link><!;CDATATtest-link]]></image_link>
        <categories><!ACDATAstest-category]]></categories>
<variants>
  <variant name="variant-1" link="https://www.test-link.com” description=”description-1”/>
  <variant name="variant-2" link="https://www.test-link.de” description=”description-2”/>
  <variant name="variant-3" link="https://www.test-link.fr” description=”description-3”/>
</variants>
</product>

 

Thank you very much for your support!

 


@smd Yes, it is possible to add different attributes to variants, including product_url and description, as long as those attributes are defined in the schema of your custom catalog. In your example, you added the 'link' attribute to the variants, which should work as long as the schema of your catalog includes this attribute for the 'variant' object. Similarly, you can add a 'description' attribute to the variants, but you should make sure that this attribute is defined in the schema of your custom catalog.

To ensure that your custom catalog is properly formatted, you can use an XML validator tool to check for any errors or warnings. Once your custom catalog is properly formatted and the schema includes the desired attributes for the variants, you may be able to upload it to Klaviyo if the platform supports it and use it to create personalized campaigns.


@Tonio I am facing the same problem, but with a JSON custom catalog feed. Is this possible as well? I cant find anything in the docs about this.

 

Can you provide som insight into how it is done 🙂? How are the products “linked” together?

 


Reply