====== AIRS-4104 Harmonize E-mail Templates ====== [[https://tasks.supplyon.de/browse/AIRS-4104|AIRS-4104 Harmonize E-mail Templates]] Branch: ''story/AIRS-4102'' The mails are sent with ''MailNotificationWeb''. ===== Templates ===== ==== 1. EDI - EDI Scheduler Error Notification ==== Template: ''EDIErrorNotificationTemplate-body_EN.vt'' Java: * ''com.seeburger.airsupply.edi.messagemonitor.util.EDIErrorNotification'' * ''createAndSendEmails()'' Test scenarios: * EDI integration -> select one (e.g. ''SBI/Self Billing'') and press "Execute now" * Important: to send an email some variables should be changed: * In ''SASMessageManagerEJB.updateMessageStatus()'' * set ''model.status'' to 2 (''IMessageStatus.STATUS_ERROR'') * set ''notificationFlag'' to ''true'' * ''SO-StatusNotification'' import (I have no test data for it) ==== 2. PO - PO Spares Notification ==== Template: ''PoNewSpareTypeOrderNotify-body_EN.vt'' Testscenario (on “Brettener” database): * there is a Job for it, but normally (if understand it right) these mails will be sent during import, I have no such POs to import, so my suggestion to Dominik was to test it from a Unit test and later, when all other templates are ready, and if time permits, to test it properly from import. Dominik says "OK". * Burkhard said me that an import of PO of subtype SPARES should initiate such notifications. And it really works: simply import ''D:\development\testdata\zMisc\AIRS-4104_HarmonizeEmailTemplates\2_Mock-up for PO - PO Spares Notification\po_single_SL.xml'' TODO: * **-** Implement * **+** EN Body * **+** EN Footer * **-** Other languages * **-** DE * **-** ES * **-** FR * **-** IT * **-** Test * **+** As HTML * **-** As E-Mail ==== 3. Alert Email Notification for standard / no CSV ==== Template: ''AlertMailNotifyTemplate-body_EN.vt'' Testscenario (on "Brettener" database): Alert Notification mails are generated by job '' com.seeburger.airsupply.alertmon.job.EmailNotificationJob''. Goto smartiadmin -> Custom Jobs -> Overview -> filter for class name ''*mail*'' For Mail with CSV attachments use the entry with Description ''VMI_EMAILNOTIFY/SMA0000NN11D/9004''.\\ For Mail with no alerts use the entry with Description ''VMI_EMAILNOTIFY/SMA0000N0NBP/6989''.\\ ==== 3. Alert Email Notification for CSV ==== Template: ''AlertMailNotifyTemplate-CSV-body_DE.vt'' TODO: * **-** Implement * **+** EN Body * **-** EN Footer * **-** Other languages * **-** DE * **-** ES * **-** FR * **-** IT * **-** Test * **x** As HTML * **+** As E-Mail ==== 4. POEMA - FIRSTOSP (Case 1: First user invitation) ==== Templates: * ''PoOspFirstOsp-body.vt'' * PoOspFirstOsp-body-chinese.vt * PoOspFirstOsp-body-english.vt * PoOspFirstOsp-body-french.vt * PoOspFirstOsp-body-german.vt * PoOspFirstOsp-body-italian.vt * PoOspFirstOsp-body-japanese.vt * PoOspFirstOsp-body-korean.vt * PoOspFirstOsp-body-portuguese.vt * PoOspFirstOsp-body-slovakian.vt * PoOspFirstOsp-body-spanish.vt Testscenario: * Start SoapUI * Start 2 services in it * BusinessDirectory * Air_Sopi_MockService * Important: "createBOAccessTokensSCD" should deliver the response containing ''false'' for your user * Import an OSP === Fragen an Dominik === * Der chinesische Text der Vorlage in der Zeile, die mit "[customer CG name] / [customer LE name]" anfängt, stimmt nicht ganz. Da sind 2 Hieroglyphen mehr als in dem ursprünglichen Template. War das eine bewusste Änderung? Soll ich das bei mir auch ändern? ==== 4. POEMA - NEWOSP (Case 2: New PO published) ==== Template: ''PoOspNewPoNotify-body_EN.vt'' Testscenario: * Start SoapUI * Start 2 services in it * BusinessDirectory * Air_Sopi_MockService * Important: "createBOAccessTokensSCD" should deliver the response containing ''true'' for your user * Import an OSP ==== 4. POEMA - MAJOR (Case 3: Update on important fields) ==== Template: ''PoOspMajorFieldsChangeNotify-body_EN.vt'' Testszenarios: * **-** Change on field * **+** one field * **+** many fields (2) * **+** Line added * **+** one line * **+** many lines (2) * **-** Line cancellation requested * **-** Line cancellation revoked * **-** Line cancellation request revoked * **-** Line status changed to PARTIALLY RECEIVED * **-** Line status changed to RECEIVED === Fragen an Dominik === * Some wordings were changed, but the old wordings are better (more exact). Example: "for this line a cancellation has been requested; please reply using the action button" (was: "for this line a cancellation has been requested; please reply by using the button "Accept" or "Reject"") * Einfaches "Canceln" einer Line hab ich nicht hinbekommen, da es immer mit einer Statusänderung zusammen kommt (was eigentlich logisch ist). Obwohl ich nur ein Feld geändert habe: DeletionFlagScheduleLineLevel -> true. * Manche Szenarios hab ich nicht durchgetestet (die letzten 3) ==== 4. POEMA - MINOR (Case 4: PO update on less important fields) ==== Template: ''PoOspMinorFieldsChangeNotify-body_EN.vt'' Minor fields: * ConfigurationVersion * ? Tested: * **+** One field changed * **+** Many fields changed (2) ==== 4. POEMA - MIXED (Case 5: PO update with mixed changes) ==== Template: ''PoOspMixedFieldsChangeNotify-body_EN.vt'' * Mixed = Minor + Major === Fragen an Dominik === * Some wordings were changed, and actually some buttons are no more there. But the old wordings are better (more exact). So I've used the old wordings. Is it ok? ==== 4. POEMA - NEWUSER (Case 6: PO update with change of e-mail addressee only) ==== Template: ''PoOspNewEmailNotify-body_EN.vt'' (?) Testszenario: * Start SoapUI * Start 2 services in it * BusinessDirectory * Air_Sopi_MockService * Import a new PO * Import an PO update with only one field changed: ''FlexField5'' on header level. It should contain a (known for Air_Sopi_Mockservice?) email address. ==== 4. POEMA - ACCEPTED (Case 7: Customer accepted a supplier change) ==== Template: ''PoOspAcceptedNotify-body_EN.vt'' Testszenario: * Start SoapUI * Start 2 services in it * BusinessDirectory * Air_Sopi_MockService * Import a new PO * Login as unregistered supplier (normally TST_SE_HY_ALL) -> it is needed to manipulate ''SASUserContext.isUnregSupplier()'' (or do it properly, but at the moment I don't know how) * Change some values. E.g. Promised Quantity * Login as buyer (normally first buyer user TST_BY_AFR_ADMRW). It is also needed to manipulate ''SASUserContext.isUnregSupplier()'' back. * Click on button ''Actions / Accept'' ==== 4. POEMA - REJECTED (Case 8: Customer rejected a supplier change) ==== Template: ''PoOspRejectedNotify-body_EN.vt'' Testszenario: * Start SoapUI * Start 2 services in it * BusinessDirectory * Air_Sopi_MockService * Import a new PO * Login as unregistered supplier (normally TST_SE_HY_ALL) -> it is needed to manipulate ''SASUserContext.isUnregSupplier()'' (or do it properly, but at the moment I don't know how) * Change some values, E.g. Promised Quantity, and click on "Modify". * Login as buyer (normally first buyer user TST_BY_AFR_ADMRW). It is also needed to manipulate ''SASUserContext.isUnregSupplier()'' back. * Click on button ''Actions / Reject'' ==== 4. POEMA - ABOUTUSER (E-Mail notifications to supplier in case of new addressee) ==== Template: ''PoOspNewEmailAboutNotify-body_EN.vt'' Testszenario: * Start SoapUI * Start 2 services in it * BusinessDirectory * Air_Sopi_MockService * Import a new PO * Import an update for this PO where FlexField5 on header level contains a "new" email address. Whether email address is new or not is decided in ''POImportOSPHandler.hasAbsolutelyFreshTokens()''. Maybe it is possible to manipulate the method, but I've decided to manipulate the table TPORTALACL (in the database "Ora SOPI"). Important is that the table contains only ONE entry for given SMAID (column ''cSMAID''). So: - use email ''air-po-03@seeburger.de'' in the XML to import - remove all rows except one from TPORTALACL * e.g.: ''delete from TPORTALACL WHERE CSMAID='SMA0000N0N2R' and cPortalaclid=1414'' ==== 4. POEMA - INACTIVE (E-Mail notification to customer in case of addressed supplier user is deactivated) ==== Template: ''PoOspEmailDeactivatedNotify-body_EN.vt'' Testszenario: * Start SoapUI * Start 2 services in it * BusinessDirectory * Air_Sopi_MockService * Import a new PO with an email in FlexField5 on header level where the expiration date of the corresponding entry in the table TPORTALACL (in database "Ora SOPI") is lesser than ''System.currentTimeMillis()'' ==== 4. POEMA - INVALID (E-Mail notification to customer in case of invalid e-mail address(es)) ==== Template: ''PoOspEmailInvalidNotify-body_EN.vt'' Testszenario: * Start SoapUI * Start 2 services in it * BusinessDirectory * Air_Sopi_MockService * Import a new PO with an email in FlexField5 on header level where the syntax is wrong (e.g. ''@domain.com'' instead of ''user@domain.com'') ==== 4. POEMA - New / Modified ==== Template: ''...body_EN.vt'' ==== 5. Forecast Deployment ==== Template: ''FCPublishErrorMail-body_EN.vt'' Implementing ist not necessary, because this email is internal (Dominik Maier on 26.05.2020). ===== Footers ===== * 3_Footer Mock-up for EDI Error_new.HTML * No such link in the old template * Can be implemented, but how? * "You can unsubscribe ... in your alert(!) preferences" * Really "alert preferences"? * 2_Footer Mock-up for PO Spares Notification_new.HTML * No link in the new template => no problems * 3_Footer Mock-up for Alert E-Mail Notification_new.HTML * Should work, because we had this link in the old template * 4_Footer Mock-up for POEMA_new.HTML * Link to customer support => no problems ===== Misc ===== ==== Simulate SMTP Server Locally ==== To simulate smtp server use **smtp4dev**: - start it * simply open TypeAndRun ([Windows] + A) and type ''smtp4dev'' * OR call directly ''D:\development\tools\smtp4dev\Rnwood.Smtp4dev.exe'' - http://localhost:5000/