Forum Discussion

gwomacks's avatar
2 years ago

Associating a contact with a company/debtor

Heya all,

 

Currently using the MYOB EXO API to create contacts using the api documentation here.
That's working fine.

 

However, I've yet to be able to find a way to associate the contact with a specific company (a debtor, in my case). I tried the fields to set their default company, but that seems to be a different concept.

 

The debtor api docs (here) mentions it's possible to delete an association between a contact and a debtor using a DELETE call. Is it possible to create this association using the EXO API?

Thanks.

4 Replies

Replies have been turned off for this discussion
  • Will_H's avatar
    Will_H
    MYOB Moderator

    Hi gwomacks ,

    I believe this should be possible by specifying the 

    DefaultCompanyId
    On an update/create request for a contact, as this _should_ swap the company the contact is assigned to the new one. 
     
    Let me know how the above gets on.  I don't have a specific example of this in my postman collection currently.
     
    Note: If you want to manage full multi-entity relationship mapping (Which Exo Business can do) then the API does not have that level of smarts, in that case you would need to either set up some kind of database trigger on an extra field, or a custom table with logic (trigger, or stored procedure called somehow) to create the relevant links for you.
     
    • gwomacks's avatar
      gwomacks
      User

      Thanks Will. As mentioned in the post, I've tried setting the default company, but this seems to be an entirely different concept. For example, after setting the default company, the contact won't show up when listing that debtor's contacts.

      • Sean_DC's avatar
        Sean_DC
        MYOB Moderator

        Hi gwomacks 


        If you still need further help with any API error/integration related queries, we also recommend raising a support request via the following link: https://apisupport.myob.com/hc/en-us/requests/new

         

         

        Please feel free to post again. I'm happy to assist further.

         

        If my response has answered your enquiry please click "Accept as Solution" to assist other users in finding this information.