Case study
Automated Price Changes and a Promo Code Engine in Salesforce CPQ for a European Parking Operator
Moved price changes on active parking subscriptions into CPQ and built a promo code engine that generated ~100K unique codes a year.
The challenge
A European parking operator, active in several countries, managed the parking subscriptions it sold to consumers in Salesforce CPQ: new bookings, changes, terminations, renewals and evergreen subscriptions. A subscription was not a single product: the customer bought a parking space together with an access key to the car park, so the configuration and price calculation behind each one was complex. The CPQ setup was already heavily customized in code, and it ran on Orders rather than standard CPQ contracts.
New bookings were already priced in CPQ, but price changes on existing subscriptions were made on the ERP side and came into Salesforce through an integration. The business wanted 2 things in Salesforce itself. First, changing the price of active subscriptions: customers kept their current price until the end of their subscription term, then renewed at the new price, with notice in advance. Second, promo codes: generating large batches of unique codes and seeing which campaign each booking came from.
What I did
I worked on the engagement as a Salesforce CPQ developer and architect in a vendor team of 8 people. Most of my time went into building features: I estimated, designed and implemented both price changes and promo codes, and took part in the rest of the delivery work, from other CPQ features and bug fixes to code reviews and deployments.
For price changes I added a custom Product Option Price Change object, where the pricing team entered future prices and the date from which they applied. Scheduled batch jobs picked up the subscriptions renewing after that date: 30 days before renewal, customers got an email notice of the new price through the marketing platform, and at renewal the jobs closed the current order and created a new quote and order at the new price. The new order went to the ERP for billing through the existing integration. The hard part was the pricing itself: the new order had to keep the same parking space and access key bundle and go through the existing customized price logic, not around it.
For promo codes I built a generation engine with a custom UI, using Apex and the Crypto class to produce unique codes. It generated around 100K codes a year, and each code could be redeemed once. The key requirement was that every code could be linked to its Campaign and Campaign Member, so the marketing team could run their own reports on which campaign a booking came from and how well each campaign worked. Customers redeemed the codes at the website checkout, which another team built.
The result
- Price changes on active subscriptions handled in Salesforce: 30 days’ notice to customers, then renewal at the new price
- Renewal orders priced by the existing CPQ logic, keeping the same parking space and access key bundle
- Promo code engine generating ~100K unique, single-use codes a year, in production
- Every promo code linkable to its Campaign Member, so the marketing team could report on campaigns themselves
System landscape
Team & duration
6 months, 06/2021 to 12/2021. Vendor team of 8 people, with developers, BA, QA and project management. I was one of the developers and owned the design and build of the price change and promo code features.