A nearby customer is an opportunity to earn a visit, but only if the offer arrives at the right moment. Two loyalty members outside the same restaurant may need different treatment. One might welcome a coffee offer, while another has already received a promotion or asked not to be disturbed. A slow decision can miss that window. An irrelevant or repeated message can waste the promotion and weaken trust.
How Harper brings timely offers closer to customers
Harper's unified runtime brings location checks, customer context, campaign rules, and offer logic together in one application. When the loyalty app reports a permitted location update, the application checks for nearby stores and decides whether an offer is appropriate. Keeping the data and logic together reduces the network trips needed before responding, helping the business act while the customer is still nearby.
The application first checks distance, consent, quiet hours, and when it last sent a promotion. Ineligible requests stop there without paying for an AI call. Eligible requests can use a language model to help select an approved offer or compose its message. Application rules validate the result before sending it through the existing push provider. Straightforward offers can also follow rules without a model.
The blocks inside Harper represent capabilities of the same application, not separate systems to deploy. Location lookup runs in application code against indexed store data. Harper stores the customer context, campaigns, and recent offer history used by the decision. Existing loyalty and order systems supply updates, while authorized campaign tools can change rules through application APIs without redeploying the offer logic.
Fabric runs this application across regions and manages replication, routing, and failover. Nearby serving regions reduce the distance each location request travels before the decision begins. To expand into another market, select a region and confirm deployment in Fabric. Teams can bring the same application closer to more customers in a few clicks. External model calls and push delivery still contribute to the time it takes an offer to reach a phone.
Alternatively, connecting a loyalty backend and database
A conventional approach sends location updates to a mobile backend that reads store locations, customer history, and campaign rules from a database. PostgreSQL with PostGIS is one option for finding nearby stores. The backend applies eligibility rules, optionally calls a language model, and sends approved messages through a push provider. Campaign management can live in that same backend. This is a practical starting point for teams with an existing loyalty stack.
The diagram shows a backend and database serving from one location. Customers farther away wait longer for requests to reach it, and the backend makes separate database calls before deciding what to do, increasing latency. Teams can deploy across multiple regions to shorten that path. They then need to keep customer history, campaign changes, and recent-send records coordinated across those locations.
Where regional coverage adds work
A campaign change must reach every place that makes decisions. Repeated location updates must not trigger duplicate offers, even when requests reach different regions. Adding regional services and data copies increases the work of deploying, synchronizing, and recovering the system. Harper brings the application and its data together under Fabric, reducing the separate infrastructure to operate while the application enforces the promotion rules.
Why Harper matters
- More opportunities to earn a visit. Nearby decision logic helps relevant offers reach customers while the location still matters. Measure the effect on visits and redemptions, rather than assuming every notification drives a sale.
- Lower AI spend. Check eligibility before calling a model. Handle out-of-range customers, quiet hours, and recent promotions without generation costs.
- Better use of the promotion budget. Use customer context and send limits to avoid unnecessary discounts and repeated messages.
- Fewer systems to manage. Run location lookup, campaign APIs, decision logic, and stored context together, with Fabric managing regional deployment and replication.
- Simpler expansion and recovery. Add regions in a few clicks and route around an unavailable Harper region, keeping the decision layer available closer to customers.
Plan for relevant, reliable offers
Use permissioned location data and authenticated customer identities. Enforce quiet hours, consent, campaign validity, and send limits in code. Coordinate recent-send records across regions and make retries safe so the same event cannot send the same offer twice. Validate model output against approved campaigns, and choose a rules-based response or no message when the model is unavailable.
Define how quickly order history and campaign changes must reach the decision layer. Keep sensitive customer details out of model requests unless needed and permitted. The mobile app and push provider remain responsible for location reporting and notification delivery. This is a reference architecture, with those integrations and controls configured for the business.
Related resources
Near Store Agent demo (GitHub) is an open-source starting point for this use case. Explore nearby-store lookup, customer context, campaign rules, and AI-assisted offer decisions running together in Harper, with a map simulator to try different customer scenarios.
Explore Fabric cluster management for regional deployment and Harper REST endpoints for connecting campaign tools to application data.
Start with one campaign and market
Pilot a defined nearby-store offer with a control group. Measure time from location update to decision and delivery, store visits, redemptions, incremental revenue, and promotion cost. Track model calls avoided and notification opt-outs alongside those outcomes. Test repeated updates, campaign changes, quiet hours, delayed data, and regional failover before expanding.
Bring your campaign rules, loyalty data, and target markets to a Harper architecture workshop. Identify where faster decisions and simpler delivery can turn more nearby moments into useful offers.





