Email Confirmation/Acknowledgement Questions

I am just starting to look into the wonderful world of email acknowledgments from the Tessitura Client, and am looking for advice, examples, whatever.

I need to be able to put information about the performances (lineitem rows) and specific tickets (sub_lineitem rows)  in addition to the order information in the confirmation. I see that these fields are not included in the dataset that is documented in Appendix D of the API documentation. However, I have heard rumors of addition available fields (the cartdocument dataset?). While using undocumented things is generaly a bad idea, I'd be interesting in hearing people's thoughts on this.

Would anyone be willing to share examples of their Client based ack email .asmx file? I don't need anything fancy, just order, performances and seats.

Thanks!

Parents
  • Hi David,  I have done this before.   I can post my template a little later in the day.  Basically what you do is call the ExecuteLocalProcedure web api method.  Then I take the dataset and update and add xml nodes to the OrderdataXML.  Once this is done it can be used in the transform. 

     

    Regards,

    Jon

Reply
  • Hi David,  I have done this before.   I can post my template a little later in the day.  Basically what you do is call the ExecuteLocalProcedure web api method.  Then I take the dataset and update and add xml nodes to the OrderdataXML.  Once this is done it can be used in the transform. 

     

    Regards,

    Jon

Children
  • Hi David,

    Attached is our template and the xsl.  Please let me know if you have any issues opening the attachment. 

    The part that pulls in addional information from tessitura  looks like:

     Tessitura.WebAPI.Tessitura tess = new Tessitura.WebAPI.Tessitura();
        string sessionkey = tess.GetNewSessionKey("");
        string lsal = "";
       
      
        DataSet ds = tess.ExecuteLocalProcedure(sessionkey, 1, "@ORDER_NO=" + OrderData.OrderNumber);

        for (int i = 0; i < ds.Tables[0].Rows.Count; ++i)
        {
            string superPkgNo = ds.Tables[0].Rows[i]["super_pkg_no"].ToString();
            string superPkgDesc = ds.Tables[0].Rows[i]["description"].ToString();
            string totPurAmt = ds.Tables[0].Rows[i]["tot_pur_amt"].ToString();
            string totRetAmt = ds.Tables[0].Rows[i]["tot_ret_amt"].ToString();
            string numPur = ds.Tables[0].Rows[i]["num_seats_pur"].ToString();
            string numRet = ds.Tables[0].Rows[i]["num_seats_ret"].ToString();
            string li_seq_no = ds.Tables[0].Rows[i]["li_seq_no"].ToString();

            XmlNode xm = OrderData.CartDocument.SelectSingleNode("//LineItem[li_seq_no=" + li_seq_no + "]");

            if (xm != null)
            {

                XmlElement xePkgNo = OrderData.CartDocument.CreateElement("super_pkg_no");
                xePkgNo.InnerText = superPkgNo;

                XmlElement xePkgDesc = OrderData.CartDocument.CreateElement("super_pkg_desc");
                xePkgDesc.InnerText = superPkgDesc;

                XmlElement xeTotPurAmt = OrderData.CartDocument.CreateElement("tot_pur_amt");
                xeTotPurAmt.InnerText = totPurAmt;

                XmlElement xeTotRetAmt = OrderData.CartDocument.CreateElement("tot_ret_amt");
                xeTotRetAmt.InnerText = totRetAmt;

                XmlElement xeNumPur = OrderData.CartDocument.CreateElement("num_seats_pur");
                xeNumPur.InnerText = numPur;
               
                XmlElement xeNumRet = OrderData.CartDocument.CreateElement("num_seats_ret");
                xeNumRet.InnerText = numRet;
               
                xm.AppendChild(xePkgDesc);
                xm.AppendChild(xePkgNo);
                xm.AppendChild(xeTotPurAmt);
                xm.AppendChild(xeTotRetAmt);
                xm.AppendChild(xeNumRet);
                xm.AppendChild(xeNumPur);

            }

     

    This makes a wepapi  execute local procedure call , which pulls back extra information on the line item.  It then loops through the data set, search the order data xml for the matching node.  When it finds it , the additional is appended to the xml.  This is all done before calling the transform, so that it will be there when doing the xsl transform.

    If you have any questions please let me know.

     

    Jon 

    Ticket_Subs_html.zip