44
55- [ Context] ( #context )
66- [ Services] ( #services )
7+ - [ Campaign Service] ( #campaign-service )
78 - [ User Service] ( #user-service )
89- [ Channels] ( #channels )
10+ - [ campaign.analytics] ( #campaignanalytics )
11+ - [ campaign.create] ( #campaigncreate )
12+ - [ campaign.execute] ( #campaignexecute )
13+ - [ campaign.status] ( #campaignstatus )
914 - [ notification.preferences.update] ( #notificationpreferencesupdate )
15+ - [ notification.user.{user_id}.push] ( #notificationuseruseridpush )
1016 - [ user.analytics] ( #useranalytics )
1117 - [ user.info.request] ( #userinforequest )
1218 - [ user.info.update] ( #userinfoupdate )
19+ - [ Changelog] ( #changelog )
1320
1421## Context
1522
1623![ Context] ( diagrams/context.svg )
1724
1825## Services
1926
27+ ### Campaign Service
28+
29+ A service that manages notification campaigns, user targeting, and campaign execution.
30+ Handles campaign creation, user segmentation, scheduling, and personalized notification delivery.
31+ Uses user data for targeting and personalization of campaign messages.
32+
33+
34+ ![ Campaign Service Service Channels] ( diagrams/service_campaign-service.svg )
35+
2036### User Service
2137
2238A service that manages user information, profiles, and authentication.
@@ -27,6 +43,160 @@ Handles user data requests, profile updates, and user lifecycle events.
2743
2844## Channels
2945
46+ ### campaign.analytics
47+
48+ ![ campaign.analytics Channel Services] ( diagrams/channel_campaignanalytics.svg )
49+
50+ #### Messages
51+ ** CampaignAnalyticsEventMessage**
52+ ``` json
53+ {
54+ "campaign_id" : " string[uuid]" ,
55+ "event_id" : " string[uuid]" ,
56+ "event_type" : " string[enum:campaign_created,campaign_executed,notification_sent,notification_opened,notification_clicked,campaign_completed,campaign_failed]" ,
57+ "execution_id" : " string[uuid]" ,
58+ "metadata" : {
59+ "environment" : " string[enum:development,staging,production]" ,
60+ "platform" : " string[enum:ios,android,web]" ,
61+ "source" : " string[enum:mobile,web,api]" ,
62+ "version" : " string"
63+ },
64+ "notification_id" : " string[uuid]" ,
65+ "timestamp" : " string[date-time]" ,
66+ "user_id" : " string[uuid]"
67+ }
68+ ```
69+
70+ ### campaign.create
71+
72+ ![ campaign.create Channel Services] ( diagrams/channel_campaigncreate.svg )
73+
74+ #### Messages
75+ ** CampaignCreateMessage**
76+ ``` json
77+ {
78+ "campaign_id" : " string[uuid]" ,
79+ "created_at" : " string[date-time]" ,
80+ "description" : " string" ,
81+ "metadata" : {
82+ "environment" : " string[enum:development,staging,production]" ,
83+ "platform" : " string[enum:ios,android,web]" ,
84+ "source" : " string[enum:mobile,web,api]" ,
85+ "version" : " string"
86+ },
87+ "name" : " string" ,
88+ "notification_template" : {
89+ "body_template" : " string" ,
90+ "data" : " object" ,
91+ "localization" : " object" ,
92+ "priority" : " string[enum:low,normal,high]" ,
93+ "title_template" : " string"
94+ },
95+ "schedule" : {
96+ "recurring" : {
97+ "end_date" : " string[date]" ,
98+ "frequency" : " string[enum:daily,weekly,monthly]" ,
99+ "interval" : " integer" ,
100+ "start_date" : " string[date]"
101+ },
102+ "scheduled_at" : " string[date-time]" ,
103+ "timezone" : " string" ,
104+ "type" : " string[enum:immediate,scheduled,recurring]"
105+ },
106+ "settings" : {
107+ "a_b_testing" : {
108+ "enabled" : " boolean" ,
109+ "traffic_split" : [
110+ " number"
111+ ],
112+ "variants" : [
113+ {
114+ "body_template" : " string" ,
115+ "data" : " object" ,
116+ "localization" : " object" ,
117+ "priority" : " string[enum:low,normal,high]" ,
118+ "title_template" : " string"
119+ }
120+ ]
121+ },
122+ "batch_size" : " integer" ,
123+ "max_retries" : " integer" ,
124+ "rate_limit" : " integer" ,
125+ "respect_quiet_hours" : " boolean"
126+ },
127+ "target_audience" : {
128+ "estimated_reach" : " integer" ,
129+ "user_filters" : {
130+ "language" : [
131+ " string"
132+ ],
133+ "last_activity" : {
134+ "from" : " string[date-time]" ,
135+ "to" : " string[date-time]"
136+ },
137+ "registration_date" : {
138+ "from" : " string[date]" ,
139+ "to" : " string[date]"
140+ },
141+ "timezone" : [
142+ " string"
143+ ]
144+ },
145+ "user_segments" : [
146+ " string[enum:all_users,new_users,active_users,inactive_users,premium_users,free_users]"
147+ ]
148+ }
149+ }
150+ ```
151+
152+ ### campaign.execute
153+
154+ ![ campaign.execute Channel Services] ( diagrams/channel_campaignexecute.svg )
155+
156+ #### Messages
157+ ** CampaignExecuteMessage**
158+ ``` json
159+ {
160+ "batch_size" : " integer" ,
161+ "campaign_id" : " string[uuid]" ,
162+ "created_at" : " string[date-time]" ,
163+ "execution_id" : " string[uuid]" ,
164+ "execution_type" : " string[enum:immediate,scheduled,batch]" ,
165+ "metadata" : {
166+ "environment" : " string[enum:development,staging,production]" ,
167+ "platform" : " string[enum:ios,android,web]" ,
168+ "source" : " string[enum:mobile,web,api]" ,
169+ "version" : " string"
170+ },
171+ "priority" : " string[enum:low,normal,high]"
172+ }
173+ ```
174+
175+ ### campaign.status
176+
177+ ![ campaign.status Channel Services] ( diagrams/channel_campaignstatus.svg )
178+
179+ #### Messages
180+ ** CampaignStatusUpdateMessage**
181+ ``` json
182+ {
183+ "campaign_id" : " string[uuid]" ,
184+ "error" : {
185+ "code" : " string" ,
186+ "message" : " string"
187+ },
188+ "execution_id" : " string[uuid]" ,
189+ "progress" : {
190+ "failed" : " integer" ,
191+ "sent" : " integer" ,
192+ "success_rate" : " number[float]" ,
193+ "total_targets" : " integer"
194+ },
195+ "status" : " string[enum:pending,running,completed,failed,paused,cancelled]" ,
196+ "updated_at" : " string[date-time]"
197+ }
198+ ```
199+
30200### notification.preferences.update
31201
32202![ notification.preferences.update Channel Services] ( diagrams/channel_notificationpreferencesupdate.svg )
@@ -55,6 +225,24 @@ Handles user data requests, profile updates, and user lifecycle events.
55225}
56226```
57227
228+ ### notification.user.{user_id}.push
229+
230+ ![ notification.user.{user_id}.push Channel Services] ( diagrams/channel_notificationuseruseridpush.svg )
231+
232+ #### Messages
233+ ** PushNotificationMessage**
234+ ``` json
235+ {
236+ "body" : " string" ,
237+ "created_at" : " string[date-time]" ,
238+ "data" : " object" ,
239+ "notification_id" : " string[uuid]" ,
240+ "priority" : " string[enum:low,normal,high]" ,
241+ "title" : " string" ,
242+ "user_id" : " string[uuid]"
243+ }
244+ ```
245+
58246### user.analytics
59247
60248![ user.analytics Channel Services] ( diagrams/channel_useranalytics.svg )
@@ -121,3 +309,8 @@ Handles user data requests, profile updates, and user lifecycle events.
121309 "user_id" : " string[uuid]"
122310}
123311```
312+
313+ ## Changelog
314+
315+ ### 2025-07-26
316+ - ** added** service: 'Campaign Service' was added
0 commit comments