> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Activity.record

To report one or more non-transaction activities to Vindicia, create an `Activity` object for each activity, insert the object into an array, and pass the array as an argument to `record()`. Every `Activity` object requires that you specify the associated `Account` object. For that purpose, you can create an `Account` object and populate it with only its VID or `merchantAccountId`.

**Note:** use of the forward slash character (/) in merchant identifiers is not allowed. See [Merchant Identifiers](Merchant_Identifiers) for more information.

## Input

*srd*: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a `method` call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.

Some fields are required, either practically or in the WSDL, and will be returned regardless of the *srd*. A null *srd* returns the complete response.

*activities*: an array of `Activity` objects to report to Vindicia.

## Output

*return*: an object of type `Return` that indicates the success or failure of the call.

## Returns

In addition to those listed in [The Return Object](The_Return_Object), this call returns:

| Return Code | Return String |
| - | - |
| `400` | One of the following: - `Unknown activity type *input-type*. Must be one of *list-of-allowed-types*.` - `Required field 'timestamp' missing!` - `Required field 'account' missing!` |

## Example

```

// To report a phone call as an Activity, create an account object
$account = new Account();

// Specify account by the customer id
$account->setMerchantAccountId('9876-5432');

// Create Activity to report customer's phone call
// and corresponding ActivityTypeArgs objects

$activity = new Activity();
$typeArgs = new ActivityTypeArgs();

// fill in the relevant info for this activity record
$activity->setAccount($account); //associate the activity and account
$activity->setActivityType('Phone');
$activity->setTimestamp(getdate()); 

$phoneArgs = new ActivityPhoneContact();
$phoneArgs->setCidPhoneNumber('1234567890');
$phoneArgs->setDurationSeconds(367)
$phoneArgs->setType('FromCustomerToMerchant');
$phoneArgs=>setNote('Customer agreed to be rebilled for services');

$typeArgs->setPhoneArgs($phoneArgs);

// associate typeArgs to the Activity object
$activity->setActivityArgs($typeArgs);

// now record the data
$response = $activity->record(array($activity));

if($response['returnCode'] == 200) {
   print "ok\n"; # 200 is HTTP status code for success
}
```

**Parent topic:**[Activity Method](../topics/Activity_Method)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.