> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shipy.ar/llms.txt
> Use this file to discover all available pages before exploring further.

# Importar números de seguimiento

> Importar números de seguimiento de Andreani Pymes en Shipy generando el Excel de envíos pagados con un marcador en el navegador.

export const ANDREANI_BM = `javascript:%22use%20strict%22%3B%28async%28%29%3D%3E%7Bconst%20l%3Ddocument.createElement%28%22div%22%29%3Bl.id%3D%22shipy-andre-overlay%22%2Cl.innerHTML%3D%27%3Cstyle%3E%23shipy-andre-overlay%7Bposition%3Afixed%3Binset%3A0%3Bz-index%3A999998%3Bbackground%3Argba%280%2C0%2C0%2C.5%29%3Bdisplay%3Aflex%3Balign-items%3Acenter%3Bjustify-content%3Acenter%3Bbackdrop-filter%3Ablur%282px%29%7D%23shipy-andre-modal%7Bbackground%3A%23fff%3Bborder-radius%3A12px%3Bpadding%3A32px%2048px%3Bbox-shadow%3A0%208px%2032px%20rgba%280%2C0%2C0%2C.3%29%3Btext-align%3Acenter%3Bfont-family%3Asystem-ui%2Csans-serif%3Bmin-width%3A320px%3Bmax-width%3A400px%3Bz-index%3A999999%7D.spin-wrap%7Bposition%3Arelative%3Bwidth%3A48px%3Bheight%3A48px%3Bmargin%3A0%20auto%2020px%3Bdisplay%3Aflex%3Balign-items%3Acenter%3Bjustify-content%3Acenter%7D.spinner%7Bwidth%3A48px%3Bheight%3A48px%3Bborder%3A4px%20solid%20%23e0e0e0%3Bborder-top-color%3A%23E53935%3Bborder-radius%3A50%25%3Banimation%3Asp%20.8s%20linear%20infinite%3Bposition%3Aabsolute%3Binset%3A0%7D.rocket%7Bposition%3Arelative%3Bfont-size%3A20px%3Bline-height%3A1%3Bz-index%3A1%7D%40keyframes%20sp%7Bto%7Btransform%3Arotate%28360deg%29%7D%7D.txt%7Bfont-size%3A16px%3Bcolor%3A%23333%3Bline-height%3A1.5%7D.icon%7Bwidth%3A50px%3Bheight%3A50px%3Bcolor%3A%23fff%3Bborder-radius%3A50%25%3Bfont-size%3A28px%3Bline-height%3A50px%3Bmargin%3A0%20auto%2016px%7D.title%7Bfont-size%3A20px%3Bfont-weight%3A600%3Bcolor%3A%23333%3Bmargin-bottom%3A8px%7D.detail%7Bfont-size%3A14px%3Bcolor%3A%23666%3Bmargin-bottom%3A4px%7D.hint%7Bfont-size%3A13px%3Bcolor%3A%23888%3Bmargin-bottom%3A20px%7D.btn%7Bbackground%3A%23E53935%3Bcolor%3A%23fff%3Bborder%3Anone%3Bpadding%3A10px%2032px%3Bborder-radius%3A6px%3Bfont-size%3A14px%3Bcursor%3Apointer%3Bfont-family%3Ainherit%3Btransition%3Abackground%20.15s%7D.btn%3Ahover%7Bbackground%3A%23C62828%7D%3C%2Fstyle%3E%3Cdiv%20id%3D%22shipy-andre-modal%22%3E%3Cdiv%20class%3D%22spin-wrap%22%3E%3Cdiv%20class%3D%22spinner%22%3E%3C%2Fdiv%3E%3Cdiv%20class%3D%22rocket%22%3E%5Cu%7B1F680%7D%3C%2Fdiv%3E%3C%2Fdiv%3E%3Cdiv%20class%3D%22txt%22%3EGenerando%20Excel%20con%20n%5CxFAmeros%20de%20tracking...%3C%2Fdiv%3E%3C%2Fdiv%3E%27%2Cdocument.body.appendChild%28l%29%3Bconst%20v%3Dl.querySelector%28%22%23shipy-andre-modal%22%29%2Ca%3D%28e%2Co%2Ct%2Cr%2Cn%29%3D%3E%7Bv.innerHTML%3D%60%3Cdiv%20class%3D%22icon%22%20style%3D%22background%3A%24%7Be%7D%22%3E%24%7Bo%7D%3C%2Fdiv%3E%3Cdiv%20class%3D%22title%22%3E%24%7Bt%7D%3C%2Fdiv%3E%3Cdiv%20class%3D%22detail%22%3E%24%7Br%7D%3C%2Fdiv%3E%24%7Bn%3F%60%3Cdiv%20class%3D%22hint%22%3E%24%7Bn%7D%3C%2Fdiv%3E%60%3A%22%22%7D%3Cbutton%20class%3D%22btn%22%3ECerrar%3C%2Fbutton%3E%60%2Cv.querySelector%28%22.btn%22%29.onclick%3D%28%29%3D%3El.remove%28%29%7D%3Bif%28%21location.hostname.includes%28%22pymes.andreani.com%22%29%29%7Ba%28%22%23f44336%22%2C%22%5Cu2715%22%2C%22Dominio%20incorrecto%22%2C%22Este%20script%20solo%20funciona%20desde%20pymes.andreani.com%22%2C%27Abr%5CxED%20%3Ca%20href%3D%22https%3A%2F%2Fpymes.andreani.com%2Fver-envios%3Ftab%3Dpagado%22%20target%3D%22_blank%22%20style%3D%22color%3A%23E53935%22%3EAndreani%20Pymes%3C%2Fa%3E%20y%20ejecutalo%20desde%20ah%5CxED%27%29%3Breturn%7Dlet%20y%3Dnull%2Cm%3Dnull%3Btry%7By%3DlocalStorage.getItem%28%22idToken%22%29%7C%7ClocalStorage.getItem%28%22token%22%29%7C%7Cnull%3Bconst%20e%3DlocalStorage.getItem%28%22persist%3Aauth%22%29%3Bif%28e%29%7Bconst%20o%3DJSON.parse%28e%29%3Bo.pymes%26%26%28m%3DJSON.parse%28o.pymes%29.usuario%3F.usuarioId%29%7D%7Dcatch%7B%7Dif%28%21y%7C%7C%21m%29%7Ba%28%22%23f44336%22%2C%22%5Cu2715%22%2C%22No%20logueado%22%2C%22No%20se%20encontr%5CxF3%20token%20o%20userId.%22%2C%27Inici%5CxE1%20sesi%5CxF3n%20en%20%3Ca%20href%3D%22https%3A%2F%2Fpymes.andreani.com%2Fver-envios%3Ftab%3Dpagado%22%20target%3D%22_blank%22%20style%3D%22color%3A%23E53935%22%3EAndreani%20Pymes%3C%2Fa%3E%20y%20volv%5CxE9%20a%20ejecutarlo%27%29%3Breturn%7Dconst%20u%3DString.fromCharCode%2830%29%2Cx%3D14%3Blet%20f%3D%5B%5D%3Btry%7Bf%3Dawait%20new%20Promise%28%28e%2Co%29%3D%3E%7Bconst%20t%3Dnew%20WebSocket%28%60wss%3A%2F%2Ftracking-api.andreani.com%2FhubSendStates%3Faccess_token%3D%24%7BencodeURIComponent%28y%29%7D%60%29%3Blet%20r%3D%5B%5D%2Cn%3D0%2Ch%3D%211%3Bt.onopen%3D%28%29%3D%3E%7Bt.send%28JSON.stringify%28%7Bprotocol%3A%22json%22%2Cversion%3A1%7D%29%2Bu%29%7D%2Ct.onmessage%3Dc%3D%3E%7Bfor%28const%20s%20of%20c.data.split%28u%29.filter%28Boolean%29%29%7Blet%20i%3Btry%7Bi%3DJSON.parse%28s%29%7Dcatch%7Bcontinue%7Dif%28%21h%29%7Bif%28i.error%29%7Bo%28new%20Error%28i.error%29%29%2Ct.close%28%29%3Breturn%7Dh%3D%210%3Bconst%20d%3Dnew%20Date%2CE%3Dnew%20Date%28d.getTime%28%29-x%2A864e5%29%2CI%3Dnew%20Date%28d.getTime%28%29%2B864e5%29%3BE.setHours%280%2C0%2C0%2C0%29%2CI.setHours%280%2C0%2C0%2C0%29%2Ct.send%28JSON.stringify%28%7Btype%3A1%2CinvocationId%3A%220%22%2Ctarget%3A%22TrackingSubscribeState%22%2Carguments%3A%5B%7BuserId%3Am%2Cfrom%3AE.toISOString%28%29%2Cto%3AI.toISOString%28%29%2CsenderEmail%3A%22%22%2CnumberAndreani%3A%22%22%2CpaymentNumber%3A%22%22%2Cservices%3A%5B%5D%2Cstates%3A%5B%5D%7D%5D%7D%29%2Bu%29%3Bcontinue%7Dif%28i.type%3D%3D%3D6%29%7Bt.send%28JSON.stringify%28%7Btype%3A6%7D%29%2Bu%29%3Bcontinue%7Dif%28i.type%3D%3D%3D1%26%26i.target%3D%3D%3D%22sendTracking%22%29%7Bconst%20d%3Di.arguments%3F.%5B0%5D%3Bd%3F.resultsList%26%26%28n%3Dd.totalElements%7C%7C0%2Cr.push%28...d.resultsList%29%29%7Dif%28i.type%3D%3D%3D3%26%26i.error%29%7Bo%28new%20Error%28i.error%29%29%2Ct.close%28%29%3Breturn%7D%7D%7D%2Ct.onerror%3D%28%29%3D%3Eo%28new%20Error%28%22WebSocket%20error%22%29%29%3Bconst%20g%3DsetInterval%28%28%29%3D%3E%7Br.length%3E0%26%26r.length%3E%3Dn%26%26%28clearInterval%28g%29%2Ct.close%28%29%2Ce%28r%29%29%7D%2C1e3%29%3BsetTimeout%28%28%29%3D%3E%7BclearInterval%28g%29%2Ct.close%28%29%2Cr.length%3E0%3Fe%28r%29%3Ao%28new%20Error%28%22Timeout%3A%20no%20se%20recibieron%20datos%20en%2030s%22%29%29%7D%2C3e4%29%7D%29%7Dcatch%28e%29%7Ba%28%22%23f44336%22%2C%22%5Cu2715%22%2C%22Error%20de%20conexi%5CxF3n%22%2Ce.message%29%3Breturn%7Dif%28%21f.length%29%7Ba%28%22%23f44336%22%2C%22%5Cu2715%22%2C%22Sin%20env%5CxEDos%22%2C%22No%20se%20encontraron%20env%5CxEDos%20en%20los%20%5CxFAltimos%20%22%2Bx%2B%22%20d%5CxEDas%22%2C%22Verific%5CxE1%20que%20tengas%20env%5CxEDos%20pagados%20en%20ese%20per%5CxEDodo%22%29%3Breturn%7Dlet%20p%3Dnull%3Btry%7Bif%28p%3DlocalStorage.getItem%28%22pymes%3Atoken%22%29%2C%21p%29%7Bconst%20e%3DlocalStorage.getItem%28%22persist%3Aauth%22%29%3Bif%28e%29%7Bconst%20o%3DJSON.parse%28e%29%3Bo.pymes%26%26%28p%3DJSON.parse%28o.pymes%29.token%3F.token%7C%7Cnull%29%7D%7D%7Dcatch%7B%7Dconst%20S%3Dnew%20Map%3Bif%28p%29try%7Bconst%20e%3D%22https%3A%2F%2Fpymes-api.andreani.com%2Fapi%2Fv1%22%2Co%3D%7BAuthorization%3A%22Bearer%20%22%2Bp%2CAccept%3A%22application%2Fjson%22%7D%2Ct%3Dawait%20fetch%28%60%24%7Be%7D%2FPedido%2FGetPedidosInternosEnProceso%2F%24%7Bm%7D%2F0%2F100%60%2C%7Bheaders%3Ao%7D%29.then%28n%3D%3En.ok%3Fn.json%28%29%3A%5B%5D%29%2Cr%3D3%3Bfor%28let%20n%3D0%3Bn%3Ct.length%3Bn%2B%3Dr%29%7Bconst%20h%3Dt.slice%28n%2Cn%2Br%29%2Cg%3Dawait%20Promise.all%28h.map%28c%3D%3Efetch%28%60%24%7Be%7D%2FEnvios%2F%24%7Bc.pedidoId%7D%60%2C%7Bheaders%3Ao%7D%29.then%28s%3D%3Es.ok%3Fs.json%28%29%3A%7Benvios%3A%5B%5D%7D%29.catch%28%28%29%3D%3E%28%7Benvios%3A%5B%5D%7D%29%29%29%29%3Bfor%28const%20c%20of%20g%29if%28c.envios%29for%28const%20s%20of%20c.envios%29%7Bconst%20i%3D%28%28s.nombreDestinatario%7C%7C%22%22%29%2B%22%20%22%2B%28s.apellidoDestinatario%7C%7C%22%22%29%29.trim%28%29.toLowerCase%28%29%3Bi%26%26S.set%28i%2Cs.totalConDescuento%7C%7Cs.totalConIva%7C%7C%22%22%29%7D%7D%7Dcatch%7B%7Dif%28typeof%20XLSX%3E%22u%22%29%7Btry%7Bawait%20new%20Promise%28%28e%2Co%29%3D%3E%7Bconst%20t%3Ddocument.createElement%28%22script%22%29%3Bt.src%3D%22https%3A%2F%2Fcdn.sheetjs.com%2Fxlsx-latest%2Fpackage%2Fdist%2Fxlsx.full.min.js%22%2Ct.onload%3De%2Ct.onerror%3Do%2Cdocument.head.appendChild%28t%29%7D%29%7Dcatch%7B%7Dif%28typeof%20XLSX%3E%22u%22%29%7Ba%28%22%23f44336%22%2C%22%5Cu2715%22%2C%22Error%22%2C%22No%20se%20pudo%20cargar%20la%20librer%5CxEDa%20XLSX.%20Verific%5CxE1%20tu%20conexi%5CxF3n%20a%20internet.%22%29%3Breturn%7D%7Dconst%20b%3D%5B%5B%22Fecha%22%2C%22N%5CxB0%20Operaci%5CxF3n%22%2C%22N%5CxB0%20de%20env%5CxEDo%22%2C%22Servicio%22%2C%22Destinatario%22%2C%22Direcci%5CxF3n%22%2C%22Localidad%22%2C%22Estado%22%2C%22Precio%22%5D%5D%3Bfor%28const%20e%20of%20f%29%7Bconst%20o%3D%28e.nombre%7C%7C%22%22%29.trim%28%29.toLowerCase%28%29%2Ct%3DS.get%28o%29%7C%7C%22%22%3Bb.push%28%5Be.fecha%7C%7C%22%22%2Ce.numeroDeOperacion%7C%7C%22%22%2Ce.numeroDeSeguimiento%7C%7C%22%22%2Ce.servicio%7C%7C%22%22%2Ce.nombre%7C%7C%22%22%2Ce.direccion%7C%7C%22%22%2Ce.localidad%7C%7C%22%22%2Ce.estadoEnvio%7C%7C%22%22%2Ct%3FNumber%28t%29%3A%22%22%5D%29%7Dconst%20k%3DXLSX.utils.book_new%28%29%2CN%3DXLSX.utils.aoa_to_sheet%28b%29%3BXLSX.utils.book_append_sheet%28k%2CN%2C%22EnviosPagados%22%29%3Bconst%20_%3D%5B%22ene%22%2C%22feb%22%2C%22mar%22%2C%22abr%22%2C%22may%22%2C%22jun%22%2C%22jul%22%2C%22ago%22%2C%22sep%22%2C%22oct%22%2C%22nov%22%2C%22dic%22%5D%2Cw%3Dnew%20Date%2CD%3D%60Import_Trackings_Andreani_Shipy_%24%7Bw.getDate%28%29%7D%24%7B_%5Bw.getMonth%28%29%5D%7D.xlsx%60%3BXLSX.writeFile%28k%2CD%29%3Bconst%20L%3Db.slice%281%29.filter%28e%3D%3Ee%5B8%5D%21%3D%3D%22%22%29.length%3Ba%28%22%234CAF50%22%2C%22%5Cu2713%22%2C%22Listo%22%2C%60Excel%20descargado%20con%20%24%7Bf.length%7D%20env%5CxEDos%20de%20Andreani%20%28%24%7BL%7D%20con%20precio%29%60%2C%22Ahora%20importalo%20en%20Shipy%20con%20Import%20Trackings%22%29%7D%29%28%29%3B`;

