7 Replies Latest reply on Jun 14, 2018 9:05 AM by ALandl

    Update field from incoming email

    ALandl Apprentice

      Hi, we have a 3rd party that emails "ticket created" notifications into our HEAT system. These emails attach onto our record using "Incident# <incident number>" in the subject. What I would like is for the incoming email to update our "3rd Party reference" field. Is this possible? The documentation hints at using the format <fieldname>$<fieldvalue> in the email body to do this, but I cannot seem to get this to work.

        • 1. Re: Update field from incoming email
          cw30755 Apprentice

          I have been asked if there is a way we can have failed jobs open an incident via email and the hope was that many of the fields could be already filled out with the pertinent info.  I think we've probably been looking at the same documentation and I'm a little confused too.

           

          I think we have to setup a new Inbox to allow this, but I am not sure if it can use the same email address as the basic listener or if it requires another address.  Below is a screenshot of how I think some of the screen should be configured.  Hopefully someone can come in and help fill in the figurative blanks.

           

          NewInbox.jpg

           

          I would do some testing, but we just synched our environments to take an upgrade so I'll have to wait a few days to give this a whirl.

          • 2. Re: Update field from incoming email
            vee Apprentice

            Should be possible if you are using XSLT processing.

             

            We do this but with an Insert, update may be different but here are some snippets of what we've done:

             

            <xsl:when test="contains($FromAddr,'3rd_PARTY_ADDRESS') and contains($Subject,'SUBJECT_OF_EMAIL')"> (this and is optional)

            <xsl:call-template name="3rd_party_new"/>

            </xsl:when>

             

            Then in the 3rd_party_new.xsl file you can have something like this:

             

            <xsl:element name="Field">

            <xsl:attribute name="Name"><xsl:text>NAME_OF_FIELD</xsl:text></xsl:attribute>

            <xsl:text>VALUE_YOU_WANT_TO_SET_IT_TO</xsl:text>

            </xsl:element>

             

            Is this what you were after? Happy to send you some of our work if you like.

            • 3. Re: Update field from incoming email
              cw30755 Apprentice

              Not OP, but I'll take any assistance you might be willing to offer.  I'm specifically looking for a solution that will allow some of our already automated jobs to send an email with various fields already populated that would create an incident.  We don't want to do away with the Self Service Email option, the basic one that just uses the email subject and body to generate a Logged incident.

               

              I know I don't have any of the OOTB XSLT processors turned on, but I think I need to add a listener or add an Inbox before I can do that.  That's where I get really confused.  Can I use the same listener as we use for our SSU emails, or do I need another email for that?  I am providing some screenshots of my setup, and again, I appreciate any insight you might be willing to offer.

               

              Listener Config:

              Listener.png

               

              Data Import Connections (showing only XSLT, all OOTB):

              Data_Import.jpg

              • 4. Re: Update field from incoming email
                vee Apprentice

                So I've read somewhere here about people using more than one listener, but I have no experience with this. I do know however that you can't use the Self Service Email option AND XSLT at the same time (at least for the same listener), but you don't need to as you mimic what SSE did for you with XSTL but with a lot more flexibility. The downside of using XSLT is that it takes about 1-3 minutes to process an email sometimes. I really miss the instant processing of the OOTB method.

                 

                I had a quick look at using multiple listeners. I had to add the "New" button to ours as it wasn't there OOTB. If you need to do the same, the BO is "TenantEmailMailbox#".

                 

                I'm happy to share our XSLT work if you wanted to test if using a second listener will work for you.

                • 5. Re: Update field from incoming email
                  DTurner Specialist

                  Hi vee,

                   

                  Not OP, but if you wouldn't mind sharing your XSLT work, it would be greatly appreciated; coincidentally, I was actually testing a secondary listener early this week and XSLT is something I've wanted to look into but never played around with. If I had an example use case such as yours to look over, it would be great

                   

                  Many Thanks

                  Dec

                  • 6. Re: Update field from incoming email
                    ALandl Apprentice

                    OP here. Thanks for all the feedback guys. I have been experimenting on setting up the XSLT import, since I have never used it before. I think I am almost there with it. I will let you know when I have a solution to my problem.

                    • 7. Re: Update field from incoming email
                      ALandl Apprentice

                      So I am having trouble getting a working XSLT file to do what I want. Using the "Incident_Update" template in Email Listener XSLT to update all objects I have been able to attach the email to the Incident number specified in the email subject, and also update some of the incident's fields to predefined values in the xslt.

                      However, I need to be able to have those fields updated to values that I put into the email itself.

                      Anyone more experienced with xslt that can help?