Solved

Extracting data from Email Body to Import into Custom Field via assystETM

  • 19 June 2023
  • 2 replies
  • 49 views

Userlevel 2
Badge +7

Can anyone please give me some guidance. 

Basically what I am trying to is process an email via assystETM to log a ticket against a specific service offering, this service offering will have custom fields which I want to populate with data from the body of the email.

So for example I want to take the string after the text Name: from the email body to populate a single string value custom field in my Service Offering form, the field name shortcode is FULLNAME.

In my data mapper in assystETM I have added the below

 

The ticket is successfully logging against the correct custom form and service offering, however when I am trying to populate the custom field whatever I am trying is not working and field remains blank.

 

Has anyone done something similar? If so can you please tell me what I am doing wrong and offer a bit of guidance.

icon

Best answer by NigelIM 19 June 2023, 16:56

View original

2 replies

Badge +4

Hi Chris,

Thanks for registering your question in the IFS Community.

Have you tried debugging your data mapper to see what, if any data is returned in your variable(s).

This would be my first point to check, as it sounds very much like your variable varFullName isn’t returning any data.

You could try this:

var re = /Name:[^a-zA-Z0-9]*(.+)/;

var matches = re.exec(inbound["text/plain"]);

if(matches){ var ref = matches[1];

ref;

}

 

So, have  variable for each label.

You also mention that this is an email that you are processing, I’m not sure about where you are getting inbound[“FULLNAME”] from in your output to your Custom Field mapping in the Custom, FULLNAME mapping.

Let me know how you get on.

Best Regards

Nigel

 

Userlevel 2
Badge +7

Nigel, as always you have helped me crack it.

Many thanks for your help!

Reply