Activity Form Profiles

Activity form profiles are a way to organize the forms that you want a group of employees to be able to access. You specify a form profile when you define the activity profile, and then you assign the activity profile to an employee.

The system provides the following pre-defined form profiles:

  • All Forms
  • Empty Profile

All employees are assigned an "Empty Profile" by default.

Prerequisites

You should create custom field definitions and create activity forms before creating activity form profiles.

Example

In this example, we create, verify, update, and delete an activity form profile.

Create an activity form profile

The create request:

  • creates a new activity form profile named: Example Activity Forms
  • uses the "forms" array to include every example activity form in the system using object references
  • does not set this activity form profile as the system default

Example request

Call the Create Form Profile POST /v1/work/form_profiles operation with the following request payload.

{
    "name": "Example Activity Forms",
    "description": "A profile containing access to all example activity forms.",
    "version": 1,
    "forms": [
        {
            "id": 51,
            "qualifier": "12345"
        },
        {
            "id": 1,
            "qualifier": "123456"
        }
    ],
    "default": false
}

Example response

A success response returns HTTP status code 200 and a response body similar to the following example.

{
    "id": 1,
    "name": "Example Activity Forms",
    "description": "A profile containing access to all example activity forms.",
    "version": 1,
    "forms": [
        {
            "id": 1,
            "qualifier": "123456"
        },
        {
            "id": 51,
            "qualifier": "12345"
        }
    ]
}

Verify

To verify, call the Retrieve Form Profile by ID GET /v1/work/form_profiles/{id} or the Retrieve All Form Profiles or by Name GET /v1/work/form_profiles?name={name} operation.

Calling GET /v1/work/form_profiles/1 or GET /v1/work/form_profiles?name=Example Activity Forms returns:

{
    "id": 1,
    "name": "Example Activity Forms",
    "description": "A profile containing access to all example activity forms.",
    "version": 1,
    "forms": [
        {
            "id": 1,
            "qualifier": "123456"
        },
        {
            "id": 51,
            "qualifier": "12345"
        }
    ]
}

Note: The Retrieve All Form Profiles or by Name GET /v1/work/form_profiles?name=Example Activity Forms operation returns the object above enclosed in an array, since omitting the name query parameter returns all activity form profiles in the system.

Update the activity form profile

To update the activity form profile to add a new example form, call the Update Form Profile by ID PUT /v1/work/form_profiles/1 operation with the following request payload.

Example request

{
    "id": 1,
    "name": "Example Activity Forms",
    "description": "A profile containing access to all example activity forms.",
    "version": 1,
    "forms": [
        {
            "id": 51,
            "qualifier": "12345"
        },
        {
            "id": 1,
            "qualifier": "123456"
        },
        {
            "id": 53,
            "qualifier": "1234567"
        }
    ],
    "default": false
}

Example response

{
    "id": 1,
    "name": "Example Activity Forms",
    "description": "A profile containing access to all example activity forms.",
    "version": 2,
    "forms": [
        {
            "id": 1,
            "qualifier": "123456"
        },
        {
            "id": 51,
            "qualifier": "12345"
        },
        {
            "id": 53,
            "qualifier": "1234567"
        }
    ]
}

Note that the version is automatically incremented to 2. To successfully update this profile again, you must pass version 2 in the request body.

Delete the activity form profile

To delete this activity form profile, call the Delete Form Profile by ID DELETE /v1/work/form_profiles/1 operation.

The system returns HTTP status 204 with an empty response body.