Workflow to relate Contacts to Opportunities on import?

Hello suiteCRM community!

Noob at AOW here looking for some help. I am getting ready to do a huge import of two different types of records: several thousand basic Contacts, and a similar number of Opportunities. Each Opportunity subject field will contain the first and last name of a contact (contact name + product concatenated).

I am trying to think of a way to automatically relate each Contact to its matching Opportunity without a human having to manually associate the two records. Something like:

Run on new contact “John Smith” → modify opportunity record to create relationship IF opportunity subject field contains string “John Smith”

Maybe this is something fairly simple, but I am lost-- any help would be greatly appreciated.

Thanks!

Unfortunately it is not possible to automate such a task via AOW, instead you may need to implement a Logic Hook after_save on Opportunities, in order to grab from its name the Contact name, look up that Contact and, finally, relate both.

1 Like