Use Case for Processing Incoming Leads/Offers
We work as affiliates for many different companies (Amazon, Walmart, etc), which means working directly with them or through affiliate managers (Commission Junction, Sharasale, Linkshare, etc). While we work with the companies directly if they have APIs, many often don’t, and/or they might move from direct relationships to working through something like CJ.
So, we have leads that come in from various sources that could be talking about the same vendor. The first thing we’d do is try to assign the correct company(s) to the email, which often would require inspecting the body of the email. This could be leveraged to better sort the messages in the order they should be worked because we have different commission rates per vendor.
Then, the next step is often to try to turn the offers into something closer to what we could list on our site. We would essentially be trying to extract as much product information as possible, which would be implemented as a separate Type. We need an affiliate link, the price, discount, brand, product name, etc. The nice thing of considering fibery for this use case is we could add more data externally via the API and/or by requesting more data during key events as more data is extracted from the emails. Finally, we have people that would process the inbox and fill in the missing pieces and publishing content to our site as needed (we’d trigger an API call when certain conditions are met).
Functions to Help Process Email Messages
So, in the end, I think the most powerful thing to enable would be just running regex on the rich text. More generally, any text field could potentially be useful here. I could see maybe auto-relating entities based on a URL or specific term or something that exists in the rich text as a more automated way of getting to what I’d be doing, but simply enabling regex would be a big help to avoid having to write custom scripts each time. I could also see maybe some output where it removes all the formatting except for basic text, to simplify any text searches. I haven’t looked to deeply into the recent rules changes, but what often makes it difficult to use is when looping. For example, you might have a regex that extracts all links from the body of an email. You would then have an array of links that you are looping over and potentially creating a new entity related to the email for each one of them.
Now, I could see the argument that if labels/folders came through in a separate type, you could manage the filters within the email client, but I’m not 100% sure that would solve all the needs (wouldn’t solve @v3j’s non-email use case for example) without getting into it more.
Operations/function to help process email messages:
- Regex (most important)
- Other string operations