We need to extract the source filename as a field and later parse it in order to retrieve the customer code.
For example, the initial file name could look like this invoice-049001_3.pdf.
049001_3 is a customer code that doesn't exist on an image. We need to retrieve it in order to pass it later as a metadata value.
It is possible to get a source filename and write a value to a field in the Custom activity, i.e.:
Context.Transaction.Documents.GetField("New Field").Value = Context.Transaction.Documents.SourceFiles.FileName;