Skip to main content
Solved

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


Forum|alt.badge.img+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.

Best answer by NigelIM

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

 

View original
Did this topic help you find an answer to your question?

2 replies

NigelIM
Do Gooder (Employee)
Forum|alt.badge.img+4
  • Do Gooder (Employee)
  • 6 replies
  • Answer
  • June 19, 2023

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

 


Forum|alt.badge.img+7
  • Author
  • Sidekick (Customer)
  • 15 replies
  • June 20, 2023

Nigel, as always you have helped me crack it.

Many thanks for your help!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings