Action Items
buildfire.actionItems
#
Action Items is an object that represent an action to take. This could be a link to open in a browser, could be a telephone number to call or sms, and/or could be an address to navigate to. The details of these objects shouldn't concern you. All you need to do is save it in your datastore and when it's time to execute an item just call buildfire.actionItems.execute
#
MethodsshowDialog()
#
buildfire.actionItems.showDialog(actionItem, options, callback)
Shows a dialog for the App Owner to create an Action Item.
actionItem
#
Allows you to pass a previously saved actionItem
that the user would like to edit
Possible action items are:
linkToWeb
#
linkToApp
#
sendEmail
#
callNumber
#
sendSMS
#
navigateToAddress
#
navigateToAddress
#
linkToSocialGoogle
#
linkToSocialInstagram
#
linkToSocialLinkedIn
#
linkToSocialFaceBook
#
linkToSocialTwitter
#
noAction
#
options
#
Name | Type | Required | Description | Default |
---|---|---|---|---|
showIcon | boolean | no | Specifies if you want to show the "icon" | false |
allowNoAction | boolean | no | Allows the noAction action | false |
actionTextLabel | string | no | Custom label to show next to the action item display text field | "Action Button Text" |
hideActionText | boolean | no | Does not ask the user to provide a display text value to the action item | false |
callback(err, actionItem)
#
Callback function after action item dialog is completed.
Name | Type | Description |
---|---|---|
err | string | error string, null when operation is successful |
actionItem | object | actionItem that was created |
#
More Examplesexecute()
#
buildfire.actionItems.execute(actionItem, callback)
It will take a previously saved actionItem
and execute it. If its a link it will open in a browser, if its a telephone number it will call that phone number, etc..
actionItem
#
See actionItem
callback(err)
#
Callback function after action item is executed
Name | Type | Description |
---|---|---|
err | string | error string, null when operation is successful |
list()
#
buildfire.actionItems.list(actionItems, options, callback)
Takes an array of previously saved actionItem
s and lists them in a standard popup.
actionItems
#
Array of actionItems
options
#
Name | Type | Required | Description | Default |
---|---|---|---|---|
executeItem | boolean | no | Automatically execute after user selects an item | true |
callback(err, actionItem)
#
Callback function after action item is executed
Name | Type | Description |
---|---|---|
err | string | error string, null when operation is successful |
actionItem | object | Selected actionItem from the list |