Product slug not working in CRM 2013 Email templates - dynamics-crm

I have a business requirement that execs are really wanting to see. In our lead and email templates we have a few of our products listed. The products themselves are pretty stable but the prices are of course subject to change.
I'm OK with hard coding the product name into email but I was hoping the price could be a slug that get's resolved.
We only have one price list so nothing to worry about there.
I see no way to get access to the product and or price list entities through the data field values dialog.
So my thought was to create the 2-4 fields in the lead and opportunity entities. Then create a background workflow that takes the price from the price list and sets those fields.
Then when an email is generated I can access those hidden fields as they will be available through the lead or opportunity entity.
Any thoughts, concerns, better approaches?

Unfortunately CRM's email template system is not capable of what you describe out of the box. As you have discovered it will only permit you to insert placeholders from, or assocated with, the primary entity. It won't let you insert fields from other entities. What you suggest as a workaround is possible but it's not an ideal solution as you'll have these 2-4 redundant fields on each record type that contain duplicated data from the price list.
If you have any experience with creating custom workflow activities using the SDK then the best solution here is to create a custom activity that accepts either an draft Email or Email template as a input parameter, instantiates the email if required, loads the price list data, and performs your own custom placeholder replacements.
I've done this on a few projects in order to pass multiple entity records into the template, or to insert complex tables into emails by loading data from relationships. See the screenshots below for an example of how I've configured the email template and dialog process to pass both an 'Account' and 'User' record into the email template.

Related

Include Order information in MailChimp Campaign?

We already have our customer's Order Information in MailChimp. It shows on the "E-Commerce" tab of each Contact in the List.
Is it possible to send out a campaign in MailChimp that includes this information?
For example, the customer's most recent Order Number?
Unfortunately, they don't yet have pre-built tool capable of pulling customer/order attributes into a Campaign's content, and at least currently adding any data like this you'd like to dynamically populate in Campaign would require adding any data directly to the list fields and using their merge tags.
http://kb.mailchimp.com/merge-tags/getting-started-with-merge-tags
They do offer Product centric dynamic content options, if that'd be in any way helpful.
Use Product Recommendation Content Blocks: http://kb.mailchimp.com/campaigns/content-blocks/use-product-recommendation-content-blocks?utm_source=mc-kb&utm_medium=kb-site&utm_campaign=eepurl
Merge tags for products: http://kb.mailchimp.com/merge-tags/all-the-merge-tags-cheat-sheet#Merge-Tags-for-Product-Recommendations
You can optionally store merge fields associated with each list recipient:
http://developer.mailchimp.com/documentation/mailchimp/reference/lists/merge-fields/
You could create a custom merge field for "MOSTRECENTORDER" for each customer, and then reference it within templates using |MOSTRECENTORDER|

CRM 2011 lookup attribute mapping

Is it possible to set null/blank lookup values on relationships in CRM 2011 when they open from the parental/referrential entity?
Example, if you create a new 1:N relationship between the entities opportunity and account holding an agency value. When creating a new opportunity from an account, this account is prefilled in both the potential customer lookup field and the agency lookup field.
This can easily be remedied with a javscript, clearing the field onload, but can this be done earlier, in the attribute mapping, or is it always a post-fix to correct the default action?
I had the same issue in Crm 4. So I suppose it still exists in 2011.
You cannot remove the relationship mapping of the primary attribute, though I've never understood why this automatically maps to fields of different relationships.
In this case you are just best off using JavaScript to perform the following logic:
If the form is in create mode and both fields contain the same value then clear the duplicated field.
This logic should ensure that it only clears the fields in this circumstance.
This is not possible without Javascript.
MS CRM doesn't give you an option to counter the autofill of the mapped field. It will always be automatically filled in by the system.

Magento: how do I determine if a customer is new?

I want to be able to send different order confirmation emails to new customers than to established customers.
I am already able to put a block in the email template to insert my own 'if' constructs based on order details.
I can get the customer data from the order id, e.g. the customer id, but how can I determine if they are a new customer?
Even if it is getting the customer creation date and checking if it is less than five minutes, I need a technique to determine if they are new from within my template code based on the order information.
Either way your going to just have to do calculations on created_at field in the customer_entity table. If not your going to have to find some specific window to consider customers as "new".
Don't think I'd put said logic in the template file but rather a model and just pass it a block to flag it or not.

By using CRM 2011 online, I want to E-mail INVOICE automatically with Product Description(line items) in ,to My Customers

My Organization wants to Email (automatically means system itself generate the invoice mail) Invoices to their Customers 25th of every Month with the number of products(LINE ITEMS Means Invoice products) in The INVOICE. For Having Line items in the invoive form I've made some customization and add "grid" Which now shows the line items information means you get information that how many products this invoice actually is..
For this I've made an e-mail tempelete For the Entity invoice .But Problem is that the grids fields are not there in the the tempelete "Insert\delete" option .
I research alot and made all possible attempts To mail(AUTOMATICALLY) the invoice with all the line items in it
There is no way to easily accomplish what you wish to do. You can't create custom workflow activities in crm online so your only real option is to create some type of external program that does the work. Templates will only handle part of the problem and not the invoice line items at all.

Creating a Relationship Between Order Product (salesorderdetail) and Service Activity (serviceappointment)

We are using Microsoft CRM 4.0 to run a consulting business. Its working pretty well but we want to simplify the way we are doing some things. What we want to do is create an Order (salesorder) with multiple Order Products (salesorderdetal). So good so far.
Next I want to be able associate each Order Product (salesorderdetail) with a Service Activity (serviceappointment), this representing that this billable line item in the order is actually going to be fulfilled as a consuting engagement.
The problem is, I can't seem to be able to create an association between the Order Product (salesorderdetail) and Service Activiy (serviceappointment). It simply doesn't appear in the drop downlist.
Can anyone think of a reason for this? I've seen some posts about relating field mapping between Quote Product, Order Product, Opportunity Product and Invoice Product, but that isn't quite what I am after.
Any suggestions gratefully received - even if it is an explaination of why its not possible.
I created a simple 1:N mapping from Case to Invoice. The Case records its ID and Title in custom fields in the Invoice. Unfortunately this does not allow for product creation as children of the Invoice, so that should be created as a custom code workflow.

Resources