Auto Sequence Customer ID

I´m new into BPM´s, thank you anyway! I´m gonna check with my Epicor contacts to see if they can help my with the BPM´s! Thanks.

Hi Gabriel,

The idea behind IDs as separate from customer number is to make them more intuitive for users. For example Epicor can be EPI01. So all customer/suppliers with first three letter EPI will start with EPI. This way users can just start with typing the first three letters and then use Epicor predictive search to narrow down to the actual customer. If a customer name changes you can change the ID to correspond to the new name. This is a very useful feature for users. Even this part can be automated using BPMs or custom codes. There are a lot of references to that on this forum.

Vinay Kamboj

1 Like

You can actually set up the predictive search to search on the customer name, but return the ID, which has been very helpful for my users.

Yes Brandon, that could also be done. But what we found out was many names are not what we call them. For example many of them start with “The” and nobody remembers that. Like Home Depot actual name was The Home Depot but everyone called them Home Depot. This becomes even more problematic for customer with names in other languages, but we all know and call them by popularly known names.

But yes what you suggested could work for many users.

Thanks

Vinay Kamboj

2 Likes

It would be great if the search would be “Contains” instead of “Starts With” or at least offer an option to choose… so that writing “Home” would list “The Home Depot” as well as “Adhomer Products”…

3 Likes

@Gabriel011212

Here’s a quick video tutorial of how to do this as well as the “code” needed. This works for Customer but can be done for pretty much any module in Epicor. Note that this is done in Post Processing on Customer.GetNew() because in pre-processing we don’t yet have a Customer row.


The video may take a few minutes to render in HD (you-tubes fault) It is a simple one line widget
image

new Ice.Lib.NextValue(Db).GetNextSequence("CustIDSeq").ToString("00000")
7 Likes

@josecgomez Awesome, thanks a lot! One more final question, I already have some customers with their #´s, instead of “00000” can I start them with “CL13001”?

Are we able to Auto Sequence from a defined starting point?

Say I already have a sequence of CustID with the latest ID at 10005. I want to continue from that point using the code you’ve provided to 10006, 10007, 10008, etc…

Billy, you can use the NextValue.SetSequenceCurrentValue method to set up your starting point.

@timshuwy covers it in detail here:

Well, pickles, similar design on Erp.Customer.GetNewShipTo using ShipToNum does not seem to work. It just leaves this “(nw)” in the field.

Is this is a very peculiar solution to the OP as one should probably assume from the OP that there are existing customers and having a method to increment from the already existing (hopefully consistent) sequence would be more ideal?

I’m curious about the actual business purpose of consistently sequenced customer or supplier IDs. “It’s what we’ve always done” is one but that was usually driven to control who added the record. We can now control that through record logging and security settings.

If one uses Multi-Company, the customer and supplier IDs MUST equal the company IDs for buying and selling companies. Others may make employees (for expense reimbursements) equal to their employee IDs.

I understand the convenience of getting “the next number” but not the concern about a missed number in the sequence. I’m a little ADHD myself but that’s a personal issue with me. Is this additional work providing real business value? :man_shrugging:

1 Like

I surely won’t disagree with questioning the why, and surmising that “it’s just always been done that way”. In a prior life, that company had all customers just following that system’s (SyteLine) default of being numerically sequenced, and then one day someone there had the idea to start them with “C” because they were customers, again numerically sequenced by the system. Don’t know that they ever really thought any more about it than that. Of course, in a single-site or single-company config, no worries.

Here, I don’t have the history of Epicor behind me because I only started in June, but it appears that the users had a sequence established in Job Scope, and migrated them to Epicor 2 years ago. If I understand correctly, the users would “search” the Customers to find the highest number and manually assign the next one, so the customization that went in, was to eliminate that step for them. However, initially they’ve had a multi-company config, with multi-site inside each company - that is changing - but for whichever reason, again I don’t know that anyone ever really thought any more about it than that. Perhaps they did, and the simplest thing just works for now.

At this point, I’m not even sure I have a good handle on how Epicor has designed around these ID’s. Your points seem very valid, I’d like to research that further.

At any rate, it seems when you create a new customer, and a new Ship To in my example, you’ve got to do something with those ID and Number fields. Having the system control what goes there in some way that supports whatever the business process is, seems logical? What ID would a user input if they were doing it manually? Or what am I missing here?

You nail the real business case here. We don’t want the user to look up the next value. that’s super valid. I know some companies that use a smartish ID: First three characters of company name and then a three digit number for next. That was easy to search to see the next sequence available.

Not sure about SyteLine or Job Scope, but in Epicor you can change the Supplier ID or Customer ID at any time. There’s an internal number that is the key which makes this possible. Want to go back and add that C? Go ahead. Change your mind? Set it back to the original value. It’s not like other fields in Epicor that once you use them and they have related records, you’re hosed.

One caution though. Just because Epicor lets you change it, that doesn’t mean that interfacing systems may know a newer ID. :thinking:

2 Likes

Epicor has always supported the USER deciding what the customer / supplier ID is, and not forcing the value to be sequential. This can be for a multitude of reasons…

  1. ID: AZPanel is easy to remember for Arizona Panel Company. Having the ID be something that people can remember (rather than C19278) is more intuitive
  2. the ID can change. If Arizona Panel company changes their name to Phoenix Panel, you can change the ID to PHPanel if you desire.
  3. OR you can make your own sequential rules as discussed in this post.

I typically suggest that most companies and users can come up with some meaningful code. But in very large companies, I do understand how automatic assignment is better. Your choice.
Note that this discussion also bleeds into Suppliers, Project IDs, and even Part Numbers (Yes… I have had customers request automatic part numbering systems).

Agree with Mark on this… BUT that is typically because a programmer/consultant did NOT use the correct logic when creating a customization, report, or dashboard. Whenever referring to a customer, the internals of a customization should ALWAYS use the CustNUM field and not the CUSTID field. Customer NUMBER is an internal hidden field used to link all things about that customer. CustID is simply an index to get to the customer. In Sales orders and Invoices, the Customer ID is not saved. only the customer NUMBER.
I have seen people make customizations where they put the customer ID into a UD field, and joined it to the order/invoice… this basically disables the ability to change Customer ID’s in the future.

1 Like

Hello,

I am using this for ship to numbering and ran into something I didn’t care for.

When you create new Ship To, it gives me the next value from the table.

What I would like it to do is restart the numbering if the customer doesn’t have the Ship To numbering for it.

EX: Customer A has 2 Ship To’s created Auto-Numbered 00001 and 00002.
For Customer B, when I create a new Ship To, it tries to number 00003. Is it possible to have customer B start back at 00001?

Hope that makes sense.

Thanks,

Shawn

You’ll have to create an individual counter by Customer… (which is kind of gross) you can do this easily by just appending the CustID to the name of the counter… but again (tha’ts pretty gross)

You may be better served by getting the Max ShipToNum for a given customer and add one instead.

Hello,

I understand what you are saying but do not know how to do either of those things.

Can you help me out?

I appreciate it.

Shawn

@josecgomez

Could you give me a bit more guidance on this please?