Hi All,
I'm looking to create a new HTML Template for gift acknowledgments and have it mostly written up but I could use some help.
We would like to include the recognition name for the customer in the email but I cant find an @Model option that can be used for this.
We recently transferred from RE to Tess so currently out recognitions are housed in the attributes areas its specifically called Credit Listing/Luncheon. Does anyone have any idea how I might be able to pull this information automatically into an HTML Template? If there is anywhere else people might think that I can cross post this please let me know.
Please let me know if you need additional information.
Thanks,
Zach
Hi Zach,
You should be able to get it from the Attributes resource using the attribute keyword id from T_KEYWORD along with the constituent id.
Just the basic logic below, probably not how you'd want to organize it. But I tested and was able to get the value from that resource.
Replace keywordId with the id for your Credit Listing entry in the keyword table.
@{ var custNum = Model.OrderProductView.Constituent.Id; var attrURL = String.Format("CRM/Attributes?constituentId={0}", @custNum); var keywordId = 332; var attrs = Model.RestClient .AtUrl(attrURL) .WithContentType(ContentType.Json) .Get<List<Tessitura.Service.Client.CRM.Attribute>>() .ResponseObject; var creditListing = attrs .Where(x => x.Keyword.Id == keywordId) .Select(x => x.Value) .First(); } <p>@creditListing</p>
Best,
Ryan