Editing Custom Fields via CSV in BigCommerce

Apr, 13 2022Editing Custom Fields via CSV in BigCommerce

How To Edit BigCommerce Custom Fields Via CSV

Do you have CUSTOM FIELDS in your BigCommerce store? If so, sometimes you'll want to edit those fields in bulk. In this video I'll show you how to do just that!

Video Transcript

Hey guys, in this video, I'm going to show you how to edit custom fields on your products in Bigcommerce using a CSV. Before we get started, my name is Kal, I'm a developer store just like you. And I run the E commerce growth community for store owners like us. Every week, I post more ecommerce videos, find this one helpful, subscribe, hit the belt, and you can see more. All right, let me share my screen. And I'm going to walk you guys through how to do this. Alright, so I'm logged into my store, first of all,

go to View and I'm going to

open up just one product. And I'm going to put in a couple CSS, I'm going to put into my gosh, again, talk, I'm going to put in a custom couple custom fields. And the reason I'm doing this is so that we have a you know, some I'm going to look at as an example, when we do an export. So I'm going to just come in here and say, blocks.

Yes. Material.

Plastic, I'm going to add one more, and have it have the same

material.

Grass, okay, so we've got three custom fields in here. Going to click Save. And now what we're going to do is we're gonna do a product export. So go to products, export, bulk, get it and click to export it. And then we're going to click the download it. And just like we've done in prior videos, we're going to go to Google Drive, we're going to import it, you can definitely do this on Excel, too. If that's easier. You notice I can open it up. And here we are. So first thing I'm going to do is I'm going to hide my cost column.

So that doesn't annoy me while I'm making the video. And the second thing I'm going to do is I always freeze this first row so that we have it sticky. Alright, next thing I'm going to do is I'm going to look for my test test product, which is right down here on the very bottom row. So this is the product that I edited. And the reason that I put those custom fields in here is so that I can tab all the way over here to the right and see how they came out in the CSV.The way in here, they're right here, right here, this man.

Here, they're right here. So they are under the product custom fields column. And you can see that this is how it came out. So flux equals yes, that's one custom field. And then there's a semi colon, and then there is material equals plastic, semi colon, and then material equals brass. So I did material twice, so that you can see that you can have, you know, multiple custom fields with the same name, I guess you could have the same name and the same value, but just kind of wanting to display that. And I put in multiple so that you can see the fact that you know, they don't get separate fields, they are all basically concatenated into one field using this using the semicolon as a delimiter. Right. So now if I wanted to add one more custom field, I could say, a knot, I could just put in another semicolon and put in the name of the field that I want to create and put in a value of whatever you know value could be Albatross, or whatever. And this is how you can edit them one at a time. And really put as many custom fields as you want in here. I'm sure there's a limit, I don't know what it is off the top of my head, but you could put a lot of custom fields in a put in like custom fields. And so this is this is pretty nice. Now, if you are watching this video, it's probably because you're getting ready to do a whole bunch of custom fields and you're gonna get pretty deep into this. So let me show you another trick.

So right here right now if this was the only change I needed to make, I could download this as a CSV uploaded to my store, and I would be good so Alright, hopefully it didn't tell funny. But if you're if you're going hot and heavy on these custom fields, you're probably going to want to bring in some data. And so I want to show you how to do something imagine we have a A field here called another albatross. And so let's say we have this over here in a different location.

So we have the current, current custom fields. And then we have new ones that we want to add, we want to add this one a couple of these, right. And so we have this column here that has some custom field values from our existing store. And then, you know, we've we've basically temporarily made another column here, that is going to have the new values that we want to add. Now if you want to just overwrite this, that's fine. But if you want to get a little bit fancier, let me show you a trick. I said in a previous video that you don't want to, you don't really want to like change your column names. And I'm not recommending that you change your column names.

However, if you have an extra column here at the end, without a column without a, you know a name on it, then it's just going to be set aside.

Bigcommerce is just going to skip this data. And what I want is I want to basically find a way to add this to that, and not screw up, you know, other spots. So what I'm going to do is I'm going to come here to this product, custom fields, and I'm going to insert a column to the left. And this is going to be my new custom fields column.

Alright, so buyer beware, we're crossing the streams here by creating a new column and moving these things around. But what I'm going to do is I'm actually going to take the title here, this column, and I'm going to delete it, and then paste it in to the new column.

So this is effectively the new product custom fields column. And you can see that there is just basically nothing in it. And what you can do is you can concatenate these. So you can put in a formula here that says concatenate this, comma, this.

