SugarCRM 的定制导入器——我应该扩展还是从头开始?

发布于 2024-11-09 14:17:15 字数 1081 浏览 2 评论 0原文

我有一位客户想要定制进口商。数据源是一个xls文件,数据是线索和相关调用的组合。例如:

Name  |  Phone Number  |        email  |  date last called |  call notes
  Joe |   555-555-5555 | [email protected] |        2011-01-01 | Sounded interested.

因此,对于最后两个数据导入,我添加了一个名为“import_id”的字段,其中包含随机 guid,将文件保存为 csv,使用线索导入器导入线索,导出线索,以便我可以拥有 Sugar guid ,使用 Excel 将 import_id 与 Sugar GUID 进行匹配,然后导入具有相关潜在客户 ID 的呼叫。

现在,客户希望可以通过 UI 执行某些操作。我不确定我是否应该从头开始制作一些模拟糖导入模块的东西,或者我是否应该尝试创建一个扩展导入模块的自定义导入器。

如果我从头开始进行某些操作,缺点是:

  1. 我重复了导入模块视图中已有的大量代码(特别是字段映射和重复检查/合并)。

  2. 我必须从头开始。

如果我尝试扩展导入模块,我会遇到以下问题:

  1. 我必须解决缺乏 xls 导入支持的问题。

  2. 由于我导入到两个不同的模块,一些库存参数(返回模块等)我不清楚。

  3. 我不确定它是否与从头开始几乎相同,因为我几乎在每一步都扩展导入器。

基本上,我不确定导入模块是否真的要扩展/定制,以及这是否在典型定制的范围内,从一个导入器导入两个模块的想法是否比它的价值更麻烦。

创建一个入口点会容易得多,该入口点只是逐行创建引导,然后通过 Bean 进行相关调用,但是源数据标头在文件之间不一致,所以我想利用导入模块的字段映射(步骤 3)。

非常感谢任何建议或警告。

I have a client that wants a custom importer. The data source is an xls file, and the data is a combination of leads and related calls. Something like:

Name  |  Phone Number  |        email  |  date last called |  call notes
  Joe |   555-555-5555 | [email protected] |        2011-01-01 | Sounded interested.

So, for the last two data imports, I added a field called "import_id" with a random guid, saved the file as a csv, imported the leads using the leads importer, exported the leads so I could have the Sugar guid, used Excel to match up the import_id with the Sugar GUID, then imported the calls with the related lead id.

Now the client wants something they can do through the UI. I'm not sure if I should just make something from scratch that emulates the sugar import module, or if I should try to create a custom importer extending the Import module.

If I go with something from scratch the drawbacks are:

  1. I repeat a lot of the code already in the import module views (specifically the field mapping and duplicate checking/merging).

  2. I have to do it all from scratch.

If I try to extend the Import module, I have these issues:

  1. I'd have to deal with the lack of xls import support.

  2. Since I'm importing to two different modules, some stock parameters (return module, etc) are not clear to me.

  3. I'm not sure if it's almost the same as starting from scratch, since I'd be extending the Importer at almost every step.

Basically, I'm not sure if the Import module is really meant to be extended/customized and if this is within the scope of a typical customization, if the idea of importing to two modules from one importer is more trouble than it's worth.

It would be a lot easier to create an entry point that just goes row by row and creates the lead and then the related call via the Bean, but the source data headers are not consistent file to file, so I want to make use of the field map (Step 3) of the Import module.

Any advice or warnings are very appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最大的问题是需要 xls 支持,这需要对导入模块进行大量更改才能添加。如果您可以让他们将文件保存为 CSV,您可能可以使用开箱即用的 stock 导入工具,并将相关模块中的字段添加为非数据库字段,然后添加一个 bean 方法 beforeImportSave() 来创建相关模块中所需的字段。

您可能还想查看 Talend 的工具,因为它们非常容易处理这个问题,但由于您的问题非常简单,我认为您可以构建一个自定义视图来直接处理导入文件。

The big issue is the requirement of xls support, which would require extensive changes to the Import module to add. If you can have them save the files as CSV, you could probably use the stock import tool out of the box, and add the fields from the related module in as non-db field, and then add a bean method beforeImportSave() to create the needed field in the related module.

You may want to look at tools from Talend as well since they handle this problem very easily, but since you problems are very simple I think you could build a custom view to handle the import file directly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文