# Retrieve company name from pbx integration

**URL:** <https://community.zammad.org/t/retrieve-company-name-from-pbx-integration/3404>\
**Category:** Technical assistance\
**Created:** [November 8, 2019, 3:14pm UTC](https://community.zammad.org/t/retrieve-company-name-from-pbx-integration/3404 "2019-11-08T15:14:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![THordijk](https://community.zammad.org/letter_avatar_proxy/v4/letter/t/d07c76/32.png) [@THordijk](https://community.zammad.org/u/THordijk)\
**Post date:** [November 8, 2019, 3:14pm UTC](https://community.zammad.org/t/retrieve-company-name-from-pbx-integration/3404/1 "2019-11-08T15:14:51Z")

</div>

### Infos:

- Used Zammad version: 3.1
- Used Zammad installation source: package
- Operating system: windows
- Browser + version: Mozilla firefox

### Expected behavior:

- I integrated zammad with our 3CX system, when a person calls that is registered in the ticketsystem 3CX should save the contact info: firstname, lastname, company name and phone number

### Actual behavior:

- Instead of the company name the company id is copied, a numeric value. this is correct, because that is the field that i refer to.

When looking at the url where the information is retrieved [http://tickets.riwo.eu/api/v1/users/search?query=\*[Number]](http://tickets.riwo.eu/api/v1/users/search?query=*%5BNumber%5D) there is no field that states company name. Is this something that is retrieved through a setting, or would this be a feature request, instead of technical assistance?

---

<div class="post-metadata">

**Author:** ![MrGeneration](https://community.zammad.org/user_avatar/community.zammad.org/mrgeneration/32/9260_2.png) [@MrGeneration](https://community.zammad.org/u/MrGeneration)\
**Post date:** [November 8, 2019, 4:27pm UTC](https://community.zammad.org/t/retrieve-company-name-from-pbx-integration/3404/2 "2019-11-08T16:27:02Z")

</div>

> [@THordijk](#):
>
> When looking at the url where the information is retrieved [http://tickets.riwo.eu/api/v1/users/search?query=\*[Number]](http://tickets.riwo.eu/api/v1/users/search?query=*%5BNumber%5D) there is no field that states company name. Is this something that is retrieved through a setting, or would this be a feature request, instead of technical assistance?

What you’re looking for is `organization_id` which is a user attribute.  
I suppose that this behaviour is a bit unexpected for you, but technically correct, as the WebApp does retrieve the user and organization by its ID.

So technically you might need to fetch the organization name in a second request.

---

<div class="post-metadata">

**Author:** ![THordijk](https://community.zammad.org/letter_avatar_proxy/v4/letter/t/d07c76/32.png) [@THordijk](https://community.zammad.org/u/THordijk)\
**Post date:** [November 11, 2019, 9:55am UTC](https://community.zammad.org/t/retrieve-company-name-from-pbx-integration/3404/3 "2019-11-11T09:55:57Z")

</div>

Yes, the organization\_id is indeed retrieved, which is a number. This is then used as the company name. The company name is not stated in the database page so from where could this be fetched?

 ![Top_databasepage](https://community.zammad.org/uploads/default/original/2X/6/6113d8101acacac84976401fc381dca03d98a590.png)  
 ![Middle_databasepage](https://community.zammad.org/uploads/default/original/2X/9/9a8b9323b578b6721f7140083990fa1cb2c2694a.png)  
 ![Bottom_databasepage](https://community.zammad.org/uploads/default/original/2X/9/99e6aa86df90418c3af4ff00fedbbb9e17ea62e0.png)

---

<div class="post-metadata">

**Author:** ![MrGeneration](https://community.zammad.org/user_avatar/community.zammad.org/mrgeneration/32/9260_2.png) [@MrGeneration](https://community.zammad.org/u/MrGeneration)\
**Post date:** [November 11, 2019, 10:37am UTC](https://community.zammad.org/t/retrieve-company-name-from-pbx-integration/3404/4 "2019-11-11T10:37:26Z")

</div>

> [@THordijk](#):
>
> The company name is not stated in the database page so from where could this be fetched?

Well, that’d be the Organizations endpoint:

`/api/v1/organizations/{id}`

[https://docs.zammad.org/en/latest/api-organization.html#show](https://docs.zammad.org/en/latest/api-organization.html#show)

---

<div class="post-metadata">

**Author:** ![THordijk](https://community.zammad.org/letter_avatar_proxy/v4/letter/t/d07c76/32.png) [@THordijk](https://community.zammad.org/u/THordijk)\
**Post date:** [November 11, 2019, 10:49am UTC](https://community.zammad.org/t/retrieve-company-name-from-pbx-integration/3404/5 "2019-11-11T10:49:12Z")

</div>

Seems reasonable 😅, I will give it a try!

---

<div class="post-metadata">

**Author:** ![system](https://community.zammad.org/uploads/default/original/1X/5c5afaea2d23f811dbec33cd4edb02fa29d3262f.png) [@system](https://community.zammad.org/u/system)\
**Post date:** [March 10, 2020, 10:49am UTC](https://community.zammad.org/t/retrieve-company-name-from-pbx-integration/3404/6 "2020-03-10T10:49:16Z")

</div>

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.
