10 Replies Latest reply on Sep 29, 2013 9:57 AM by petropix

Formula for Discount Bonus Points?

Hello:

I'm working in FM-Pro 12 Starter Solution: INVOICES.

I need to assign a field that will allocate a discount based on a customer's repeated purchases (loyalty points). The Discount happens on the 5th, 10th and 15th purchase -- 10%, 20% and 30% respectively.

Old customers (archived on file cards and about to enter the database are at various levels 1-15-- I have created a field indicating the respective level in the Customer table). New customers will start at purchase #1. After the 15th purchase, the cycle begins again.

How might I formulate such a discount set-up?

Thank you.

t.

• 1. Re: Formula for Discount Bonus Points?

If I understand you question correctly you could use something like this

Case (\$points  < 5; 0; \$points < 10 ; .1; \$points < 15 ; .2 ;\$points  ≥  15 ; .3; 0 )

You could change the variable \$points to be the field where your points are stored.  the result would be 0, 0.1, 0.2 or 0.3

• 2. Re: Formula for Discount Bonus Points?

This is not correct, I'm afraid …

budnail wrote:

Case (\$points  < 5; 0; \$points < 10 ; .1; \$points < 15 ; .2 ;\$points  ≥  15 ; .3; 0 )

… since all invoices with a loyalty count > 4 would receive a discount; also the point count in the Customers table needs to be reset when it reaches 15.

Petropix –

If this discount should be applicable to the invoice total, and you want to keep the existing discount field from the Starter Solution (which sums up individual line item discounts), create a new field à la loyaltyDiscount.

Then add these script steps to the Add Invoice script:

Set Field [ Invoices::loyaltyDiscount ; Let  ( \$c = Customers::loyaltyCount + 1 ; case ( \$c = 15 ; 30 ; \$c = 10 ; 20 ; \$c = 5 ; 10 ) ]

Set Field [ Customers::loyaltyCount ; Case ( \$c = 15; 0 ; \$c ) ) ]

Now change your invoice total calculation to include loyaltyDiscount, which is 10, 20, 30, or empty.

• 3. Re: Formula for Discount Bonus Points?

Ah! I missed the idea that the reward only applied on the single 5th, 10th or 15th invoice. You are correct.

I interpeted it as a sort of strange discount policy, but now it makes sense.

• 4. Re: Formula for Discount Bonus Points?

petropix ha scritto:

How might I formulate such a discount set-up?

not Mod ( Customers::loyalty points ; 5 )  * 2 * Customers::loyalty points

This returns always 0 except when the customer's points reach the first, second or third level, in which case returns 10, 20 or 30.

• 5. Re: Formula for Discount Bonus Points?

Many thanks to both of you! Light at the end of the tunnel, at last! I'm a novice in FM-Pro-- and need to STUDY this a bit to get a grasp of the syntax :-)  Yes, the discount would apply to individual items on the Lines Item of each invoice, but would need to be reflected in the grand total, of course. So how does the counting work? I mean, a customer buys 'brand X' five times, for example, and gets a 10% discount. However, in between or after the 5th purchase, he/she might buy a number of other items not related to this discount. Bit tricky, this..

t.

• 6. Re: Formula for Discount Bonus Points?

petropix ha scritto:

However, in between or after the 5th purchase, he/she might buy a number of other items not related to this discount.

How do you assign the loyalty points ?

• 7. Re: Formula for Discount Bonus Points?

You need to be clear about your business rules; in your OP you said that the application of loyalty discount is a function of the number of purchases, so this would happen at the level of a purchase, not at the line item level (where in the Starter Solution, IIRC, this is a field to apply a discount manually).

If OTOH it is a function of purchases per product per customer, then you'd (probably) have to create a Customers/Products join table and store your ”loyalty levels“ there.

1 of 1 people found this helpful
• 8. Re: Formula for Discount Bonus Points?

Yes, thanks. I appreciate that. I must check with the customer (Mom & Pop Wine/Brewing shop) -- I believe the discount applies to two particular products or lines. Bit more complicated than I had anticipated, particularly because of the archived customer loyalty points. Oh well-- thanks for the great help thus far.. I'm so much closer now.

t.

• 9. Re: Formula for Discount Bonus Points?

Hi,

Exciting times. Enjoy it. Your last comment regarding "check with the customer" ... "Bit more complicated than I had anticipated..." should be a banner on your wall. With that in mind, consider planning a way to easily change the various parameters in these  worthwhile suggested methods by the end user. This will also bring the Products (Inventory) file into play. That is to say, certain products will be toggled in and out of various promotions and for particular periods of time or even specifics days of the week. Then there are companion products which get a discount with the purchase of some other item, etc.

My overall point is that you don't necessarily need to cover every twist of the entrepreneurial mind, but if early on you can avoid computing yourself into a corner ... life is better.

If one sits down in front of a couple of TVs, a radio and some newspapers for an 8 hour day you can start to build a catalog of common promo strategies. Least we forget free shipping and the institutional "Does not apply in combination with other promotions."

• 10. Re: Formula for Discount Bonus Points?

Hey, thanks for the creative input! Database, datarama!

Must confess, I'm out of my depth here. In fact, I HAD anticipated the challenge of the 'discount loyalty points' from the outset. Told my client I'd have to go on a hunt for it. So here I find myself in an  interesting part of the woods. Rather enjoying FM-Pro-- perfect for dummies like me. I think my client would love your suggestions/approach. But there's no budget to speak of. If I can get the loyalty points fields in place, I'll have earned my keep. That said, I was beginning to feel unappreciated-- client wants this and that-- throws me a 600 item inventory with Byzantine variables. So it's nice to be in company that understands the nuances of this stuff.

Bit ironic, I thought I had stated the problem/question succinctly at the outset. I got ZERO resplies for over week. It felt strange. Had I said something foolish? Now, a cascade of high-grade solutions.. well, a couple anyhow.

Eternally grateful..

-t.