(I'm cross-posting this to a couple of forums; apologies to those who get multiple copies...)
Tessiturians -
I am currently working with our DBA to investigate the possibility of creating an order confirmation email that can be used by our financial aid staff. Currently, we use an excel sheet (shudder) and a Word/Outlook mail merge (shudder again) to accomplish this. Ideally, it would be infinitely better if the staff person could just send a confirmation right from Tess instead.
The problem we are running into is including some custom data in these confirmations. Our DBA and I have only a small smidgen of experience with Web API stuff, but from reading the documentation we are unsure about bringing in some of the data elements we'd like to have on the confirmation. Specifically, the name of the Recipient for each line item, and the total financial aid disbursement (which is recorded on a custom screen on the constituent record).
Does anyone have experience with doing something like this?
Thanks!
Patrick SchleyAcademy Services ManagerFirst Stage
Hi Patrick,
Yes we have something like this in place. In our case, we wrote a stored procedure to return data that wasn’t already available and made a SOAP API call in the template to execute that local procedure.
Here is some sample code:
<%
Tessitura.WebAPI.Tessitura tess = new Tessitura.WebAPI.Tessitura();
string sessionkey = tess.GetNewSessionKey("");
ds = tess.ExecuteLocalProcedure(sessionkey, 116, "@ORDER_NO=" + OrderData.OrderNumber);
string ticketSubheader = ds.Tables[0].Rows[0]["ticket_subheader"].ToString();
XmlNode xm = OrderData.CartDocument.SelectSingleNode("//Order");
if (xm != null)
{
XmlElement xeTicketSubheader = OrderData.CartDocument.CreateElement("ticket_subheader");
xeTicketSubheader.InnerText = ticketSubheader;
xm.AppendChild(xeTicketSubheader);
}
%>
The above is a basic example where the procedure is just returning one thing, but we have other more complex examples and I know I’ve seen other posts on this as well. We’re basically just grabbing the data from the procedure and extending the XML so it is accessible in XSLT.
I think I originally learned how to do this from something Jon Ballinger posted. I hope this helps.
Thanks,
David
From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Patrick Schley Sent: Friday, August 28, 2015 12:57 PM To: David Frederick <DFrederick@scfta.org> Subject: [Tessitura Technical Forum] Using custom data in an email confirmation
Patrick Schley Academy Services Manager First Stage
This message was sent automatically to you by www.tessituranetwork.com because you subscribed to the Tessitura Technical Forum. You may reply to this message to post to the Technical forum or visit the site to search, read and post to the forums. In the interest of keeping the forum posts from becoming cluttered, we encourage you to delete previous message text from your reply before sending. Thank you!