Mechanism to support SAP ERMS form value parsing
Need Webform to output submissions in a format compatible with SAP ERMS built in parsing utility.
Proposed resolution
SAP ERMS parses form values from emails with an attached .xml file in the following format.
Sample SAP .xml attachement.
<?xml version="1.0" encoding="UTF-8"?>
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<VERSION>1.0</VERSION>
<SENDER>emailaddress</SENDER>
<WEBFORM_ID>ContactUsForm</WEBFORM_ID>
<SOURCE>
<NAME>Lastname</NAME>
<VALUE>Lastname Value</VALUE>
</o2PARAVALU>
<o2PARAVALU>
<NAME>Firstname</NAME>
<VALUE>Firstname value</VALUE>
</o2PARAVALU>
<o2PARAVALU>
<NAME>Emailaddress</NAME>
<VALUE>Emailaddress value</VALUE>
</o2PARAVALU>
</SOURCE>
</asx:values>
</asx:abap>
User interface changes
At form level, need to optionally enable/disable this feature. Not all forms will be required to be parsed by SAP.
Ability to manually download .xml under form submission listings.
It would be preferential this feature is applied as an Add-on to Webform and not a modification or workaround.
Please let me know if there are additional details I need to provide or I haven't been clear.
Thanks!
Comments
Comment #2
jrockowitz commentedI have a really simple solution to this problem which is to dynamically generate a static file which is 'uploaded' to a managed file element.
So the File element already supports email attachments, file downloads, and access controls. We could extend the 'File' upload element and create an 'Attachment' element which dynamically generates a static file attachment every time the submission is saved. The 'Attachment' would immediately available for emails and fully integrated into the webform workflow. The 'Attachment' element's static file would even have a dedicated 'File' entity.
A few notes about the Attachment element…
Does this solution make sense?
Comment #3
ksavoie commentedExtends the WebformManagedFileBase. (Not 100% sure about this)
Never rendered on a form
>> my use case shouldn't require this
Configuration would include #file_extension and #file_content.
Only generated when form is submitted or submission saved.
>> makes sense
The static file will be a temporary file (4 hrs) if the submission is not saved to the database.
Might be able to immediate delete temporary file
>> In my use case due to customer security/sensitivity all forms configured to submit to SAP will be set to not save submissions locally thus by extension the client will insist no file containing form data be stored longer than necessary for processing. Offering file storage as a toggle-able option if local storage enabled sounds like a good option.
I pose the question if the contents of the File entity is basically just a formatting of submitted data, then wouldn't a better option be to offer on-demand/programmatic exporting/generation of form data to the format of choice? A generator capable of supporting multiple formats (possibly Add-on framework for extensibility of other formats)?
Just up for discussion.
Attachments must be written to the server
>> see above storage requirement
Attachment element should be a part of the Webform core
>> sounds reasonable
Attachment element could be used to generate printable receipts and confirmations
Attachment element could be extended to generate PDF files
>> see above comments
Static file generation might be able to work like computed twig and/or computed token element.
>> a twig formatting mechanism might be very helpful to some users. Users could craft their own .xml formats. Support for per form export twig could be nice.
My use case is limited in scope and doesn't require some of the extended capability discussed here. It's in your hands to determine how you want to extended your project to support my specifications. I need the solution to be as easy as possible to maintain which is why I'm asking that it be an add-on if possible if functionality is not part of core Webform.
As part of your quote, please include expected time to complete.
Let me know if you need further information.
Thanks Jacob
Comment #4
jrockowitz commented@ksavoie I completely agree that the attachment could be dynamically generated and I pretty sure it does not have to be written to the server's file system.
Keep in mind that
…will only work if the results are stored in the database.
Comment #5
ksavoie commentedKeep in mind that
Ability to manually download .xml under form submission listings.
…will only work if the results are stored in the database.
>> Yes, this makes sense. I was just throwing around feature opportunities.
Do you have enough to get me some numbers and time frame?
Comment #6
jrockowitz commented@ksavoie Yes, I will update this ticket with a full project scope and plan in the next day or so.
Comment #7
jrockowitz commentedHere is the implementation ticket. I am going to mark this as a duplicate.
#3013498: Allow custom files to be attached to emails and downloaded
Comment #8
ksavoie commented@jrockowitz, just wanted you give you an update that pricing is in clients hands. Will let you know if they approve.