cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Bookmark
|
Subscribe
|
479
Views
0
Helpful
1
Replies

Upload Multiple Variable Values Into a Document

jbach2003
Level 1
Level 1

Good morning:

 

Noob question here, but I've completed a post-call customer survey script, and I need to dump all of the answers (that are stored as various String variables) into a document and then email the document...I'd also like to attach a wav file to the email if possible. My problem is more of a syntax issue setting up the upload. Can someone give me an example of uploading multiple variables into a document and then emailing it?

1 Reply 1

Bill Mungaven
Level 1
Level 1

I'm in an ICM/UCCE/IPIVR environment. I don't know how it's done in a non-ICM/UCCE environment. It may be similar.

I've done something similar in an afterhours callout script I wrote. The way I handled the variable part is I concatenated the various variables into a single String variable using newline (\n) characters between lines for cleaner formatting. I used a send email step and used the emailBodyText String variable as the email body text. I also do something similar for error conditions in scripts. Example:

String variable emailBodyText=

"CallingNumber=" + callingNumber  +  "," + '\n' +
"CalledNumber=" + calledNumber  +  "," + '\n' +
"ArrivalType=" + arrivalType  +  "," + '\n' +
"LastRedirectedNumber=" + lastRedirectedNumber  +  "," + '\n' +
"OriginalCalledNumber=" + originalCalledNumber  +  "," + '\n' +
"OriginalDialedNumber=" + originalDialedNumber  +  "," + '\n' +
"DialedNumber=" + dialedNumber +  "." + '\n' + '\n' +
"PV values:" + '\n' +
"PV1 =" + PV1 + "," + '\n' +
"PV2 =" + PV2 + "," + '\n' +
"PV3 =" + PV3 + "," + '\n' +
"PV4 =" + PV4 + "," + '\n' +
"PV5 =" + PV5 + "," + '\n' +
"PV6 =" + PV6 + "," + '\n' +
"PV7 =" + PV7 + "," + '\n' +
"PV8 =" + PV8 + "," + '\n' +
"PV9 =" + PV9 + "," + '\n' +
"PV10 =" + PV10 + "," + '\n' +
"userQueue=" + userQueue + "," + '\n' +
"user.layout=" + userLayout

PV1 through PV10 are String types as is calledNumber, callingNumber, etc. which are read in using a Get Enterprise Call Info step. The calling number, called number, etc. is read in using a Get Call Contact Info step.

After setting the emailBodyText variable, I use a Create eMail step and use the emailBodyText in the body line:

To attach a wav file, I've done a Recording step then use the Attach To eMail step to attach the wav file along with the formatted text as I did above. If the wav file already exists on the server, I'm sure there's a way to attach it but I don't know how it's done.

I didn't use a document for any of this since I couldn't figure out how to attach the document to the email which is why I used formatted text instead.

I hope this was helpful.

Bill