How to extend a chain for a cargo bike? I have a KMC x10e chain which is 162 links long on my Xtracycle electric cargo bike.  The chain is worn and I am trying to replace it.  From what I can tell it is available only in 136 links. Is the way to get to 162 to buy two and combine them?  Or is it possible to buy a custom chain at exactly the length needed or buy a long one and reduce it to 162?
Your local bike shop might (see comments on the might) buy chain in bulk and can cut it off at precisely the length you need. Get a quick link at the same time so you can easily put the chain on or remove it. 

They may have limited selection, though, especially as you’re looking at a speciality chain- a 10 speed chain designed for ebike torques. So they may not have this as a bulk item. Bike shops that specialize in cargo bikes and recumbents are your best bet. 

Otherwise, you’ll have to break and conjoin two shorter chains. Be sure to get the same brand and model chain as slight differences in chain width or profile can cause shifting issues. You’ll need a 10-speed compatible chain tool to break one of the chains to length. There’s generally no problem using the quick links to put the chains back together again as long as they’re the links provided in the box. 

But back to the speciality chain issue. Many of us think there’s a great deal of “marketing” and much less “engineering” around ebike parts. Given that a top sprinter can easily put out 1500 watts, a high quality 10-speed chain should be able to handle many mid-drive motors which are 750-1000 Watts. My main caution would be to make sure your motor controller has a shift sensor so it de-torques during derailleur shifts as shifting under max epower can snap even the strongest chain.