Parser Extract Patterns - Extract relevant information available in a text / html field to populate dedicated metadata fields

Hello,

I want to know if someone knows a plugin which offer the possibility to define Patterns that should be use to extract data and feed dedicated fields.

For instance, when a case is created from an inbound email, check some keywords or patterns to extract the customer id, licence number, price etc.

Or maybe someone of you develop this (including the settings interface to create the patterns) ?

Fred

Parents
  • I have a logic hook, after relationship add and one after save, on the Emails module, to parse email related to cases.

    I put the one-time case updates in the after-save: This triggers the first time the Email/Case is created. It checks the parent_type and if it's "Cases"  and sets some defaults including our custom department_c which which is based on the Primary Team assigned to the inbound email definition (what I like to call the "case queue"); it parses (regex) the email to find License Numbers and other relevant keywords and sets drop-downs/text fields on the Case. Checking that department_c is null is what makes sure that this hook doesn't call itself ad-infinitum once department is set that's it, I don't touch it again.

    The after relationship create handles updates triggered by communications on existing Cases: things like notifying entire teams that there is new correspondence on a case that is tagged as an Enterprise customer.

    This has worked well, untouched Fingers crossed since v6. I am sure there are improvements I could make after 14 years, but I'm not in a hurry to add reviewing this to my to-do-list. Laughing

    Francesca

  • Hi   and thanks for your answer,

    I was more looking about a custom module where an end user (admin or with advanced skill) can define several parser that should apply to a specific field of a specific records and automatically populate the corresponding fields.

    Fred

  • I do have a Quote Language module that I my CSA team can access which maps certain field values to a Quote.

    It populates defaults in fields in a way that is similar to a formula field, based on a dropdown:
    The user selects a dropdown, the create.js controller triggers an on change event which queries the Quote Language module which returns and sets a number of default fields including some textarea language. The user is then able to edit those defaults.

    I have something similar controlled by custom button-type fields on our Custom Contracts module where standard contract modification language can be added at the click of a button by using a Contract Language module that our Legal department can maintain and edit. The concept is similar to the Quote Language, in that the selection by the user triggers a query in a "language" module which adds the standard language to the Contracts Modifications which the user can then edit to add specific information in lieu of placeholders that are in the text.

    In both cases the User can then override the selections and edit them.

    You could, for example, have a custom "defaults mapping" module where someone defines a regex and then a mapping of fields.  The module would also have a column for each case field that has a default of some kind, using the same dropdowns as you use in Cases if they are enum or multienum fields that you are setting by default.

    When you get an email a logic hook retrieves your  Active"Default Mappings", for each record it iterates through the regex field and tries to find matches in the emails_text.description/emails_text.description_html field. If the regex matches then it applies the defaults specified in each column of the corresponding "defaults mapping" table row ignoring empty columns.

    You may want to have some sort of processing order in the "Default Mappings" , by adding a sequence integer or a number in front of the Name, so you can put them in order of importance and hopefully prevent future hits from overriding the previous ones...

    Silly example my "Default Meppings" could be something like:

    name process_index regex product_of_interest_custom priority active
    Enterprise Enquiry 20 /mathematica enterprise /gmi Mathematica Enterprise P3 1
    Mathematica Enquiry 30 /mathematica /gmi Mathematica P3 1
    Bug reporting 10 /bug /gmi   P1 1
    out of office 5 /away /gmi     0

    Design needs some more thought and it needs to be tailored to your needs but it could be some food for thought :)

    FrancescaS

Reply
  • I do have a Quote Language module that I my CSA team can access which maps certain field values to a Quote.

    It populates defaults in fields in a way that is similar to a formula field, based on a dropdown:
    The user selects a dropdown, the create.js controller triggers an on change event which queries the Quote Language module which returns and sets a number of default fields including some textarea language. The user is then able to edit those defaults.

    I have something similar controlled by custom button-type fields on our Custom Contracts module where standard contract modification language can be added at the click of a button by using a Contract Language module that our Legal department can maintain and edit. The concept is similar to the Quote Language, in that the selection by the user triggers a query in a "language" module which adds the standard language to the Contracts Modifications which the user can then edit to add specific information in lieu of placeholders that are in the text.

    In both cases the User can then override the selections and edit them.

    You could, for example, have a custom "defaults mapping" module where someone defines a regex and then a mapping of fields.  The module would also have a column for each case field that has a default of some kind, using the same dropdowns as you use in Cases if they are enum or multienum fields that you are setting by default.

    When you get an email a logic hook retrieves your  Active"Default Mappings", for each record it iterates through the regex field and tries to find matches in the emails_text.description/emails_text.description_html field. If the regex matches then it applies the defaults specified in each column of the corresponding "defaults mapping" table row ignoring empty columns.

    You may want to have some sort of processing order in the "Default Mappings" , by adding a sequence integer or a number in front of the Name, so you can put them in order of importance and hopefully prevent future hits from overriding the previous ones...

    Silly example my "Default Meppings" could be something like:

    name process_index regex product_of_interest_custom priority active
    Enterprise Enquiry 20 /mathematica enterprise /gmi Mathematica Enterprise P3 1
    Mathematica Enquiry 30 /mathematica /gmi Mathematica P3 1
    Bug reporting 10 /bug /gmi   P1 1
    out of office 5 /away /gmi     0

    Design needs some more thought and it needs to be tailored to your needs but it could be some food for thought :)

    FrancescaS

Children
No Data