PureConnect

 View Only
Discussion Thread View
  • 1.  create email recipient variable

    Posted 11-06-2019 14:34
    I feel like a handler newb asking this question.

    I am trying to look at the lerToRecipient variable of an incoming email interaction and search it for a specific email address.  I was going to use the Find tool to do this but it needs the email address in the Value field to be a Email Recipient variable type.  I can't for the life of me figure out how to create this variable.

    I do not see a string to er conversion for example.

    How do I create an email recipient variable?
    #Handlers

    ------------------------------
    ..Rich
    ------------------------------


  • 2.  RE: create email recipient variable

    Posted 11-07-2019 09:26
    Rich,

    There is a toolstep in the email tools called Get Recipient Info that takes an email recipient object and parses it to strings containing the friendly name and email address.  What you will likely need to do is iterate through your list of er objects running them through this tool and then comparing the output instead.

    Where you are likely getting stuck is trying to use an assignment step to pull the value out of your list.  It appears that you need to use the list tools (Get At) to be able to create the appropriate variable type.  Hope this helps.

    ------------------------------
    Aaron Lael
    State of Utah
    ------------------------------



  • 3.  RE: create email recipient variable

    Posted 11-07-2019 09:43
    Rich,

    I have never worked with a list of email recipients but it looks like your options are really restricted.  I was able to use the find tool step to do a find for an email recipient data type in the list of email recipients but I can't seem to figure out how to get the email recipient value into the email recipient variable. There is a tool step called get recipient info which outputs a string containing the email address.

    This is pretty clunky but you should be able to create a loop using the get at tool step and get recipient info tool step to compare each recipient in the list against the email address you are looking for. 

    There is probably a cleaner/easier way to do this. You may want to debug/open up the attendant email handlers and poke around a bit to see what you can find.

    Thanks,

    ------------------------------
    Mark Tatera
    ConvergeOne

    Opinions are my own and not the views of my employer. Any suggestions or programming changes I suggest come with no warranty and should be tried at your own risk. If my comment helped you or solved your problem please consider marking my comment as best answer.
    ------------------------------



  • 4.  RE: create email recipient variable

    Posted 11-07-2019 09:54
    That is where I am stuck.  If I use the Find tool on a string, I can use a variable or a hard coded string.  But if I use the list of email recipients, the value I am looking for can only be a variable.  So I need to get the variable set with what I want to search for before that step.  But I can't figure out how to do that.

    The Get Recipient Info tool step needs an Email recipient variable for Input but the email recipients are in a List of Email Recipients created by the Open Message by Cookie step.

    I guess I need to GetCount of the lerToRecipients variable, then loop through using GetAt that many times and do the compare.  Clunky but it may be the only way.

    GetAt seems the only way to assign a value to an Email Recipient variable.

    Thanks for the ideas

    ------------------------------
    Rich Hawley
    American Customer Care, Inc
    ------------------------------



  • 5.  RE: create email recipient variable

    Posted 11-07-2019 10:04
    Edited by Aaron Lael 11-07-2019 10:05
    There are some other ugly things that require looping that don't seem like they really should (a few sorting methods).  What I do in these instances is create a separate subroutine to take the input and pass out what I'm looking for to keep my handlers tidy and allow easy reuse.

    If you don't want to do the traditional get count method of looping, you could also just get at 0 every pass and use remove head immediately after then confirm that your list isn't empty after checking the address.  This tends to have less steps overall as long as you don't need your list again, which you wouldn't in a stand alone subroutine

    ------------------------------
    Aaron Lael
    State of Utah
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources