Activity.record
Web Session Object
Transaction Object
Token Object
Season Set Object
Refund Object
RatePlan Object
Product Object
Payment Provider Object
Payment Method Object
NameValuePair Object
GiftCard Object
Entitlement Object
Chargeback Object
Campaign Object
BillingPlan Object
AutoBill Object
Address Object
Activity Object
Account Object
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.
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 Standard Return Codes, this call returns:
Return Code |
Return String |
400 |
One of the following:
|
// 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
}
For Users
Learn More