# AccountCreditPlugin

## Program ID

MetraPipeline.AccountCreditPlugin.1

## Description

Used to meter account credit. Does following before WriteProductView is executed:

- Looks if status field is correct (should be either APPROVED or DENIED).

- If this credit is based on a previous request (RequestID > 0), update a record in AccountCreditRequest product view to have a correct status and credit amount.

- Returns after execution.

Note: | The RequestID property should be metered as -1 if this credit is not based on a previous request (see AccountCreditRequest). The Auto property should always be metered as 'N'. The only place this is set to 'Y' is in the AccountCreditRequest plug-in.

## Required Input Properties

Tag name | Value type | Description
Auto | String | Auto flag – Y if this credit is automatically approved
Status | String | APPROVED or DENIED
RequestID | Long | If credit is request-based – request session ID
CreditAmount | decimal | Actual Credit Amount

## Required Output Properties

Tag name | Value type | Description
ReturnCode | long | 0 or Error Code

## Additional Configuration Tags

None.

## Configuration Example

<configdata>
<Auto>Auto</Auto>
<Status>Status</Status>
<RequestID>RequestID</RequestID>
<ReturnCode>ReturnCode</ReturnCode>
<CreditAmount>CreditAmount</CreditAmount>
</configdata>