The reason why I am thinking we need a many to many custom object structure is because one Sales Rep can have many leads. That means we would probably require a bridge object to link leads and agents:
The question is how do we update this bridge object when a new lead is entered by the Sales Rep via a Marketo form? Is it possible to publish a record into a Custom Object on a form submit?
Also, instead of using an Agent Object, could we import the Agents contact info into people database and then link the AgentID field in the bridge object directly to the Agent record in the people database. In other words, the bridge object would connect two types of persons - a Lead and an Agent:
Would that work?
You don't necessarily need a Custom Object at all. What is the nature of the reporting you aim to do on the Agents? Is there a prohibitive reason why (like in the typical Referral Form pattern) you can't maintain a simple list of the Agent's Leads in a Textarea field on the Agent, and link back to to the Agent via an Email field on the Lead?
Is it possible to publish a record into a Custom Object on a form submit?
Not directly, no. It's possible to manage COs using a webhook but I would caution against using this method in quantity (you will use a couple of API calls for every form post).
When the Sales Reps create a new lead through the form they would assign it to themselves by entering their Agent ID on the form.
It isn't necessary (or actually feasible) for the Agent ID to be used in this way, because Marketo won't look up based on this custom field. Instead, just let the form submit as usual, in the context of the Agent (you can display their Agent ID field if you want, but it's not a dedupe key).
I agree with you that this can be achieved without the Custom Object. Here is what I am thinking we could do.
Every time a new lead is created by the Agent, the form submits the Agent contact info into the designated Agent fields (Agent Email Address, Agent First Name, Agent Last name, Agent Phone etc.) When Agents fill out the form, we don't want them to enter their contact info into these fields each time (a. to make the process quick for them, b. to avoid typos). These fields should be pre-filled for them and either hidden or displayed but not editable (using rich text and tokens). The values for these fields will probably be embedded in the personalized link accessed by Agents from our site.
This would enable the 1st part of the program. For the 2nd part (the lead fills out another form and the response goes to the Agent), yes, we could theoretically use your Post-Map-Repost method and the lead's email would be posted on the Agent record. The question is how would Marketo email the Agent only when the lead fills out a form? In order to send the email to the Agent, Marketo has to use a filter or a trigger associated with the Agent activity or some changes on the Agent record. But the lead activity (e.g. filling out a form) doesn't change anything in the Agent record or doesn't create any events in the Agent activity log... unless we program that lead form so that it does Post-Map-Repost into the Agent's record somehow. Is this something you had in mind?
I was also thinking of using Send Alert to Sales Owner instead. The alert would come from some generic mailbox (not from the lead), which is fine. However, Sales Owner is assigned by CRM and we don't have CRM... It appears that currently in out instance we can't modify Sales Owner either through the form or a Change Data Value flow step. Would this be smth that Marketo Support could enable for us?
I think this seems pretty straight forward, unless I'm underthinking it.
I'd probably do it something like this.
Create a segmentation called Agent, with the Agent ID field corresponding to whether someone falls into Agent 1, Agent 2 etc..
Create an internal facing landing page that your sales person completes. They put the lead's contact details into the form, including the email address, and put their agent ID into the Agent ID field. This creates a new lead and the lead is assigned into the correct segment.
A fills out form campaign picks up this new lead and emails them. The email content is segmented based upon the agent ID.. for Agent 1, the email looks like it comes from Agent 1 etc.
I assume you're trying to avoid having 5 different fields inefficiently listed against each record which stores the agent contact details, in which case the above is your answer. Otherwise this is the most straight forward approach.
The problem is we have over 500 Sales Reps. Using the approach you suggested would require creation of over 500 versions of dynamic content which is not feasable