These docs are for v1.0. Click to read the latest docs for v2.0.

Configuring Action buttons with Notifications

In order to enable notifications with the action button you need to do the following configuration. You check the screenshot to check how the notification will be displayed.

📘

Important

Please ensure to add correct plist file based on SDK version you are integrating.

  • For iOS SDK v3.1.0 and above - please refer to this section
  • For iOS SDK version below v3.1.0 - please refer to this section

For iOS SDK version 3.1.0 and above

To support Action Button Notification you need to add a file, named SmartechConfig.plist to your project. Follow these steps to add the file in your project. Following is the sample of plist for action buttons or download the attachment from here.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>ActionButtons_v2</key>
	<dict>
		<key>SmartechSimple_Actionable</key>
		<dict>
			<key>smtType</key>
			<string>Simple</string>
			<key>actionItems</key>
			<array>
				<dict>
					<key>type</key>
					<string>text</string>
					<key>smtAction</key>
					<string>reply</string>
					<key>title</key>
					<string>Share Feedback</string>
					<key>option</key>
					<string>1</string>
					<key>placeholder</key>
					<string>Enter your feedback</string>
				</dict>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>copy</string>
					<key>title</key>
					<string>Copy Code</string>
					<key>option</key>
					<string>1</string>
				</dict>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>dismiss</string>
					<key>title</key>
					<string>Dismiss</string>
					<key>option</key>
					<string>3</string>
				</dict>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>snooze</string>
					<key>title</key>
					<string>Snooze</string>
					<key>option</key>
					<string>2</string>
				</dict>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>copy</string>
					<key>title</key>
					<string>Copy Code</string>
					<key>option</key>
					<string>4</string>
				</dict>
			</array>
		</dict>
		<key>SmartechSimple_Actionable_CopyCode</key>
		<dict>
			<key>smtType</key>
			<string>Simple</string>
			<key>actionItems</key>
			<array>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>copy</string>
					<key>title</key>
					<string>Copy Code</string>
					<key>option</key>
					<string>1</string>
				</dict>
			</array>
		</dict>
		<key>SmartechSimple_Actionable_Snooze</key>
		<dict>
			<key>smtType</key>
			<string>Simple</string>
			<key>actionItems</key>
			<array>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>snooze</string>
					<key>title</key>
					<string>Snooze</string>
					<key>option</key>
					<string>3</string>
				</dict>
			</array>
		</dict>
		<key>SmartechSimple_Actionable_Dismiss</key>
		<dict>
			<key>smtType</key>
			<string>Simple</string>
			<key>actionItems</key>
			<array>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>dismiss</string>
					<key>title</key>
					<string>Dismiss</string>
					<key>option</key>
					<string>3</string>
				</dict>
			</array>
		</dict>
		<key>SmartechSimple_Actionable_Reply</key>
		<dict>
			<key>smtType</key>
			<string>Simple</string>
			<key>actionItems</key>
			<array>
				<dict>
					<key>type</key>
					<string>text</string>
					<key>smtAction</key>
					<string>reply</string>
					<key>title</key>
					<string>Send</string>
					<key>option</key>
					<string>1</string>
					<key>placeholder</key>
					<string>Enter your feedback</string>
				</dict>
			</array>
		</dict>
		<key>SmartechSimple_Actionable_ReplyCopy</key>
		<dict>
			<key>smtType</key>
			<string>Simple</string>
			<key>actionItems</key>
			<array>
				<dict>
					<key>type</key>
					<string>text</string>
					<key>smtAction</key>
					<string>reply</string>
					<key>title</key>
					<string>Send</string>
					<key>option</key>
					<string>1</string>
					<key>placeholder</key>
					<string>Enter your feedback</string>
				</dict>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>copy</string>
					<key>title</key>
					<string>Copy Code</string>
					<key>option</key>
					<string>1</string>
				</dict>
			</array>
		</dict>
		<key>SmartechImage_Actionable_YesNo</key>
		<dict>
			<key>smtType</key>
			<string>Image</string>
			<key>actionItems</key>
			<array>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>deeplink</string>
					<key>title</key>
					<string>Yes</string>
					<key>option</key>
					<string>4</string>
				</dict>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>deeplink</string>
					<key>title</key>
					<string>No</string>
					<key>option</key>
					<string>4</string>
				</dict>
			</array>
		</dict>
		<key>SmartechImage_Actionable_YesNoMaybe</key>
		<dict>
			<key>smtType</key>
			<string>Image</string>
			<key>actionItems</key>
			<array>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>deeplink</string>
					<key>title</key>
					<string>Yes</string>
					<key>option</key>
					<string>4</string>
				</dict>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>deeplink</string>
					<key>title</key>
					<string>No</string>
					<key>option</key>
					<string>4</string>
				</dict>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>deeplink</string>
					<key>title</key>
					<string>Maybe</string>
					<key>option</key>
					<string>2</string>
				</dict>
			</array>
		</dict>
		<key>SmartechImage_Actionable_Dismiss</key>
		<dict>
			<key>smtType</key>
			<string>Image</string>
			<key>actionItems</key>
			<array>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>dismiss</string>
					<key>title</key>
					<string>Dismiss</string>
					<key>option</key>
					<string>3</string>
				</dict>
			</array>
		</dict>
		<key>SmartechImage_Actionable_CopyCode</key>
		<dict>
			<key>smtType</key>
			<string>Image</string>
			<key>actionItems</key>
			<array>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>copy</string>
					<key>title</key>
					<string>Copy Code</string>
					<key>option</key>
					<string>4</string>
				</dict>
			</array>
		</dict>
		<key>SmartechImage_Actionable_Reply</key>
		<dict>
			<key>smtType</key>
			<string>Image</string>
			<key>actionItems</key>
			<array>
				<dict>
					<key>type</key>
					<string>text</string>
					<key>smtAction</key>
					<string>reply</string>
					<key>title</key>
					<string>Send</string>
					<key>option</key>
					<string>1</string>
					<key>placeholder</key>
					<string>Enter your feedback</string>
				</dict>
			</array>
		</dict>
		<key>SmartechImage_Actionable_Snooze</key>
		<dict>
			<key>smtType</key>
			<string>Image</string>
			<key>actionItems</key>
			<array>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>snooze</string>
					<key>title</key>
					<string>Snooze</string>
					<key>option</key>
					<string>3</string>
				</dict>
			</array>
		</dict>
		<key>SmartechAudio_Actionable_Dismiss</key>
		<dict>
			<key>smtType</key>
			<string>Audio</string>
			<key>actionItems</key>
			<array>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>dismiss</string>
					<key>title</key>
					<string>Dismiss</string>
					<key>option</key>
					<string>3</string>
				</dict>
			</array>
		</dict>
		<key>SmartechAudio_Actionable_Snooze</key>
		<dict>
			<key>smtType</key>
			<string>Audio</string>
			<key>actionItems</key>
			<array>
				<dict>
					<key>type</key>
					<string>button</string>
					<key>smtAction</key>
					<string>snooze</string>
					<key>title</key>
					<string>Snooze</string>
					<key>option</key>
					<string>3</string>
				</dict>
			</array>
		</dict>
	</dict>
