iVendNextDevelopers My apps

S14 — price-change approvals across stores

Start an app from this sample

A chain wants a price change to need a yes: a store manager's yes up to a limit, and head office's yes above it, with each store seeing only its own requests. A request names its store; the store's manager approves or rejects it; within the limit a small service applies the price, above it the request waits for head office. One workflow on the sample's own record type, with a service that writes the price once.

The recipe: Approvals across stores

In the App library: Price change approvals across stores

Two stores' price-change requests: a store manager sees only their store's, approves one within their limit, an over-limit one waits for head office, and the price row ends at the approved price

Industries: Thrift and resale

When to use it: an approval whose approver depends on the store, and on how big the change is. For one retailer with one approver, S11 is enough.

Start from it

ivn new acme_store_approvals --from s14

What to change

What a partner usually changes:

More: the recipe.

The customer sets: who holds each role, each store manager's and requester's store (a User Permission), and the limit. Where no service runs, give Store price applier to someone who already edits prices (it brings no right of its own on Item Price), and mark a request over the limit only after head office approved it.

Run it

ivn check
ivn try

To apply approved requests, run this from service/aps/ in the app you made (Try does not run it). Where it does not run, the Store price applier sets the price on its price list (Item Price) first, then presses Mark price set: the button only records it.

BASE=https://shop.example AP_KEY=… AP_SECRET=… LIMIT_PCT=10 python3 approvals_stores.py apply

Versions

0.3.6

0.3.5

0.3.4

0.3.3

0.3.2

0.3.1

0.3.0

0.1.0

Needs this serves

This page in the kit