Creating activities
Activities must be created from an existing claim using the following endpoint:
- POST
claim/v1/claims/{claimId}/activities
Activity patterns
Activities are created from activity patterns. An activity pattern is a set of
default values for fields in the activity (such as description, subject, and priority).
Every activity pattern has a code, such as contact_insured
or
legal_review
.
When creating an activity through Cloud API, the only required field is
activityPattern
, which must specify the activity pattern's code. Because
the activity pattern typically contains all the necessary default values, the activity
pattern is often the only field the caller application needs to specify.
You can retrieve a list of activity patterns using the following:
- GET
/claim/v1/claims/{claimId}/activity-patterns
You can optionally specify values for the following fields, each of which overrides the value coming from the activity pattern:
automate-only activity patterns
Activity patterns have an automate-only
field. This field designates
whether or not a user can create activities through the user interface using that activity
pattern. By default, when an activity pattern's automate-only
field is set
to true, any caller creating an activity through Cloud API cannot use the activity pattern
either.
You can override the behavior for individual callers by granting them the
restcreateautomatedactivity
system permission. Callers with this
permission are able to creating activities using activity patterns whose
automate-only
field is set to true.
To assign this permission:
- For internal user callers, add this permission to one of the user roles assigned to the caller.
- For external users and services, add this permission to the user role assigned to the proxy user.
For more information on proxy users, see Cloud API Developer Guide.
Examples of creating activities
The following is an example of creating a contact_insured
activity for
claim cc:102. The activity defaults to all values in the contact_insured
activity pattern.
The following is an example of creating a legal_review
activity for claim
cc:102. In this case, two activity pattern values are overridden: the activity is
mandatory
(it cannot be skipped) and the priority
is
urgent.