</dict>
</plist>

Following is an image representation of SmartechConfig.plist.

1349

Explanation of keys used in the plist:

KeysUsage
ActionButtons_v2It is a dictionary which has all the categories used for action buttons with type and action button title.
smtTypeIt defines the type of notifications for which the button is to be attached. For example Simple, Image, Audio, Video, and Gif.
typeIt defines the type of Action button is to be attached. For example text, button.
smtActionIt defines the Action of the attached Action Button. For example reply, copy, dismiss, snooze, deeplink.
titleThe value of the action button title will be displayed on the action button in the notification.
optionIt defines the button title color and what it will perform.For details on option values and what it does please refer below table.
placeholderIt is the default placeholder text for Notification with Text input field. This is only in case when smtAction value is reply or type value is text.

Values and Usage of option key value

ValueColorUsage
1DefaultDismiss Notification when clicked.
2RedOpen app when clicked with Authentication.
3RedDismiss Notification when clicked.
4DefaultOpen App when clicked.

📘

Note:

The value of key smtType, type, smtAction in plist are case sensitive.
The name of the plist must be SmartechConfig.plist.

For iOS SDK version below v3.1.0

To support Action Button Notification you need to add a file, named SmartechConfig.plist to your project. Follow these steps to add the file in your project. Following is the sample of plist for action buttons or download the attachment from here.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>ActionButtons</key>
	<dict>
		<key>Product_Purchase_CTA1</key>
		<dict>
			<key>type</key>
			<string>Simple</string>
			<key>actionButtonTitle</key>
			<array>
				<string>Buy Now</string>
			</array>
		</dict>
		<key>Product_Purchase_CTA2</key>
		<dict>
			<key>type</key>
			<string>Image</string>
			<key>actionButtonTitle</key>
			<array>
				<string>Buy Now</string>
				<string>Add To Cart</string>
			</array>
		</dict>
		<key>Product_Purchase_CTA3</key>
		<dict>
			<key>type</key>
			<string>Video</string>
			<key>actionButtonTitle</key>
			<array>
				<string>Buy Now</string>
				<string>Add To Cart</string>
				<string>Add To Wishlist</string>
			</array>
		</dict>
	</dict>
</dict>
</plist>

Following is a sample screenshot of SmartechConfig.plist

646

Explanation of keys used in the plist:

KeysUsage
ActionButtonsIt is a dictionary which has all the categories used for action buttons with type and action button title.
typeIt defines the type of notifications that the button is to be attached. For example: Simple, Image, Audio, Video and Gif.
actionButtonTitleThe value of action button title will be displayed on action button in notification.

📘

Note:

  • The value of key 'type' in plist is case sensitive.
  • The name of plist must be SmartechConfig.plist

Upload SmartechConfig.plist to Smartech Panel

After you have created the plist you need to upload the file on the panel. To upload plist file on the panel, refer the steps from PDF here