workspace extends ../models/models.dsl { name "Loyalty System" description "Zoom in on the loyalty functionality of the Sweetgreen digital ordering platform." views { container digitalOrderingPlatformSoftwareSystem "Container_Loyalty" { title "Loyalty | System Diagram" description "System diagram for managing subscriptions and rewards" include braintree braze customer kustomer loyaltySvc loyaltySvcDB orderApp payment-svc payment-svc-db paytronix sessionM # include relationship.tag==functionalArea:Loyalty # include braintree braze customer kustomer orderApp payment-svc payment-svc-db paytronix sessionM exclude "braze -> orderApp" } dynamic digitalOrderingPlatformSoftwareSystem "Dynamic_Loyalty_Create_Subscription" { title "Loyalty | Create Subscription" description "Diagram showing how systems interact to create a subscription" customer -> orderApp "Enter gift card number in" orderApp -> loyaltySvc "Fetch loyalty profile and plan tiers from" loyaltySvc -> loyaltySvcDB "Fetch loyalty profile and plan tiers from" orderApp -> payment-svc "Fetch plans by id from" payment-svc -> braintree "Fetch plans from" orderApp -> payment-svc "Fetch subscription payment profile from" orderApp -> payment-svc "Create subscription payment profile to" payment-svc -> loyaltySvc "Update loyalty profile with subscription id from" loyaltySvc -> loyaltySvcDB "Update tier, history and plan" loyaltySvc -> sessionM "Update tier with" loyaltySvc -> braze "Update customer profile" loyaltySvc -> kustomer "Update customer profile" } dynamic digitalOrderingPlatformSoftwareSystem "Dynamic_Loyalty_Kustomer_Refund_Subscription" { title "Loyalty | Kustomer Refund Subscription" description "Diagram showing how systems interact to refund a subscription through Kustomer" kustomer -> payment-svc "Refund transaction with id" payment-svc -> braintree "Refund transaction with id" payment-svc -> kustomer "Notify Kustomer of refund" } } }