Skip to main content
Version: 4.55

addContact

Opens the contacts of the user's device and shows a pre-filled "add new contact" view with the provided data. Depending on the operating system and its version, this could manifest as just an in-app overlay or a complete switch to the contacts app.

note

On Android, this uses an intent mechanism and therefor does not require additional permissions, while on Apple devices, the user is prompted to allow access to the contacts on first execution. See requestPermission to manually request permission beforehand.

Field Configurations

KeyTypeDescriptionDefault Value
"params" (required)Objectundefinednull

Parameters

KeyTypeDescriptionDefault Value
"async"BooleanSpecifies whether the action should perform asynchronously.null
"city"StringCity of the contact's address.null
"company"StringCompany of the contact.null
"country"StringCountry of the contact's address.null
"email"StringEmail address of the contact.null
"emailWork"StringWork email address of the contact.null
"familyName"StringFamily name of the contact.null
"givenName"StringGiven name of the contact.null
"imageUrl"StringURL to the image of the contact.null
"jobTitle"StringJob title of the contact.null
"phone"StringPhone number of the contact.null
"phoneWork"StringWork phone number of the contact.null
"postal"StringPostal code of the contact's address.null
"street"StringStreet of the contact's address.null
"zip"StringZIP code of the contact's address.null

Inherited

From Base Action

Base Action

Field Configurations

KeyTypeDescriptionDefault Value
"dynamicParams"ObjectDynamic params to retrieve data from a specific context e.g. a userSetting.null
"leadingDelimiter"StringThe leading mustache delimiter to use.null
"params"Object,ArrayObject containing the properties of the action.null
"trailingDelimiter"StringThe trailing mustache delimiter to use.null
"type"StringType name of the action.null

Examples

Example 1: Add a contact

Goal: Add a contact stating the company and the job title.

To achieve this the following code can be used:

{
"type": "addContact",
"params": {
"givenName": "John",
"familyName": "Smith",
"email": "smith@smiths.com",
"phone": "+492342232343",
"company": "Smith & Smith",
"jobTitle": "lawyer"
}
}

The params correspond to the information that is entered for the contact.

Result:

Screencapture of the app showing the results of the sample code from Example 1.
An addContact action has been created.