*** NOTE: ALL INFORMATION IS ACCURATE AT DATE OF PUBLISHING ***
One of the things that surprises me about Dynamics 365/CRM when it comes to Orders is there isn’t a fully automated process for populating the Billing & Shipping details. While the billing address is mapped when creating a Quote or an Order directly from an Account or a Contact, the shipping address isn’t. Most likely you will always present your customer with an invoice, but if you are shipping out goods, then you need to have those details on the order too! So lets see how to automatically populate shipping & billing addresses for an order.
There is a challenge in the sense that an order can be created via many paths, and unless you are very strict in pushing users down just one avenue, they could get there in the following ways:
- Directly from an Account
- Directly from a Contact
- By turning a Quote in to an Order
- Directly as a new record (from Quick Create or the main Order area)
It’s also a challenge because of the way addresses work in CRM. You have Address 1, Address 2, and then the ability to add in additional addresses using a subgrid. This won’t be right for every situation, but I typically suggest using Address 1 to populate the Billing Address (which is what is mapped out of the box), and Address 2 for a Shipping Address, only if it’s different to the Billing Address. This let’s you map them accordingly.
Directly from an Account
The first thing is to look at the Account entity 1:N relationships, specifically for the Order and the Quote.
Once you open the relationship, head to the Mappings section. You will see that the following are mapped (based on the topic of this article), but nothing related to the ship to address. Use the New button to add relationships for all of the ship to related fields from the street 2 fields on the Account. Do the same for the order and the quote.
- Potential Customer
- Bill To – Street 1, Street 2, Street 3, City, State/Province, Country/Region, ZIP/Postal Code
Now when you add a Quote or an Order right from an Account, your addresses will be populated. Keep in mind that you won’t actually see them until the record is created, unless you click in to the composite. The fields are populated, but not displayed until the record is saved.
What if the Billing & Shipping are the same? No point in adding it in the Address 1 AND in the Address 2 fields. This can be taken care of with a workflow, which will look at shortly.
Directly from a Contact
By default, the Order (and Quote) have the Potential Customer field. This can be populated with an Account or a Contact. This might work for you and be fine. Maybe you only ever want an Account in there. What if you want to indicate the Account AND the Contact who placed the Order? Add a new Lookup field to a Contact. You may also want/need to use the standard Bill To and Ship To Contact Name fields. They just aren’t displayed as standard but could be used on packaging labels or invoices, so you could add them on to if needed.
Now go to the Contact entity and the 1:N relationships and look at the mappings for Quotes and Orders. The following are mapped as standard. Map the Street 2 fields to the Shipping fields. You can also map the Contact in to the Bill To and Ship To Contact Name fields.
- Potential Customer
- Contact (if you added it as a new field)
- Bill To – Street 1, Street 2, Street 3, City, State/Province, Country/Region, ZIP/Postal Code
If the Contact doesn’t have the address fields populate, you can use a workflow to populate them from the Account, but more on that later.
By turning a Quote in to an Order
If you are using Quotes and turning them in to an order once won, the following fields are all mapped accordingly.
- Quote Mapping – Order
- Potential Customer
- Contact (if you added it as a new field)
- Bill To – Contact Name, Street 1, Street 2, Street 3, City, State/Province, Country/Region, ZIP/Postal Code
- Ship To – Contact Name, Street 1, Street 2, Street 3, City, State/Province, Country/Region, ZIP/Postal Code
That’s great, but you still don’t want to have to manually type in the addresses on the quote right? So how do we populate those? We can use a real time workflow. It needs to run when the record is created, then check to see if Address 2 has data. If it does, update the Ship To fields from the Address 2 fields on the Quote from the Potential Customer (Account) record, and update the Bill To fields from the Address 1 fields. If Address 2 doesn’t contain data, update the Ship To AND the Bill To fields from the Address 1 fields on the Potential Customer (Account) record.
Then check to see if the Contact field on the Quote (if you added one) contains data, and if it does add it to the Bill To and the Ship To Contact fields. Now when you turn the Quote in to an Order, all of those fields will populate based on the mapping you set up. You may also want to check if the Contact has data in the addresses, and could use the record fields change option and run the workflow if the Account or Contact fields are changed.
Directly as a new record
If a user adds an order as a new record (not from an Account or a Contact), you can use a workflow similar to the one above that will run on create, and also run if the Account field changes.
This should give you an automated way of the address fields being updated when creating an order. Of course, if the shipping address needs to be different on specific orders, the user can always edit it manually.
Check out the latest post:
Auto Assign Leads Without Code Using Lead Scoring & Work Assignment
This is just 1 of 477 articles. You can browse through all of them by going to the main blog page, or navigate through different categories to find more content you are interested in. You can also subscribe and get new blog posts emailed to you directly.
Thank you for all your input! I am a big fan :).
With regards to the solution above, what if we have a couple of items on the quote or order which need to be shipped to a different location that does not belong to the customer account. We have this type of situation a lot – where parts are shipped to a different location that is not an address of the Customer Account.
Hi Emilia, I haven’t looked in to populating addresses for individual parts. Not sure how you could do that if the locations are not already in D365 CE linked to the Customer Account. Might not be possible.