Getting a "Variable Non-existent WTOTSTR" error from both TENOR and EDICOM EDI partners when trying to get a Sales Delivery out

SOLVED

Getting a "Variable Non-existent WTOTSTR" error from both TENOR and EDICOM EDI partners when trying to get a Sales Delivery out. (EDI module, Sage X3 v12.0.16) Already tried resaving all EDI elements used by both EDI partners, running EDI cache sync, and revalidating classes&representations that I found used by both EDI partners.

Log:

#<AdxVL>@(#)%I% Batch query log EDIBAT
=1000 08-27-19 11:30:37 (Application server time) Query Activation (51000)

+-Identification-------------------------------------------------------------------------------------------------+
!Process number : 18 Description : EDI TENOR DELIVERY Execution date : 2019-08-27T16:25:08Z !
+-Parameters-----------------------------------------------------------------------------------------------------+
!EDI partner : TENOR !
!Category code : SDELIVERY Category type : Sales delivery Action : Send !
!Flow ID : SDHTENOR Version : 1 All flows : No !
!Duplicate : No Test : Yes !
+-Filters--------------------------------------------------------------------------------------------------------+
!Recurrence date!Field!Description!Operator!Mandatory!Start!End! !
!----!----------------!----------------!----------------!----------!----------------!----------------! !
!Yes !DLVDAT!Delivery date!Value range !Optional !!! !
! !BPCORD!Sold-to!Value range !Optional !!! !
! !SDHNUM!Delivery no.!Value range !Optional !PLT07PL000142!PLT07PL000142! !
+----------------------------------------------------------------------------------------------------------------+

<0001 @PILOT.TRT/EDISTRISS_CSTD$adx (1676) Error 6 : Variable Non-existent WTOTSTR
<0001 at @X3.TRT/FIN_BATCH$adx
<0001 at @PILOT.TRT/EDISTRISS_CSTD$adx
<0001 at @X3.TRT/ASYRSUB$adx
<0001 at @PILOT.TRT/WMC0EDISTRISS$adx
<0001 at @PILOT.STC/C_EDISTRISS$adx
<0001 at @PILOT.TRT/EDISTRISS_CSTD$adx
<0001 at @X3.TRT/ASYRSUB$adx
<0001 at @PILOT.TRT/WMC0EDISTRISS$adx
<0001 at @PILOT.STC/C_EDISTRISS$adx
<0001 at @PILOT.TRT/EDISTRISS_CSTD$adx
<0001 at @X3.TRT/ASYRSUB$adx
<0001 at @PILOT.TRT/WMC0EDISTRISS$adx
<0001 at @PILOT.STC/C_EDISTRISS$adx
<0001 at @PILOT.TRT/EDISTRISS_CSTD$adx
<0001 at @X3.TRT/ASYRSUB$adx
<0001 at @PILOT.TRT/WMC0EDISTRISS$adx
<0001 at @PILOT.STC/C_EDISTRISS$adx
<0001 at @X3.TRT/EDIRUN_CSTD$adx
<0001 at @X3.TRT/ASYRSUB$adx
<0001 at @PILOT.TRT/WMC0EDIRUN$adx
<0001 at @PILOT.STC/C_EDIRUN$adx
<0001 at @X3.TRT/EDIBATSTD$adx
<0001 at @X3.TRT/GTRAITE$adx
<0001 at @X3.TRT/REQUETES$adx
<0001 at @X3.TRT/ASYRSRVBATCH$adx
<0001 at @X3.TRT/ASYRMAIN$adx
<0001 at @PILOT.STC/OBJECT$adx
>3006 08-27-19 11:30:40 (Application server time) Query terminated with error (Error 6 : Variable Non-existent WTOTSTR) (13006)

Does anyone know what I'm missing? Thanks.