Hello,
I'm looking to migrate our old SOAP-based Tessitura emails to the new in-client REST template scheme. My first concern is the ability to call ExecuteLocalProcedure from within the template. Our current templates rely on it heavily to get order/customer data not available in the out-of-the-box data. When it was written in C# it was very easy to make the API call but I have no experience in this new scripting language. Support says its possible so I thought I'd ask here if anyone had successfully done it already.
Thanks in advance,
Sean
Hi Sean,
You can write C# in Razor templates, and the REST SDK is included in what's available to the template.
https://tessituranetwork.box.com/s/fyoak9xv3gm77hy3w81jd1qwbi97xzqh
Code sample in the file above that does some REST interaction, and includes some other assemblies in the SDK.
Be aware that the code in there runs on the API server, so performance could potentially be an issue if you are doing a lot of custom API interaction in a single template.
In Razor, any block enclosed in @{ ... } is a C# block.
Hope this gets things started for you!
Chris