# Callback (discussion_writer)

Insert new comment to process discussion

# Config

discussion_writer:

	config:

		# Required | Type: string | Default: null
		# Comment message
		comment: "Customer #{$customer_id} was processed."

		# Optional | Type: array | Default: []
		# Files ids to attach to the comment message
		files: [1,2,3]

		# Optional | Type: int | Default: null
		# ID of user which should be set as comment author. By default uses step resolver or process creator if step has no resolver.
		creator: "{$__user->id}"

		# Optional | Type: string | Default: normal
		# Choose between message types
		#
		### Examples
		### - normal
		### - system
		type: "normal"

		# Notification
		notification:

			# Optional | Type: bool | Default: true
			# Whether notification should be sent
			enabled: true

			# Optional | Type: string | Default: New comment in discussion: {$_process->templateProcess->name}
			# Change notification subject
			#
			### Note
			### There is available discussion variable: {$_discussion->comment} and {$_discussion->author}.
			### 
			### Default subject "New comment in discussion: {$_process->templateProcess->name}" is localized according to application language.
			subject: "New message in process #{$_process->id} from {$_discussion->author->fullname}"

			# Optional | Type: string | Default: null
			# Notification detail
			#
			### Note
			### There is available discussion variable: {$_discussion->comment} and {$_discussion->author}.
			### 
			### Notification detail is appended to discussion message.
			detail: null

			# Sender information
			from:

				# Required | Type: string | Default: null
				# From email
				email: "example@floweye.app"

				# Required | Type: string | Default: null
				# From name
				name: "Floweye"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59