<Frame>
  <iframe className="w-full aspect-video" src="https://www.youtube.com/embed/bJylNMsbYyI" title="Importar tracking masivo con EnviosPagados.xlsx" allowFullScreen />
</Frame>

***

<Steps>
  <Step title="Arrastrar el marcador a la barra de marcadores">
    Arrastrá el botón a tu **barra de marcadores del navegador** para guardarlo.

    <div dangerouslySetInnerHTML={{ __html: `<a href="${ANDREANI_BM}" draggable="true" style="display:inline-block;padding:8px 16px;background:#c1142b;color:#ffffff;border:1px solid #B10D14;border-radius:8px;text-decoration:none;font-weight:600;font-size:14px;cursor:grab;user-select:none;box-shadow:0 1px 3px rgba(0,0,0,0.15);">🚀🔴</a>` }} />
  </Step>

  <Step title="Generar el Excel y subirlo a Shipy">
    Desde **pymes.andreani.com**, hacé click en el marcador para generar el Excel. Después, en Shipy apretá **Importar tracking** y subí el Excel. Si hay algún error de mapeo, corregilo manualmente escribiendo nombre o dirección parcial del cliente.
  </Step>
</Steps>

También se puede importar el tracking de forma individual desde cada fila de la tabla de pedidos, apretando **Agregar tracking** y pegando el número de seguimiento.

