# Stakeholder Transactions

{% hint style="warning" %}
**Limited Support/End of Life Capabilities**

The Classic API has been replaced by the Alemba RestFul API.  While we will continue to support the Classic API for clients that are still using it, no further development will be done.

If you need to request a hotfix or support for these features, please contact [<mark style="color:blue;">**Alemba Support**</mark>](https://alemba.help/production/Portal.aspx)
{% endhint %}

ASM has two Application Programming Interfaces (or APIs), which enable you to develop programs that automate many common ASM transactions. This section of the documentation deals with the Classic API.

Stakeholder transactions include transactions for creating, updating, deleting and retrieving stakeholders. Transactions for emailing stakeholders are also available. You can specify whether you want to email all or selected stakeholders, as well as the email template to use.

For more information on messaging Stakeholders, see MessageStakeHolders Transaction.

### StakeholderCreate Transaction

The StakeholderCreate transaction can be used to create a User, organization, Analyst, IPK group or Workflow group stakeholder for a call, Request or an entity in the CMDB.

#### Input Parameters: StakeholderCreateRequest

| Argument           | Type         | Mandatory                  | Default                        | Description                                                                                                                                                                                                                                       |
| ------------------ | ------------ | -------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sID                | String       | No. See Transaction Login. | “”                             | Analyst’s current Session ID                                                                                                                                                                                                                      |
| sLoginUserID       | String       | No. See Transaction Login. | “”                             | Analyst’s Login ID                                                                                                                                                                                                                                |
| sLoginPassword     | String       | No. See Transaction Login. | “”                             | Analyst’s Password                                                                                                                                                                                                                                |
| sDatabase          | String       | No. See Transaction Login. | “”                             | Name of the ASM System for logging in.                                                                                                                                                                                                            |
| lEntityRef         | Lookup Field | Ignored                    | -                              | Ignored on create                                                                                                                                                                                                                                 |
| lCoreEntity        | Lookup Field | Yes                        | -                              | Reference number of the entity (Call, Request, Task, CMDB item, etc.) to which to add a stakeholder.                                                                                                                                              |
| eCoreEntityType    | Enumerated   | Yes                        | -                              | <p>Entity to which to add a stakeholder. Values:</p><ul><li>Call</li><li>Request</li><li>CMDB item</li><li>Person</li><li>Organization</li><li>Contract</li><li>Agreement</li><li>Location</li><li>Subscriber Group</li><li>Cost Center</li></ul> |
| lStakeholderEntity | Lookup Field | Yes                        | -                              | Ref of the entity to which to link as a stakeholder                                                                                                                                                                                               |
| eStakeholderType   | Enumerated   | Yes                        |                                | <p>Type of stakeholder to add to the entity. Values:</p><ul><li>Person</li><li>Organization</li><li>IPK Group</li><li>Workflow Group</li></ul>                                                                                                    |
| lLinkTypeRef       | Lookup Field | No                         | Default link type for the item | Stakeholder Link Type. If lookup fails, default will be 23 (Stakeholder Link Type reference number)                                                                                                                                               |
| sReason            | String       | No                         | “”                             | Audit reason                                                                                                                                                                                                                                      |
| aCustomParameters  | Array        | No                         | “”                             | See Defining Custom Parameters.                                                                                                                                                                                                                   |

#### Return Values:StakeholderResponse <a href="#stakeholderresponse" id="stakeholderresponse"></a>

| Argument   | Type      | Description                    |
| ---------- | --------- | ------------------------------ |
| nEntityRef | Integer   | Newly created stakeholder link |
| sMessage   | String    | Error/Warning Message          |
| Ret        | APIReturn | Error/Warning Number           |

### StakeholderUpdate Transaction

The StakeholderUpdate transaction can be used to update the link type of a stakeholder link.

#### Input Parameters: StakeholderUpdateRequest

| Argument           | Type         | Mandatory                  | Default | Description                                                                                                                                                                                                                                       |
| ------------------ | ------------ | -------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sID                | String       | No. See Transaction Login. | “”      | Analyst’s current Session ID                                                                                                                                                                                                                      |
| sLoginUserID       | String       | No. See Transaction Login. | “”      | Analyst’s Login ID                                                                                                                                                                                                                                |
| sLoginPassword     | String       | No. See Transaction Login. | “”      | Analyst’s Password                                                                                                                                                                                                                                |
| sDatabase          | String       | No. See Transaction Login. | “”      | Name of the ASM System for logging in.                                                                                                                                                                                                            |
| lEntityRef         | Lookup Field | Yes                        | -       | Reference number of the Stakeholder link to update                                                                                                                                                                                                |
| lCoreEntity        | Lookup Field | No                         | (As is) | Reference number of the entity (Call, Request, Task, CMDB item, etc.) to which to add a stakeholder.                                                                                                                                              |
| eCoreEntityType    | Enumerated   | No                         | (As is) | <p>Entity to which to add a stakeholder. Values:</p><ul><li>Call</li><li>Request</li><li>CMDB item</li><li>Person</li><li>Organization</li><li>Contract</li><li>Agreement</li><li>Location</li><li>Subscriber Group</li><li>Cost Center</li></ul> |
| lStakeholderEntity | Lookup Field | No                         | (As is) | Reference number of the stakeholder to add to this entity                                                                                                                                                                                         |
| eStakeholderType   | Enumerated   | No                         | (As is) | <p>Type of stakeholder to add to the entity. Values:</p><ul><li>Person stakeholder</li><li>Organization stakeholder</li><li>IPK Group stakeholder</li><li>Workflow Group stakeholder</li></ul>                                                    |
| lLinkTypeRef       | Lookup Field | No                         | (As is) | Stakeholder Link Type. If lookup fails, default will be 23 (the Stakeholder Link Type entity reference number)                                                                                                                                    |
| sReason            | String       | No                         | “”      | Audit reason                                                                                                                                                                                                                                      |
| aCustomParameters  | Array        | No                         | “”      | See Defining Custom Parameters.                                                                                                                                                                                                                   |

#### Return Values: StakeholderResponse

See StakeholderResponse for more information.

### StakeholderRetrieve Transaction

The StakeholderRetrieve transaction can be used to retrieve the details of a stakeholder record.

#### Input Parameters: StakeholderEntityRequest

| Argument          | Type         | Mandatory                  | Default | Description                            |
| ----------------- | ------------ | -------------------------- | ------- | -------------------------------------- |
| sID               | String       | No. See Transaction Login. | “”      | Analyst’s current Session ID           |
| sLoginUserID      | String       | No. See Transaction Login. | “”      | Analyst’s Login ID                     |
| sLoginPassword    | String       | No. See Transaction Login. | “”      | Analyst’s Password                     |
| sDatabase         | String       | No. See Transaction Login. | “”      | Name of the ASM System for logging in. |
| lEntityRef        | Lookup Field | Yes                        | -       | Stakeholder link to update             |
| aCustomParameters | Array        | No                         | “”      | See Defining Custom Parameters.        |

#### Return Values: StakeholderRetrieveResponse

| Argument  | Type      | Description                            |
| --------- | --------- | -------------------------------------- |
| Ret       | APIReturn | Error/Warning number                   |
| sMessage  | String    | Error/Warning message                  |
| ResultSet | DataSet   | ResultSet containing attribute details |

### StakeholderDelete Transaction

The StakeholderDelete transaction can be used to delete a stakeholder.

#### Input Parameters: StakeholderDeleteRequest

| Argument          | Type         | Mandatory                  | Default | Description                            |
| ----------------- | ------------ | -------------------------- | ------- | -------------------------------------- |
| sID               | String       | No. See Transaction Login. | “”      | Analyst’s current Session ID           |
| sLoginUserID      | String       | No. See Transaction Login. | “”      | Analyst’s Login ID                     |
| sLoginPassword    | String       | No. See Transaction Login. | “”      | Analyst’s Password                     |
| sDatabase         | String       | No. See Transaction Login. | “”      | Name of the ASM System for logging in. |
| lEntityRef        | Lookup Field | Yes                        | -       | Stakeholder link to update             |
| sReason           | String       | No                         | “”      | Audit reason                           |
| aCustomParameters | Array        | No                         | “”      | See Defining Custom Parameters.        |

#### Return Values: StakeholderResponse

See StakeholderResponse for more information.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.alemba.com/asm-hermes/setup-and-configure-asm/faq/limited-support-end-of-life-capabilities/alemba-classic-api/api-transactions/system-transactions/stakeholder-transactions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