And so that is going to add these two together. Now, if I expand this, so we can see what we've done. You can see that there's actually an error in here because it says flux equals yes. And my colon material, it goes plastics, semi colon material equals brass, another equals albatross. So we missed a semicolon in there, right? So we could say, let's add an extra one in here. And I put a semicolon in there. And so now that fixed it, right? Because, let's see, yeah, there's a semicolon right there.

But now if we copy this formula up, you can see that now we've made some messes here. And so you need to get a little bit you know, a little bit fancier here, and put some if statements in to say, like, you know, if this is, you know, or if, let's say, if the length of this is greater, oh my gosh, and Ma, Kimmo man, if the length of this is greater than zero, then we want to, should we do, we should say

let's actually make the other call. So if, if that is present, then show this, otherwise, just show this.

Let's see how that it's a

little bit better, right? Because we took out the semi colons here that are on these lines were where, where there wasn't anything here, right? So this is going to say, if, man, this takes a little bit of thought, so if the length of this is greater than zero, meaning that if there's something present there, then basically concatenate both of those with a this, but what we need to do is we need to actually say, okay, so if this is present, then we need to do another if statement to check the length of this. So we need to say if the if the length

of that

is greater than zero.

So if something is present there also, then show the concatenation including the including the semicolon, right If it's not greater than zero, then we're only going to show this error. So, there we go, big stitch. So if we have an, you know, like a label equals values. So let's say we have a custom field there, then you can see that it basically grabs that if it's present, it grabs that, if it's, if that's present in this isn't present. And then if both are present, then although this looks complicated, maybe it is complicated. It did take me a second to think about it. And I did do this live on the video. So forgive me, if I had to, I had to sit there and think about it for just a second.

But basically, what I've tried to do is try to take out any scenarios where we ended up having an extra semicolon, and I'm trying to make sure that we that we have the semicolon if we actually add them both together. So we have the joint one here, flex equals yes, and my colon material equals semicolon, material equals semicolon, and then another equals Albatross, so we got everything. So if you do that, fill it up through the whole document. And you can basically have your old labels, your new labels, and then you're concatenating them all into a final combined label to do the, to merge them basically.

Now, if if you were trying to remove some, you know, if you were trying to remove material equals brass, then you could easily come in here and just do a find, replace and remove it right, that's not a big deal. It's, it's adding them in and making sure that you have both of them when President or one or the other, depending on what's present. So I'm going to actually delete these because I don't want to put those in there on my real products. I'm going to leave this in here. And I'm going to leave these in here. Now remember, I didn't put anything here in the titles of these columns. So I've ended up with the new column that has the old label product space, custom space fields.

And it should have, you know, all of all of the, I guess I should just go ahead and fill this up, all the way up to the top. Just to make sure I mean, I don't see any other custom fields that I had. But technically, I would want to make sure that I didn't lose any just like that. Okay, so I just wanted to make sure that I showed you guys how to add this, how to be programmatic, how to do this in bulk, basically, because you can see that, you know, if I had the column and the new volumes that I had, they call them are the old volumes. Then using this quick formula, it's called a quote, quick formula.

You can combine them all, which you know, if you only have like 10 products, this is not a big deal, do it this way, if you have 10,000 products, then you know, I just saved you a week, right? All right. What I'm going to do next is file download the download as a CSV. And then we come back to my store, go to Import like to import that file, choose that it was exported using bulk export. And I'm going to click Next. Now, when you come in here, what's going to happen is when it comes down to the custom field, all the way Oh with no other words. Here it is match product custom fields with product custom fields. So you can see that even though we added a new column, it matched up that the name to the name, and this is why we moved that name to the new column.

It's also why we removed it from the other columns just to make sure there wouldn't be any confusion. So it automatically found that new column because it has the same header name, and it automatically connected it. So we don't even have to do anything. Right. hard part is behind us. We just click Next and start import.

If there's an error, it'll show here as you're accruing. And it'll give you a link at the end to view the errors. So there shouldn't be any errors in what I did set everything updated. So now I'm going to go back to that product and we're just going to see, we're going to see what we've done. So here it is.

I'm going to click down to custom fields. And look, there's my another albatross custom field added and again, if I had removed some of this for the find and replace it would have actually removed it to you so you could do both add or Remove with the CSV method. Alright, so that is how you edit, add or subtract whatever custom fields using the CSV in big commerce.

Give me a like if this helped you, be sure to join our community and join e commerce growth.com. And if you need a developer for your site, come check us out at Epic design labs and see if we're a good fit.

Appreciate you guys leave me a comment. Let me know what you guys are stuck on. And maybe that'll be my next video and I'll see you next time. Thanks