## Errores y avisos frecuentes

### "No hay pedidos en estado MASIVADO para importar trackings"

El import solo asigna trackings a pedidos en la pestaña **Descargados**. Si comprás los envíos en Andreani sin antes haber generado el Excel desde Shipy, no hay pedidos a los que asignar. Primero [generá el Excel](/masiva-andreani/generar-excel) y después importá los trackings.

### Cartel amarillo "Andreani a veces falla y descarga un Excel incompleto"

Aparece cuando más de la mitad de tus pedidos descargados quedaron sin tracking después del import. Suele ser porque el Excel que descargaste de Andreani vino incompleto:

1. Abrí el Excel y verificá que estén todos los pedidos que compraste.
2. Si faltan, abrí Andreani Pymes en una ventana de incógnito y volvé a descargarlo, o esperá un rato y reintentá.

### Badge "Omitidos (ya tenían)"

Un número de tracking que ya está asignado a **cualquier** pedido de tu tienda (incluso despachado o entregado) no se vuelve a asignar nunca. Los pedidos del Excel cuyo tracking ya existía en otro pedido quedan omitidos. Si creés que el tracking está asignado al pedido equivocado, corregilo a mano con **Agregar tracking** en cada pedido.

## Editar o borrar un tracking: qué pasa en Shopify

* **Borrar** el tracking de un pedido cancela su preparación (fulfillment) en Shopify.
* **Editar** el tracking actualiza la preparación existente y, según la configuración de **Notificar al cliente** del transporte, puede mandarle un nuevo email al cliente.
* **Agregar** un tracking crea la preparación en Shopify, salvo que en [Configuración → Masiva](/masiva-andreani/configuracion) el momento de preparación sea **Al despachar**.
