% % test steps for person name and email analysis % % stack: empty test-case1 [ . . . test-casen ] { isnull ? % % stack: cust-text % % analyze customer text message % first adjust common usage of name and email indicators % "," " " replall ":" " " replall Str.NormSpc trim onlylf " email " lf &"email " replall " name " lf &"name " replall catlf &"|" catlf 0 -1 1 splitsln % % stack: [ [|]token . . . ] count % empty !Cust.First empty !Cust.Middle empty !Cust.Last empty !Cust.Pronoun empty !Cust.Gender empty !Cust.Email empty !Cust.Addr empty !Cust.Guid % % first, determine if any of the words is a keyword % at the beginning of the line % % stack: [ [|]token . . . ] count % { pos( { dup index -1 left lower "anly" log)( < |name % % a gender prefix may still be part of name token series % dup + -1 roll pop - pos( { *splitnam } if |email % % parse the next word as the email address % dup + -1 roll pop - pos( { *spliteml } if > { false } { % % not in the list of labels % this is a message for shooter % % stack: [ [|]token . . . ] count % true } ifelse } { % % no significant message % % stack: % true } ifelse ? } loop popoff } loop % % create the parameter string for adding/updating % user based on phone number % "clienx" &"&subject=" &_Cust.Phone &"&first=" empty _Cust.Pronoun any? { & &" " } if _Cust.First any? { & % % have first and last % _Cust.Middle any? { &" " & } if dup !Cust.Xfirst asc2hex & &"&last=" _Cust.Last dup !Cust.Xlast asc2hex & } { % % no first, check for middle having solo name/nickname % _Cust.Middle any? { } { % % there is not any name present, may have to stub first name % "Customer" } ifelse dup !Cust.Xfirst asc2hex & % % making a placeholder last name % &"&last=" *finsures asc2hex & } ifelse &"&email=" _Cust.Email any? { } { *finsures &"@none.com" } ifelse dup !Cust.Xemail asc2hex & dup logs /* % % create this user on the public portal % _Arching.OutIP "localhost" eq$ "localout" log)( { % % this is the outward server, use this server to get info % "Local" } { % % the public server is not this server % "Public" } ifelse *webportn *tellresx any? { % % a user guid was returned % "clienx" log)( !Cust.Guid } if */