Multiple company membership

marc's Avatar

marc

12 Aug, 2015 12:58 PM

Am I correct in thinking that an individual user may only be a member of one company? We have a many-to-many relationship between users and companies in our system and we'd like to match that in our Tender. Is that possible?

A few other related questions: Can a company be created via the API? If so, can the notifications be set to "on" by default via the API for a a company?

  1. 1 Posted by Nicole on 12 Aug, 2015 02:55 PM

    Nicole's Avatar

    Yes, a user may only be part of a single company so what you're wanting to do wouldn't be possible.

    Companies can be created via API - https://help.tenderapp.com/kb/api/companies - but users are assigned to the company via User API - https://help.tenderapp.com/kb/api/users. Once they are assigned to a company they are a watcher on ALL discussions belonging to ANY other member of that company and their user profile settings control the notifications they would receive.

    Let us know if you have other questions.

    Thanks,
    Nicole

  2. 2 Posted by marc on 12 Aug, 2015 04:22 PM

    marc's Avatar

    Yes, a user may only be part of a single company so what you're wanting to do wouldn't be possible.

    That's too bad. It's a significant limitation from our perspective.

    Companies can be created via API - https://help.tenderapp.com/kb/api/companies

    This document does not include how to create a company, only getting a list and a single company. Am I to assume that including a Content-Type: application/json header and a json body with only the name param is how a company would be created? Any other available params?

    but users are assigned to the company via User API - https://help.tenderapp.com/kb/api/users.

    While it is mentioned in the Companies API doc, the company_id is not listed on the Users doc.

    Once they are assigned to a company they are a watcher on ALL discussions belonging to ANY other member of that company and their user profile settings control the notifications they would receive.

    I think this is only true if the company's notifications_default setting (undocumented) is true.

    So, I think the answer to my question is that the notifications_default param set to true instead of the default false is how this would be achieved. Is that correct?

  3. 3 Posted by Nicole on 12 Aug, 2015 04:58 PM

    Nicole's Avatar

    Marc -

    Sorry, while it's not documented, your basic POST to create a new company will work. You can set the name and permalink_name, though permalink_name will default to name if you don't sent a value for it.

    We mention it as company_name in the User docs and I'll make that correction. I'll also add the notification_default setting to Company docs as well. You are correct, if you set that to true then users will receive notifications for all company discussions by default, but each user can still turn notifications on or off on their profile.

    Thanks,
    Nicole

  4. Support Staff 4 Posted by Courtenay on 12 Aug, 2015 05:42 PM

    Courtenay's Avatar

    Hi Marc,

    - if you're using SSO, you can create and/or assign a company with the `company_name` parameter.
    - the permalink is not assignable over the api.
    - notifications_default should be defaulting to `true`
    - users can override the notification in their profile by setting company notifications to 'off'. The override will only work if they have no setting.

  5. 5 Posted by marc on 14 Aug, 2015 03:50 PM

    marc's Avatar

    Thanks guys

    • if you're using SSO, you can create and/or assign a company with the company_name parameter.

    Sounds fragile. What if the company name changes? It would be more reliable with company_id instead, right? On that topic, a company_external_id would be quite useful.

    The override will only work if they have no setting.

    I'm not sure I understand this.

  6. Support Staff 6 Posted by Courtenay on 19 Aug, 2015 05:28 PM

    Courtenay's Avatar

    Well, you're being an architecture albatross now! :D

    With SSO, it must be a one-shot payload that is always accepted, so we accept company name to make it super simple. It's up to "you", aka the service to keep a track of external IDs and tender company IDs and names.

    Users have a "nil" for company email preference by default. This means they don't know/care. In this case it reverts to the company's setting (notifications_default) which is generally "on". If they manually enable the company mail, that's cool and will actually override whatever the company settings are, but if they then disable it, it's forced off, because now they're considered to have a preference. Clear as mud!

  7. Nicole closed this discussion on 26 Aug, 2015 08:12 PM.

Discussions are closed to public comments.
If you need help with Tender please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac