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

# Get a contact through the services layer

> How to get a Contact through Services layer.

This is an alternative to retrieving a `Contact` entity [through the entities layer][1].

The following example shows how it is done.

## Code

```csharp theme={null}
using SuperOffice.CRM.Services;
using SuperOffice;
using(SoSession mySession = SoSession.Authenticate("SAL0", ""))
{
  //Create a Contact Agent
  ContactAgent myContactAgent = new ContactAgent();

  //Get a Contact Entity through the Contact Agent
  Contact myContact = myContactAgent.GetContact(4);

  //Retrieving the Name Property of the Contact
  string name = myContact.Name;
}
```

## Walk-through

First, you need to create a `ContactAgent`. Then we can retrieve a `Contact` entity carrier by passing the `Contact_id` to the `GetContact` method. At this moment, all the properties of this particular contact will be passed to memory from the database. Now you can access all the properties of this contact via this newly created `Contact` carrier.

[1]: ../../../entities/howto/company/get-contact-via-entities-layer


## Related topics

- [How to add members to a static selection using entities layer](/en/api/search/selection/entity/add-member-to-static-selection-entities.md)
- [Working with companies in API](/en/company/dev/index.md)
- [How to link a sale to a follow-up (services)](/en/api/web-services/howto/sale/link-sale-to-appointment.md)
- [How to accept an invitation (services)](/en/api/web-services/howto/diary/accept-invitation-services.md)
- [Retrieving list of persons with ContactAgent](/en/api/web-services/howto/contact/get-persons-contactagent.md)
- [Update a person with a new name, address, position using services](/en/api/web-services/howto/contact/update-person-services.md)
