@aglyn/plugins-crm 1.0.0-beta.221 → 1.0.0-beta.223
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/package.json +13 -13
- package/src/lib/components/activity-list.js +12 -5
- package/src/lib/components/activity-list.js.map +1 -1
- package/src/lib/components/companies-bulk-bar.d.ts +1 -4
- package/src/lib/components/companies-bulk-bar.js +7 -20
- package/src/lib/components/companies-bulk-bar.js.map +1 -1
- package/src/lib/components/companies-section.d.ts +3 -3
- package/src/lib/components/companies-section.js +149 -46
- package/src/lib/components/companies-section.js.map +1 -1
- package/src/lib/components/company-edit-drawer.js +281 -20
- package/src/lib/components/company-edit-drawer.js.map +1 -1
- package/src/lib/components/company-properties-card.js +99 -8
- package/src/lib/components/company-properties-card.js.map +1 -1
- package/src/lib/components/contact-detail-page.js +3 -1
- package/src/lib/components/contact-detail-page.js.map +1 -1
- package/src/lib/components/contact-merge-dialog.js +33 -10
- package/src/lib/components/contact-merge-dialog.js.map +1 -1
- package/src/lib/components/contact-properties-card.d.ts +0 -69
- package/src/lib/components/contact-properties-card.js +350 -60
- package/src/lib/components/contact-properties-card.js.map +1 -1
- package/src/lib/components/contact-reports-to-field.d.ts +46 -0
- package/src/lib/components/contact-reports-to-field.js +67 -0
- package/src/lib/components/contact-reports-to-field.js.map +1 -0
- package/src/lib/components/contacts-bulk-bar.d.ts +1 -8
- package/src/lib/components/contacts-bulk-bar.js +7 -19
- package/src/lib/components/contacts-bulk-bar.js.map +1 -1
- package/src/lib/components/contacts-section.js +46 -33
- package/src/lib/components/contacts-section.js.map +1 -1
- package/src/lib/components/crm-call-actions.d.ts +10 -0
- package/src/lib/components/crm-call-actions.js +26 -9
- package/src/lib/components/crm-call-actions.js.map +1 -1
- package/src/lib/components/crm-next-activity-column.js +1 -1
- package/src/lib/components/crm-next-activity-column.js.map +1 -1
- package/src/lib/components/crm-record-picker.d.ts +15 -0
- package/src/lib/components/crm-record-picker.js +16 -10
- package/src/lib/components/crm-record-picker.js.map +1 -1
- package/src/lib/components/crm-transfer-buttons.d.ts +54 -0
- package/src/lib/components/crm-transfer-buttons.js +167 -0
- package/src/lib/components/crm-transfer-buttons.js.map +1 -0
- package/src/lib/components/deal-contact-roles-card.d.ts +46 -0
- package/src/lib/components/deal-contact-roles-card.js +368 -0
- package/src/lib/components/deal-contact-roles-card.js.map +1 -0
- package/src/lib/components/deal-detail-page.d.ts +3 -2
- package/src/lib/components/deal-detail-page.js +25 -6
- package/src/lib/components/deal-detail-page.js.map +1 -1
- package/src/lib/components/deal-edit-drawer.d.ts +10 -0
- package/src/lib/components/deal-edit-drawer.js +219 -10
- package/src/lib/components/deal-edit-drawer.js.map +1 -1
- package/src/lib/components/deal-properties-card.d.ts +7 -0
- package/src/lib/components/deal-properties-card.js +34 -3
- package/src/lib/components/deal-properties-card.js.map +1 -1
- package/src/lib/components/deal-stage-card.d.ts +4 -0
- package/src/lib/components/deal-stage-card.js +10 -2
- package/src/lib/components/deal-stage-card.js.map +1 -1
- package/src/lib/components/deals-bulk-bar.d.ts +0 -3
- package/src/lib/components/deals-bulk-bar.js +7 -20
- package/src/lib/components/deals-bulk-bar.js.map +1 -1
- package/src/lib/components/deals-section.d.ts +3 -3
- package/src/lib/components/deals-section.js +123 -63
- package/src/lib/components/deals-section.js.map +1 -1
- package/src/lib/components/fields-section.js +31 -17
- package/src/lib/components/fields-section.js.map +1 -1
- package/src/lib/components/lead-convert-dialog.d.ts +4 -0
- package/src/lib/components/lead-convert-dialog.js +23 -1
- package/src/lib/components/lead-convert-dialog.js.map +1 -1
- package/src/lib/components/lead-detail-page.js +8 -2
- package/src/lib/components/lead-detail-page.js.map +1 -1
- package/src/lib/components/lead-profile-fields.d.ts +71 -0
- package/src/lib/components/lead-profile-fields.js +386 -0
- package/src/lib/components/lead-profile-fields.js.map +1 -0
- package/src/lib/components/lead-properties-card.d.ts +2 -1
- package/src/lib/components/lead-properties-card.js +85 -176
- package/src/lib/components/lead-properties-card.js.map +1 -1
- package/src/lib/components/lead-source-select.d.ts +4 -23
- package/src/lib/components/lead-source-select.js +9 -73
- package/src/lib/components/lead-source-select.js.map +1 -1
- package/src/lib/components/lead-status-chip.d.ts +9 -3
- package/src/lib/components/lead-status-chip.js +8 -4
- package/src/lib/components/lead-status-chip.js.map +1 -1
- package/src/lib/components/lead-status-options.d.ts +20 -0
- package/src/lib/components/lead-status-options.js +51 -0
- package/src/lib/components/lead-status-options.js.map +1 -0
- package/src/lib/components/lead-unqualify-dialog.d.ts +5 -0
- package/src/lib/components/lead-unqualify-dialog.js +50 -18
- package/src/lib/components/lead-unqualify-dialog.js.map +1 -1
- package/src/lib/components/leads-bulk-bar.d.ts +0 -3
- package/src/lib/components/leads-bulk-bar.js +29 -29
- package/src/lib/components/leads-bulk-bar.js.map +1 -1
- package/src/lib/components/leads-section.js +120 -68
- package/src/lib/components/leads-section.js.map +1 -1
- package/src/lib/components/linked-deals-card.d.ts +4 -0
- package/src/lib/components/linked-deals-card.js +47 -3
- package/src/lib/components/linked-deals-card.js.map +1 -1
- package/src/lib/components/log-activity-dialog.js +43 -3
- package/src/lib/components/log-activity-dialog.js.map +1 -1
- package/src/lib/components/new-contact-drawer.d.ts +8 -0
- package/src/lib/components/new-contact-drawer.js +108 -6
- package/src/lib/components/new-contact-drawer.js.map +1 -1
- package/src/lib/components/new-lead-drawer.d.ts +9 -2
- package/src/lib/components/new-lead-drawer.js +88 -121
- package/src/lib/components/new-lead-drawer.js.map +1 -1
- package/src/lib/components/picklist-select.d.ts +36 -0
- package/src/lib/components/picklist-select.js +114 -0
- package/src/lib/components/picklist-select.js.map +1 -0
- package/src/lib/components/picklist-values-card.d.ts +34 -0
- package/src/lib/components/{lead-source-values-card.js → picklist-values-card.js} +241 -58
- package/src/lib/components/picklist-values-card.js.map +1 -0
- package/src/lib/components/pipeline-stages-dialog.d.ts +7 -0
- package/src/lib/components/pipeline-stages-dialog.js +26 -4
- package/src/lib/components/pipeline-stages-dialog.js.map +1 -1
- package/src/lib/components/pipelines-dialog.js +15 -6
- package/src/lib/components/pipelines-dialog.js.map +1 -1
- package/src/lib/components/recent-activity-feed.js +20 -5
- package/src/lib/components/recent-activity-feed.js.map +1 -1
- package/src/lib/components/recipes-card.js +4 -2
- package/src/lib/components/recipes-card.js.map +1 -1
- package/src/lib/components/record-tasks-card.js +15 -8
- package/src/lib/components/record-tasks-card.js.map +1 -1
- package/src/lib/components/reports/forecast-card.d.ts +6 -0
- package/src/lib/components/reports/forecast-card.js +101 -3
- package/src/lib/components/reports/forecast-card.js.map +1 -1
- package/src/lib/components/reports/lead-funnel-card.d.ts +12 -0
- package/src/lib/components/reports/lead-funnel-card.js +9 -5
- package/src/lib/components/reports/lead-funnel-card.js.map +1 -1
- package/src/lib/components/reports/lead-source-card.d.ts +23 -0
- package/src/lib/components/reports/lead-source-card.js +318 -0
- package/src/lib/components/reports/lead-source-card.js.map +1 -0
- package/src/lib/components/reports/pipeline-card.js +2 -1
- package/src/lib/components/reports/pipeline-card.js.map +1 -1
- package/src/lib/components/reports/report-export.js +1 -1
- package/src/lib/components/reports/report-export.js.map +1 -1
- package/src/lib/components/reports-section.js +8 -0
- package/src/lib/components/reports-section.js.map +1 -1
- package/src/lib/components/sharing-rule-drawer.d.ts +5 -0
- package/src/lib/components/sharing-rule-drawer.js +108 -19
- package/src/lib/components/sharing-rule-drawer.js.map +1 -1
- package/src/lib/components/sharing-rules-card.js +11 -3
- package/src/lib/components/sharing-rules-card.js.map +1 -1
- package/src/lib/components/task-cells.d.ts +9 -1
- package/src/lib/components/task-cells.js +9 -4
- package/src/lib/components/task-cells.js.map +1 -1
- package/src/lib/components/task-edit-drawer.js +111 -43
- package/src/lib/components/task-edit-drawer.js.map +1 -1
- package/src/lib/components/tasks-bulk-bar.d.ts +0 -3
- package/src/lib/components/tasks-bulk-bar.js +7 -20
- package/src/lib/components/tasks-bulk-bar.js.map +1 -1
- package/src/lib/components/tasks-calendar.d.ts +3 -0
- package/src/lib/components/tasks-calendar.js +8 -1
- package/src/lib/components/tasks-calendar.js.map +1 -1
- package/src/lib/components/tasks-section.d.ts +3 -3
- package/src/lib/components/tasks-section.js +58 -43
- package/src/lib/components/tasks-section.js.map +1 -1
- package/src/lib/constants/api-routes.d.ts +2 -9
- package/src/lib/constants/api-routes.js +1 -7
- package/src/lib/constants/api-routes.js.map +1 -1
- package/src/lib/constants/bundle-common.d.ts +6 -0
- package/src/lib/constants/bundle-common.js +11 -0
- package/src/lib/constants/bundle-common.js.map +1 -1
- package/src/lib/constants/company-filters.d.ts +14 -0
- package/src/lib/constants/company-filters.js +51 -1
- package/src/lib/constants/company-filters.js.map +1 -1
- package/src/lib/constants/contact-filters.d.ts +2 -0
- package/src/lib/constants/contact-filters.js +18 -1
- package/src/lib/constants/contact-filters.js.map +1 -1
- package/src/lib/constants/deal-filters.d.ts +22 -1
- package/src/lib/constants/deal-filters.js +67 -4
- package/src/lib/constants/deal-filters.js.map +1 -1
- package/src/lib/declarations.console-server.d.ts +3 -0
- package/src/lib/declarations.console-server.js +35 -0
- package/src/lib/declarations.console-server.js.map +1 -1
- package/src/lib/declarations.d.ts +26 -0
- package/src/lib/declarations.js +35 -0
- package/src/lib/declarations.js.map +1 -0
- package/src/lib/declarations.server.d.ts +11 -0
- package/src/lib/declarations.server.js +97 -1
- package/src/lib/declarations.server.js.map +1 -1
- package/src/lib/hooks/use-company-picklists.d.ts +15 -0
- package/src/lib/hooks/use-company-picklists.js +55 -0
- package/src/lib/hooks/use-company-picklists.js.map +1 -0
- package/src/lib/hooks/use-crm-picklist.d.ts +25 -0
- package/src/lib/hooks/use-crm-picklist.js +53 -0
- package/src/lib/hooks/use-crm-picklist.js.map +1 -0
- package/src/lib/hooks/use-crm-record-names.d.ts +16 -0
- package/src/lib/hooks/use-crm-record-names.js +45 -19
- package/src/lib/hooks/use-crm-record-names.js.map +1 -1
- package/src/lib/hooks/use-crm-task-picklists.d.ts +11 -0
- package/src/lib/hooks/use-crm-task-picklists.js +45 -0
- package/src/lib/hooks/use-crm-task-picklists.js.map +1 -0
- package/src/lib/hooks/use-deals.d.ts +14 -0
- package/src/lib/hooks/use-deals.js +29 -0
- package/src/lib/hooks/use-deals.js.map +1 -1
- package/src/lib/hooks/use-lead-picklists.d.ts +14 -0
- package/src/lib/hooks/use-lead-picklists.js +46 -0
- package/src/lib/hooks/use-lead-picklists.js.map +1 -0
- package/src/lib/hooks/use-lead-source-picklist.d.ts +5 -19
- package/src/lib/hooks/use-lead-source-picklist.js +12 -22
- package/src/lib/hooks/use-lead-source-picklist.js.map +1 -1
- package/src/lib/hooks/use-lead-status-picklist.d.ts +9 -0
- package/src/lib/hooks/use-lead-status-picklist.js +40 -0
- package/src/lib/hooks/use-lead-status-picklist.js.map +1 -0
- package/src/lib/model/companies.d.ts +32 -3
- package/src/lib/model/companies.js +133 -16
- package/src/lib/model/companies.js.map +1 -1
- package/src/lib/model/contact-merge.d.ts +27 -3
- package/src/lib/model/contact-merge.js +81 -7
- package/src/lib/model/contact-merge.js.map +1 -1
- package/src/lib/model/contact-record.d.ts +17 -0
- package/src/lib/model/contact-record.js +17 -2
- package/src/lib/model/contact-record.js.map +1 -1
- package/src/lib/model/contact-update.d.ts +31 -2
- package/src/lib/model/contact-update.js +14 -0
- package/src/lib/model/contact-update.js.map +1 -1
- package/src/lib/model/crm-list-query.d.ts +5 -0
- package/src/lib/model/crm-list-query.js +8 -0
- package/src/lib/model/crm-list-query.js.map +1 -1
- package/src/lib/model/crm-next-activity.d.ts +107 -0
- package/src/lib/model/crm-next-activity.js +140 -0
- package/src/lib/model/crm-next-activity.js.map +1 -0
- package/src/lib/model/crm-recipes.d.ts +40 -0
- package/src/lib/model/crm-recipes.js +259 -0
- package/src/lib/model/crm-recipes.js.map +1 -0
- package/src/lib/model/crm-record-counts.d.ts +36 -0
- package/src/lib/model/crm-record-counts.js +54 -0
- package/src/lib/model/crm-record-counts.js.map +1 -0
- package/src/lib/model/crm-record-lists.d.ts +23 -0
- package/src/lib/model/crm-record-lists.js +161 -0
- package/src/lib/model/crm-record-lists.js.map +1 -0
- package/src/lib/model/crm-reports.d.ts +73 -3
- package/src/lib/model/crm-reports.js +120 -1
- package/src/lib/model/crm-reports.js.map +1 -1
- package/src/lib/model/crm-sharing.d.ts +21 -3
- package/src/lib/model/crm-sharing.js +27 -6
- package/src/lib/model/crm-sharing.js.map +1 -1
- package/src/lib/model/crm-task-reminders.d.ts +152 -0
- package/src/lib/model/crm-task-reminders.js +161 -0
- package/src/lib/model/crm-task-reminders.js.map +1 -0
- package/src/lib/model/deal-board-model.d.ts +8 -2
- package/src/lib/model/deal-board-model.js +15 -2
- package/src/lib/model/deal-board-model.js.map +1 -1
- package/src/lib/model/deal-contact-roles.d.ts +45 -0
- package/src/lib/model/deal-contact-roles.js +73 -0
- package/src/lib/model/deal-contact-roles.js.map +1 -0
- package/src/lib/model/deal-form-model.d.ts +56 -0
- package/src/lib/model/deal-form-model.js +79 -7
- package/src/lib/model/deal-form-model.js.map +1 -1
- package/src/lib/model/download-text-file.d.ts +23 -0
- package/src/lib/model/download-text-file.js +34 -0
- package/src/lib/model/download-text-file.js.map +1 -0
- package/src/lib/model/lead-filters.d.ts +36 -2
- package/src/lib/model/lead-filters.js +123 -2
- package/src/lib/model/lead-filters.js.map +1 -1
- package/src/lib/model/lead-source-direction.d.ts +38 -0
- package/src/lib/model/lead-source-direction.js +52 -0
- package/src/lib/model/lead-source-direction.js.map +1 -0
- package/src/lib/model/next-activity.d.ts +1 -1
- package/src/lib/model/next-activity.js.map +1 -1
- package/src/lib/model/picklist-values.d.ts +119 -0
- package/src/lib/model/picklist-values.js +256 -0
- package/src/lib/model/picklist-values.js.map +1 -0
- package/src/lib/model/record-facts-disclosed.d.ts +81 -0
- package/src/lib/model/record-facts-disclosed.js +281 -0
- package/src/lib/model/record-facts-disclosed.js.map +1 -0
- package/src/lib/model/record-facts.d.ts +215 -34
- package/src/lib/model/record-facts.js +307 -128
- package/src/lib/model/record-facts.js.map +1 -1
- package/src/lib/model/task-picklists.d.ts +52 -0
- package/src/lib/model/task-picklists.js +83 -0
- package/src/lib/model/task-picklists.js.map +1 -0
- package/src/lib/model/task-routes.d.ts +13 -0
- package/src/lib/model/task-routes.js +23 -4
- package/src/lib/model/task-routes.js.map +1 -1
- package/src/lib/plan-entitlements.js +6 -4
- package/src/lib/plan-entitlements.js.map +1 -1
- package/src/lib/plugin.js +17 -0
- package/src/lib/plugin.js.map +1 -1
- package/src/lib/server/api-v1/contacts.js +220 -14
- package/src/lib/server/api-v1/contacts.js.map +1 -1
- package/src/lib/server/api-v1/crm-activities.js +14 -1
- package/src/lib/server/api-v1/crm-activities.js.map +1 -1
- package/src/lib/server/api-v1/crm-companies.js +123 -14
- package/src/lib/server/api-v1/crm-companies.js.map +1 -1
- package/src/lib/server/api-v1/crm-deals.js +291 -26
- package/src/lib/server/api-v1/crm-deals.js.map +1 -1
- package/src/lib/server/api-v1/crm-leads.js +144 -38
- package/src/lib/server/api-v1/crm-leads.js.map +1 -1
- package/src/lib/server/api-v1/crm-pipelines.d.ts +6 -0
- package/src/lib/server/api-v1/crm-pipelines.js +8 -2
- package/src/lib/server/api-v1/crm-pipelines.js.map +1 -1
- package/src/lib/server/api-v1/crm-tasks.js +78 -34
- package/src/lib/server/api-v1/crm-tasks.js.map +1 -1
- package/src/lib/server/api-v1/openapi.d.ts +0 -11
- package/src/lib/server/api-v1/openapi.js +171 -16
- package/src/lib/server/api-v1/openapi.js.map +1 -1
- package/src/lib/server/assign-contact-owner.d.ts +188 -0
- package/src/lib/server/assign-contact-owner.js +446 -0
- package/src/lib/server/assign-contact-owner.js.map +1 -0
- package/src/lib/server/associate-company-by-domain.d.ts +70 -0
- package/src/lib/server/associate-company-by-domain.js +153 -0
- package/src/lib/server/associate-company-by-domain.js.map +1 -0
- package/src/lib/server/automation-steps.d.ts +140 -0
- package/src/lib/server/automation-steps.js +669 -0
- package/src/lib/server/automation-steps.js.map +1 -0
- package/src/lib/server/capture-contact.d.ts +17 -0
- package/src/lib/server/capture-contact.js +95 -26
- package/src/lib/server/capture-contact.js.map +1 -1
- package/src/lib/server/capture-host-contact.d.ts +104 -0
- package/src/lib/server/capture-host-contact.js +151 -0
- package/src/lib/server/capture-host-contact.js.map +1 -0
- package/src/lib/server/company-children.d.ts +25 -0
- package/src/lib/server/company-children.js +42 -0
- package/src/lib/server/company-children.js.map +1 -0
- package/src/lib/server/company-delete.d.ts +18 -0
- package/src/lib/server/company-delete.js +44 -21
- package/src/lib/server/company-delete.js.map +1 -1
- package/src/lib/server/contact-email-history.js +21 -19
- package/src/lib/server/contact-email-history.js.map +1 -1
- package/src/lib/server/contact-remove.js +27 -2
- package/src/lib/server/contact-remove.js.map +1 -1
- package/src/lib/server/contact-reports-to.d.ts +61 -0
- package/src/lib/server/contact-reports-to.js +114 -0
- package/src/lib/server/contact-reports-to.js.map +1 -0
- package/src/lib/server/contact-update.d.ts +42 -1
- package/src/lib/server/contact-update.js +204 -23
- package/src/lib/server/contact-update.js.map +1 -1
- package/src/lib/server/convert-host-lead.d.ts +46 -1
- package/src/lib/server/convert-host-lead.js +173 -15
- package/src/lib/server/convert-host-lead.js.map +1 -1
- package/src/lib/server/convert-open-lead.js +12 -5
- package/src/lib/server/convert-open-lead.js.map +1 -1
- package/src/lib/server/crm-email-activity.d.ts +118 -0
- package/src/lib/server/crm-email-activity.js +148 -0
- package/src/lib/server/crm-email-activity.js.map +1 -0
- package/src/lib/server/crm-inbound-email.js +1 -1
- package/src/lib/server/crm-inbound-email.js.map +1 -1
- package/src/lib/server/crm-next-activity.d.ts +74 -0
- package/src/lib/server/crm-next-activity.js +194 -0
- package/src/lib/server/crm-next-activity.js.map +1 -0
- package/src/lib/server/crm-record-indexes.d.ts +45 -0
- package/src/lib/server/crm-record-indexes.js +78 -0
- package/src/lib/server/crm-record-indexes.js.map +1 -0
- package/src/lib/server/crm-sharing.d.ts +9 -1
- package/src/lib/server/crm-sharing.js +23 -3
- package/src/lib/server/crm-sharing.js.map +1 -1
- package/src/lib/server/deal-contact-roles.d.ts +27 -0
- package/src/lib/server/deal-contact-roles.js +89 -0
- package/src/lib/server/deal-contact-roles.js.map +1 -0
- package/src/lib/server/email-send.js +2 -1
- package/src/lib/server/email-send.js.map +1 -1
- package/src/lib/server/lead-convert.d.ts +5 -0
- package/src/lib/server/lead-convert.js +19 -3
- package/src/lib/server/lead-convert.js.map +1 -1
- package/src/lib/server/lead-create.d.ts +17 -2
- package/src/lib/server/lead-create.js +46 -14
- package/src/lib/server/lead-create.js.map +1 -1
- package/src/lib/server/lead-nurturing.d.ts +6 -0
- package/src/lib/server/lead-nurturing.js +57 -20
- package/src/lib/server/lead-nurturing.js.map +1 -1
- package/src/lib/server/lead-picklists.d.ts +35 -0
- package/src/lib/server/lead-picklists.js +52 -0
- package/src/lib/server/lead-picklists.js.map +1 -0
- package/src/lib/server/lead-source-picklist.d.ts +1 -13
- package/src/lib/server/lead-source-picklist.js +6 -33
- package/src/lib/server/lead-source-picklist.js.map +1 -1
- package/src/lib/server/merge-contacts.js +23 -5
- package/src/lib/server/merge-contacts.js.map +1 -1
- package/src/lib/server/next-activity-routes.js +2 -1
- package/src/lib/server/next-activity-routes.js.map +1 -1
- package/src/lib/server/person-eraser.d.ts +53 -0
- package/src/lib/server/person-eraser.js +149 -0
- package/src/lib/server/person-eraser.js.map +1 -0
- package/src/lib/server/person-records.d.ts +69 -0
- package/src/lib/server/person-records.js +317 -0
- package/src/lib/server/person-records.js.map +1 -0
- package/src/lib/server/person-refund.d.ts +97 -0
- package/src/lib/server/person-refund.js +221 -0
- package/src/lib/server/person-refund.js.map +1 -0
- package/src/lib/server/picklist-values.d.ts +21 -0
- package/src/lib/server/picklist-values.js +308 -0
- package/src/lib/server/picklist-values.js.map +1 -0
- package/src/lib/server/read-picklist.d.ts +44 -0
- package/src/lib/server/read-picklist.js +65 -0
- package/src/lib/server/read-picklist.js.map +1 -0
- package/src/lib/server/recipe-routes.js +22 -8
- package/src/lib/server/recipe-routes.js.map +1 -1
- package/src/lib/server/record-email-state.js +7 -1
- package/src/lib/server/record-email-state.js.map +1 -1
- package/src/lib/server/record-facts.d.ts +3 -0
- package/src/lib/server/record-facts.js +233 -31
- package/src/lib/server/record-facts.js.map +1 -1
- package/src/lib/server/record-origin.d.ts +27 -0
- package/src/lib/server/record-origin.js +104 -0
- package/src/lib/server/record-origin.js.map +1 -0
- package/src/lib/server/record-timeline.js +40 -3
- package/src/lib/server/record-timeline.js.map +1 -1
- package/src/lib/server/suite-gate.js +4 -3
- package/src/lib/server/suite-gate.js.map +1 -1
- package/src/lib/server/task-reminders-route.js +2 -1
- package/src/lib/server/task-reminders-route.js.map +1 -1
- package/src/lib/server/task-routes.js +33 -17
- package/src/lib/server/task-routes.js.map +1 -1
- package/src/lib/server-deal-stage.d.ts +5 -1
- package/src/lib/server-deal-stage.js +10 -5
- package/src/lib/server-deal-stage.js.map +1 -1
- package/src/lib/server.d.ts +8 -3
- package/src/lib/server.js +47 -43
- package/src/lib/server.js.map +1 -1
- package/src/lib/testing/memory-firestore.d.ts +55 -0
- package/src/lib/testing/memory-firestore.js +335 -0
- package/src/lib/testing/memory-firestore.js.map +1 -0
- package/src/lib/testing/stand-in-email-send-index.d.ts +25 -0
- package/src/lib/testing/stand-in-email-send-index.js +49 -0
- package/src/lib/testing/stand-in-email-send-index.js.map +1 -0
- package/src/lib/transfer/activities.d.ts +30 -0
- package/src/lib/transfer/activities.js +132 -0
- package/src/lib/transfer/activities.js.map +1 -0
- package/src/lib/transfer/aliases.d.ts +22 -0
- package/src/lib/transfer/aliases.js +1342 -0
- package/src/lib/transfer/aliases.js.map +1 -0
- package/src/lib/transfer/common.d.ts +222 -0
- package/src/lib/transfer/common.js +832 -0
- package/src/lib/transfer/common.js.map +1 -0
- package/src/lib/transfer/companies.d.ts +43 -0
- package/src/lib/transfer/companies.js +549 -0
- package/src/lib/transfer/companies.js.map +1 -0
- package/src/lib/transfer/contacts.d.ts +31 -0
- package/src/lib/transfer/contacts.js +727 -0
- package/src/lib/transfer/contacts.js.map +1 -0
- package/src/lib/transfer/deals.d.ts +66 -0
- package/src/lib/transfer/deals.js +698 -0
- package/src/lib/transfer/deals.js.map +1 -0
- package/src/lib/transfer/email-templates-package.d.ts +40 -0
- package/src/lib/transfer/email-templates-package.js +76 -0
- package/src/lib/transfer/email-templates-package.js.map +1 -0
- package/src/lib/transfer/email-templates-package.server.d.ts +32 -0
- package/src/lib/transfer/email-templates-package.server.js +176 -0
- package/src/lib/transfer/email-templates-package.server.js.map +1 -0
- package/src/lib/transfer/fields.d.ts +102 -0
- package/src/lib/transfer/fields.js +1755 -0
- package/src/lib/transfer/fields.js.map +1 -0
- package/src/lib/transfer/leads.d.ts +30 -0
- package/src/lib/transfer/leads.js +582 -0
- package/src/lib/transfer/leads.js.map +1 -0
- package/src/lib/transfer/pipelines.d.ts +21 -0
- package/src/lib/transfer/pipelines.js +172 -0
- package/src/lib/transfer/pipelines.js.map +1 -0
- package/src/lib/transfer/register.d.ts +47 -0
- package/src/lib/transfer/register.js +277 -0
- package/src/lib/transfer/register.js.map +1 -0
- package/src/lib/transfer/tasks.d.ts +30 -0
- package/src/lib/transfer/tasks.js +418 -0
- package/src/lib/transfer/tasks.js.map +1 -0
- package/src/lib/transfer/ui.d.ts +20 -0
- package/src/lib/transfer/ui.js +42 -0
- package/src/lib/transfer/ui.js.map +1 -0
- package/src/lib/components/company-import-drawer.d.ts +0 -42
- package/src/lib/components/company-import-drawer.js +0 -99
- package/src/lib/components/company-import-drawer.js.map +0 -1
- package/src/lib/components/contact-import-drawer.d.ts +0 -46
- package/src/lib/components/contact-import-drawer.js +0 -149
- package/src/lib/components/contact-import-drawer.js.map +0 -1
- package/src/lib/components/crm-export-all-button.d.ts +0 -39
- package/src/lib/components/crm-export-all-button.js +0 -98
- package/src/lib/components/crm-export-all-button.js.map +0 -1
- package/src/lib/components/csv-import-drawer.d.ts +0 -139
- package/src/lib/components/csv-import-drawer.js +0 -757
- package/src/lib/components/csv-import-drawer.js.map +0 -1
- package/src/lib/components/deal-import-drawer.d.ts +0 -24
- package/src/lib/components/deal-import-drawer.js +0 -83
- package/src/lib/components/deal-import-drawer.js.map +0 -1
- package/src/lib/components/lead-import-drawer.d.ts +0 -27
- package/src/lib/components/lead-import-drawer.js +0 -118
- package/src/lib/components/lead-import-drawer.js.map +0 -1
- package/src/lib/components/lead-source-values-card.d.ts +0 -27
- package/src/lib/components/lead-source-values-card.js.map +0 -1
- package/src/lib/components/task-import-drawer.d.ts +0 -24
- package/src/lib/components/task-import-drawer.js +0 -82
- package/src/lib/components/task-import-drawer.js.map +0 -1
- package/src/lib/model/companies-csv.d.ts +0 -36
- package/src/lib/model/companies-csv.js +0 -38
- package/src/lib/model/companies-csv.js.map +0 -1
- package/src/lib/model/contacts-csv.d.ts +0 -54
- package/src/lib/model/contacts-csv.js +0 -67
- package/src/lib/model/contacts-csv.js.map +0 -1
- package/src/lib/model/crm-company-import.d.ts +0 -154
- package/src/lib/model/crm-company-import.js +0 -331
- package/src/lib/model/crm-company-import.js.map +0 -1
- package/src/lib/model/crm-csv.d.ts +0 -239
- package/src/lib/model/crm-csv.js +0 -467
- package/src/lib/model/crm-csv.js.map +0 -1
- package/src/lib/model/crm-deal-import.d.ts +0 -112
- package/src/lib/model/crm-deal-import.js +0 -263
- package/src/lib/model/crm-deal-import.js.map +0 -1
- package/src/lib/model/crm-import.d.ts +0 -250
- package/src/lib/model/crm-import.js +0 -467
- package/src/lib/model/crm-import.js.map +0 -1
- package/src/lib/model/crm-lead-import.d.ts +0 -138
- package/src/lib/model/crm-lead-import.js +0 -446
- package/src/lib/model/crm-lead-import.js.map +0 -1
- package/src/lib/model/crm-task-import.d.ts +0 -94
- package/src/lib/model/crm-task-import.js +0 -275
- package/src/lib/model/crm-task-import.js.map +0 -1
- package/src/lib/model/deals-csv.d.ts +0 -32
- package/src/lib/model/deals-csv.js +0 -36
- package/src/lib/model/deals-csv.js.map +0 -1
- package/src/lib/model/import-column-shapes.d.ts +0 -36
- package/src/lib/model/import-column-shapes.js +0 -76
- package/src/lib/model/import-column-shapes.js.map +0 -1
- package/src/lib/model/lead-source-values.d.ts +0 -82
- package/src/lib/model/lead-source-values.js +0 -149
- package/src/lib/model/lead-source-values.js.map +0 -1
- package/src/lib/model/leads-csv.d.ts +0 -40
- package/src/lib/model/leads-csv.js +0 -40
- package/src/lib/model/leads-csv.js.map +0 -1
- package/src/lib/model/tasks-csv.d.ts +0 -28
- package/src/lib/model/tasks-csv.js +0 -28
- package/src/lib/model/tasks-csv.js.map +0 -1
- package/src/lib/server/companies-import.d.ts +0 -57
- package/src/lib/server/companies-import.js +0 -242
- package/src/lib/server/companies-import.js.map +0 -1
- package/src/lib/server/contacts-import.d.ts +0 -109
- package/src/lib/server/contacts-import.js +0 -393
- package/src/lib/server/contacts-import.js.map +0 -1
- package/src/lib/server/deals-import.d.ts +0 -76
- package/src/lib/server/deals-import.js +0 -248
- package/src/lib/server/deals-import.js.map +0 -1
- package/src/lib/server/export-route.d.ts +0 -60
- package/src/lib/server/export-route.js +0 -447
- package/src/lib/server/export-route.js.map +0 -1
- package/src/lib/server/import-context.d.ts +0 -87
- package/src/lib/server/import-context.js +0 -182
- package/src/lib/server/import-context.js.map +0 -1
- package/src/lib/server/lead-source-values.d.ts +0 -50
- package/src/lib/server/lead-source-values.js +0 -191
- package/src/lib/server/lead-source-values.js.map +0 -1
- package/src/lib/server/leads-import.d.ts +0 -84
- package/src/lib/server/leads-import.js +0 -367
- package/src/lib/server/leads-import.js.map +0 -1
- package/src/lib/server/tasks-import.d.ts +0 -54
- package/src/lib/server/tasks-import.js +0 -160
- package/src/lib/server/tasks-import.js.map +0 -1
|
@@ -0,0 +1,1755 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2026 Aglyn LLC
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/ /*==========================================
|
|
18
|
+
* THE CRM'S RECORDS AS THE IMPORT AND EXPORT SEE THEM (AGL-3527, AGL-3528).
|
|
19
|
+
*
|
|
20
|
+
* Every field a contact, a company, a lead, a deal and a task hold — the Salesforce standard fields
|
|
21
|
+
* of CRM v4, the picklists, the links to other records, what the platform
|
|
22
|
+
* stamps — as the transfer framework's `TransferField`s. Pure data: the
|
|
23
|
+
* server half (`contacts.ts`, `companies.ts`) reads and writes records by
|
|
24
|
+
* these ids, the AI's column matcher is told the same ids
|
|
25
|
+
* (`model/record-facts.ts`), and the docs list them.
|
|
26
|
+
*
|
|
27
|
+
* ## A link to another record is a lookup
|
|
28
|
+
*
|
|
29
|
+
* A contact's company, the person they report to and their owner name
|
|
30
|
+
* records. A file names them the way a person would — "Acme", `acme.com`,
|
|
31
|
+
* `ana@acme.com` — and the job engine resolves each through the target's
|
|
32
|
+
* own lookup (AGL-3541); an export writes the same words back, so a file
|
|
33
|
+
* re-imports into the records it came from.
|
|
34
|
+
*
|
|
35
|
+
* ## An address is six columns
|
|
36
|
+
*
|
|
37
|
+
* Salesforce, HubSpot and every spreadsheet split an address into its
|
|
38
|
+
* parts, so the file does too: `mailingStreet` … `mailingCountry`. The
|
|
39
|
+
* record keeps one postal address; the server half composes it.
|
|
40
|
+
*=========================================*/ import { CONTACT_LIFECYCLE_STAGE_LABELS, CONTACT_LIFECYCLE_STAGES, CRM_LEAD_SOURCE_PICKLIST, CRM_LEAD_STATUS_PICKLIST, CRM_OPPORTUNITY_TYPE_PICKLIST, CRM_SALUTATION_PICKLIST } from "@aglyn/aglyn/app-utils/crm";
|
|
41
|
+
/** The CRM's resource keys, as `plugins.config.json` declares them. */ export const CRM_CONTACTS_RESOURCE = 'crm.contacts';
|
|
42
|
+
export const CRM_COMPANIES_RESOURCE = 'crm.companies';
|
|
43
|
+
/**
|
|
44
|
+
* The workspace's members, as an owner column names them: a lookup target
|
|
45
|
+
* the CRM's resources answer themselves (`lookupTargets`), because no
|
|
46
|
+
* resource imports members.
|
|
47
|
+
*/ export const CRM_MEMBERS_TARGET = 'crm.members';
|
|
48
|
+
/**
|
|
49
|
+
* The lifecycle stages as a picklist the values step can match against: a
|
|
50
|
+
* fixed list the platform defines, which an import maps onto and never adds
|
|
51
|
+
* to.
|
|
52
|
+
*/ export const CRM_LIFECYCLE_STAGE_PICKLIST = 'crm.lifecycleStage';
|
|
53
|
+
/** The picklist a custom `select` field's options are matched as. */ export function crmCustomPicklistId(object, key) {
|
|
54
|
+
return `custom.${object}.${key}`;
|
|
55
|
+
}
|
|
56
|
+
/** The custom field a {@link crmCustomPicklistId} names, or `null`. */ export function crmCustomPicklistKey(picklistId) {
|
|
57
|
+
const match = /^custom\.([a-z]+)\.([a-z][a-z0-9_]*)$/.exec(picklistId);
|
|
58
|
+
return match ? {
|
|
59
|
+
object: match[1],
|
|
60
|
+
key: match[2]
|
|
61
|
+
} : null;
|
|
62
|
+
}
|
|
63
|
+
/** The stage a label (or an id, or a spelling between them) names, or `null`. */ export function crmLifecycleStageOf(value) {
|
|
64
|
+
const text = String(value != null ? value : '').trim().toLowerCase();
|
|
65
|
+
if (!text) return null;
|
|
66
|
+
const key = text.replace(/[\s_]+/g, '-');
|
|
67
|
+
for (const stage of CONTACT_LIFECYCLE_STAGES){
|
|
68
|
+
if (stage === key || CONTACT_LIFECYCLE_STAGE_LABELS[stage].toLowerCase() === text) return stage;
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
/** A stage's place in the funnel, for "never backward"; `-1` for none. */ export function crmLifecycleStageRank(value) {
|
|
73
|
+
const stage = crmLifecycleStageOf(value);
|
|
74
|
+
return stage ? CONTACT_LIFECYCLE_STAGES.indexOf(stage) : -1;
|
|
75
|
+
}
|
|
76
|
+
/** The six parts of a postal address, as a file's columns name them. */ export const CRM_ADDRESS_PARTS = [
|
|
77
|
+
'Street',
|
|
78
|
+
'Street2',
|
|
79
|
+
'City',
|
|
80
|
+
'State',
|
|
81
|
+
'PostalCode',
|
|
82
|
+
'Country'
|
|
83
|
+
];
|
|
84
|
+
/** The postal-address key each part is stored under. */ export const CRM_ADDRESS_PART_KEYS = {
|
|
85
|
+
Street: 'line1',
|
|
86
|
+
Street2: 'line2',
|
|
87
|
+
City: 'city',
|
|
88
|
+
State: 'state',
|
|
89
|
+
PostalCode: 'postalCode',
|
|
90
|
+
Country: 'country'
|
|
91
|
+
};
|
|
92
|
+
/** The six fields of one address: `<prefix>Street` … `<prefix>Country`. */ function addressFields(prefix, label, group) {
|
|
93
|
+
const words = {
|
|
94
|
+
Street: 'street',
|
|
95
|
+
Street2: 'street line 2',
|
|
96
|
+
City: 'city',
|
|
97
|
+
State: 'state or region',
|
|
98
|
+
PostalCode: 'postal code',
|
|
99
|
+
Country: 'country'
|
|
100
|
+
};
|
|
101
|
+
return CRM_ADDRESS_PARTS.map((part)=>_extends({
|
|
102
|
+
id: `${prefix}${part}`,
|
|
103
|
+
label: `${label} ${words[part]}`,
|
|
104
|
+
group,
|
|
105
|
+
type: 'text',
|
|
106
|
+
maxLength: part === 'PostalCode' ? 32 : part === 'Country' ? 64 : 200
|
|
107
|
+
}, part === 'Country' ? {
|
|
108
|
+
description: 'A two-letter country code (US, GB, DE).'
|
|
109
|
+
} : {}));
|
|
110
|
+
}
|
|
111
|
+
/** The field ids of one address. */ export function crmAddressFieldIds(prefix) {
|
|
112
|
+
return CRM_ADDRESS_PARTS.map((part)=>`${prefix}${part}`);
|
|
113
|
+
}
|
|
114
|
+
/*==========================================
|
|
115
|
+
* CONTACTS
|
|
116
|
+
*=========================================*/ export const CONTACT_TRANSFER_GROUPS = [
|
|
117
|
+
{
|
|
118
|
+
id: 'person',
|
|
119
|
+
label: 'Person'
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: 'phones',
|
|
123
|
+
label: 'Phones'
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: 'work',
|
|
127
|
+
label: 'Work'
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: 'mailing',
|
|
131
|
+
label: 'Mailing address'
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
id: 'otherAddress',
|
|
135
|
+
label: 'Other address'
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
id: 'crm',
|
|
139
|
+
label: 'CRM'
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: 'activity',
|
|
143
|
+
label: 'Activity'
|
|
144
|
+
}
|
|
145
|
+
];
|
|
146
|
+
/** A contact's own fields, in the order the picker lists them. */ export const CONTACT_TRANSFER_FIELDS = [
|
|
147
|
+
{
|
|
148
|
+
id: 'email',
|
|
149
|
+
label: 'Email',
|
|
150
|
+
group: 'person',
|
|
151
|
+
type: 'email',
|
|
152
|
+
required: true,
|
|
153
|
+
matchKey: true,
|
|
154
|
+
aliases: [
|
|
155
|
+
'email address',
|
|
156
|
+
'e-mail',
|
|
157
|
+
'e-mail address',
|
|
158
|
+
'contact email',
|
|
159
|
+
'primary email',
|
|
160
|
+
'work email'
|
|
161
|
+
],
|
|
162
|
+
description: 'Who the person is: a contact is found and kept by its email.'
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
id: 'name',
|
|
166
|
+
label: 'Full name',
|
|
167
|
+
group: 'person',
|
|
168
|
+
type: 'text',
|
|
169
|
+
maxLength: 120,
|
|
170
|
+
aliases: [
|
|
171
|
+
'name',
|
|
172
|
+
'contact name',
|
|
173
|
+
'display name'
|
|
174
|
+
],
|
|
175
|
+
description: 'Built from the first and last names when either is set.'
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: 'salutation',
|
|
179
|
+
label: 'Salutation',
|
|
180
|
+
group: 'person',
|
|
181
|
+
type: 'picklist',
|
|
182
|
+
picklistId: CRM_SALUTATION_PICKLIST,
|
|
183
|
+
aliases: [
|
|
184
|
+
'title prefix',
|
|
185
|
+
'prefix',
|
|
186
|
+
'honorific'
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
id: 'firstName',
|
|
191
|
+
label: 'First name',
|
|
192
|
+
group: 'person',
|
|
193
|
+
type: 'text',
|
|
194
|
+
maxLength: 120,
|
|
195
|
+
aliases: [
|
|
196
|
+
'given name',
|
|
197
|
+
'forename'
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
id: 'lastName',
|
|
202
|
+
label: 'Last name',
|
|
203
|
+
group: 'person',
|
|
204
|
+
type: 'text',
|
|
205
|
+
maxLength: 120,
|
|
206
|
+
aliases: [
|
|
207
|
+
'surname',
|
|
208
|
+
'family name'
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
id: 'birthdate',
|
|
213
|
+
label: 'Birthdate',
|
|
214
|
+
group: 'person',
|
|
215
|
+
type: 'date',
|
|
216
|
+
aliases: [
|
|
217
|
+
'birthday',
|
|
218
|
+
'date of birth',
|
|
219
|
+
'dob'
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
id: 'phone',
|
|
224
|
+
label: 'Phone',
|
|
225
|
+
group: 'phones',
|
|
226
|
+
type: 'phone',
|
|
227
|
+
aliases: [
|
|
228
|
+
'phone number',
|
|
229
|
+
'telephone',
|
|
230
|
+
'work phone',
|
|
231
|
+
'business phone'
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
id: 'mobilePhone',
|
|
236
|
+
label: 'Mobile phone',
|
|
237
|
+
group: 'phones',
|
|
238
|
+
type: 'phone',
|
|
239
|
+
aliases: [
|
|
240
|
+
'mobile',
|
|
241
|
+
'cell',
|
|
242
|
+
'cell phone'
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
id: 'homePhone',
|
|
247
|
+
label: 'Home phone',
|
|
248
|
+
group: 'phones',
|
|
249
|
+
type: 'phone'
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
id: 'otherPhone',
|
|
253
|
+
label: 'Other phone',
|
|
254
|
+
group: 'phones',
|
|
255
|
+
type: 'phone',
|
|
256
|
+
aliases: [
|
|
257
|
+
'alternate phone'
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
id: 'fax',
|
|
262
|
+
label: 'Fax',
|
|
263
|
+
group: 'phones',
|
|
264
|
+
type: 'phone',
|
|
265
|
+
aliases: [
|
|
266
|
+
'fax number',
|
|
267
|
+
'business fax'
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
id: 'doNotCall',
|
|
272
|
+
label: 'Do not call',
|
|
273
|
+
group: 'phones',
|
|
274
|
+
type: 'boolean',
|
|
275
|
+
aliases: [
|
|
276
|
+
'dnc',
|
|
277
|
+
'no calls'
|
|
278
|
+
],
|
|
279
|
+
description: 'A file can say a person asked not to be called; never that they took it back.'
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
id: 'assistantName',
|
|
283
|
+
label: 'Assistant',
|
|
284
|
+
group: 'phones',
|
|
285
|
+
type: 'text',
|
|
286
|
+
maxLength: 120,
|
|
287
|
+
aliases: [
|
|
288
|
+
'assistant name'
|
|
289
|
+
]
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
id: 'assistantPhone',
|
|
293
|
+
label: 'Assistant phone',
|
|
294
|
+
group: 'phones',
|
|
295
|
+
type: 'phone',
|
|
296
|
+
aliases: [
|
|
297
|
+
'asst. phone',
|
|
298
|
+
'asst phone'
|
|
299
|
+
]
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
id: 'jobTitle',
|
|
303
|
+
label: 'Job title',
|
|
304
|
+
group: 'work',
|
|
305
|
+
type: 'text',
|
|
306
|
+
maxLength: 120,
|
|
307
|
+
aliases: [
|
|
308
|
+
'title',
|
|
309
|
+
'position',
|
|
310
|
+
'role'
|
|
311
|
+
]
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
id: 'department',
|
|
315
|
+
label: 'Department',
|
|
316
|
+
group: 'work',
|
|
317
|
+
type: 'text',
|
|
318
|
+
maxLength: 120,
|
|
319
|
+
aliases: [
|
|
320
|
+
'dept'
|
|
321
|
+
]
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
id: 'company',
|
|
325
|
+
label: 'Company',
|
|
326
|
+
group: 'work',
|
|
327
|
+
type: 'lookup',
|
|
328
|
+
lookup: {
|
|
329
|
+
resource: CRM_COMPANIES_RESOURCE,
|
|
330
|
+
by: [
|
|
331
|
+
'domain',
|
|
332
|
+
'name'
|
|
333
|
+
],
|
|
334
|
+
creatable: true
|
|
335
|
+
},
|
|
336
|
+
aliases: [
|
|
337
|
+
'company name',
|
|
338
|
+
'organization',
|
|
339
|
+
'account',
|
|
340
|
+
'account name'
|
|
341
|
+
],
|
|
342
|
+
description: 'A company by its domain or name; one the CRM does not hold can be created.'
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
id: 'reportsTo',
|
|
346
|
+
label: 'Reports to',
|
|
347
|
+
group: 'work',
|
|
348
|
+
type: 'lookup',
|
|
349
|
+
lookup: {
|
|
350
|
+
resource: CRM_CONTACTS_RESOURCE,
|
|
351
|
+
by: [
|
|
352
|
+
'email'
|
|
353
|
+
]
|
|
354
|
+
},
|
|
355
|
+
aliases: [
|
|
356
|
+
'manager',
|
|
357
|
+
'reports to email'
|
|
358
|
+
],
|
|
359
|
+
description: 'Another contact, by email.'
|
|
360
|
+
},
|
|
361
|
+
...addressFields('mailing', 'Mailing', 'mailing'),
|
|
362
|
+
...addressFields('other', 'Other', 'otherAddress'),
|
|
363
|
+
{
|
|
364
|
+
id: 'owner',
|
|
365
|
+
label: 'Owner',
|
|
366
|
+
group: 'crm',
|
|
367
|
+
type: 'lookup',
|
|
368
|
+
lookup: {
|
|
369
|
+
resource: CRM_MEMBERS_TARGET,
|
|
370
|
+
by: [
|
|
371
|
+
'email',
|
|
372
|
+
'name'
|
|
373
|
+
]
|
|
374
|
+
},
|
|
375
|
+
aliases: [
|
|
376
|
+
'owner email',
|
|
377
|
+
'contact owner',
|
|
378
|
+
'assigned to'
|
|
379
|
+
],
|
|
380
|
+
description: 'A member of the workspace, by email or name.'
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
id: 'lifecycleStage',
|
|
384
|
+
label: 'Lifecycle stage',
|
|
385
|
+
group: 'crm',
|
|
386
|
+
type: 'picklist',
|
|
387
|
+
picklistId: CRM_LIFECYCLE_STAGE_PICKLIST,
|
|
388
|
+
aliases: [
|
|
389
|
+
'stage',
|
|
390
|
+
'lifecycle'
|
|
391
|
+
],
|
|
392
|
+
description: 'Moves forward only.'
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
id: 'leadSource',
|
|
396
|
+
label: 'Lead source',
|
|
397
|
+
group: 'crm',
|
|
398
|
+
type: 'picklist',
|
|
399
|
+
picklistId: CRM_LEAD_SOURCE_PICKLIST,
|
|
400
|
+
aliases: [
|
|
401
|
+
'source',
|
|
402
|
+
'original source'
|
|
403
|
+
]
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
id: 'tags',
|
|
407
|
+
label: 'Tags',
|
|
408
|
+
group: 'crm',
|
|
409
|
+
type: 'tags',
|
|
410
|
+
aliases: [
|
|
411
|
+
'tag',
|
|
412
|
+
'labels',
|
|
413
|
+
'segments'
|
|
414
|
+
]
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
id: 'notes',
|
|
418
|
+
label: 'Notes',
|
|
419
|
+
group: 'crm',
|
|
420
|
+
type: 'longText',
|
|
421
|
+
maxLength: 2000,
|
|
422
|
+
aliases: [
|
|
423
|
+
'note',
|
|
424
|
+
'description',
|
|
425
|
+
'comments'
|
|
426
|
+
]
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
id: 'marketingConsent',
|
|
430
|
+
label: 'Marketing consent',
|
|
431
|
+
group: 'crm',
|
|
432
|
+
type: 'boolean',
|
|
433
|
+
aliases: [
|
|
434
|
+
'consent',
|
|
435
|
+
'opt in',
|
|
436
|
+
'opted in',
|
|
437
|
+
'subscribed',
|
|
438
|
+
'email consent',
|
|
439
|
+
'email opt in'
|
|
440
|
+
],
|
|
441
|
+
description: 'Exported as it stands; never set from a file.'
|
|
442
|
+
}
|
|
443
|
+
];
|
|
444
|
+
/** What only the platform writes about a contact: exported, never imported. */ export const CONTACT_TRANSFER_DERIVED = [
|
|
445
|
+
{
|
|
446
|
+
id: 'sources',
|
|
447
|
+
label: 'Captured through',
|
|
448
|
+
group: 'activity',
|
|
449
|
+
type: 'tags',
|
|
450
|
+
readOnly: true
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
id: 'lastInteractionAt',
|
|
454
|
+
label: 'Last interaction',
|
|
455
|
+
group: 'activity',
|
|
456
|
+
type: 'datetime',
|
|
457
|
+
readOnly: true
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
id: 'lastEngagedAt',
|
|
461
|
+
label: 'Last engaged',
|
|
462
|
+
group: 'activity',
|
|
463
|
+
type: 'datetime',
|
|
464
|
+
readOnly: true
|
|
465
|
+
}
|
|
466
|
+
];
|
|
467
|
+
/** When the record was made and last changed. */ export const CRM_TIMESTAMP_FIELDS = [
|
|
468
|
+
{
|
|
469
|
+
id: 'createdAt',
|
|
470
|
+
label: 'Created',
|
|
471
|
+
type: 'datetime',
|
|
472
|
+
readOnly: true
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
id: 'updatedAt',
|
|
476
|
+
label: 'Last updated',
|
|
477
|
+
type: 'datetime',
|
|
478
|
+
readOnly: true
|
|
479
|
+
}
|
|
480
|
+
];
|
|
481
|
+
/*==========================================
|
|
482
|
+
* COMPANIES
|
|
483
|
+
*=========================================*/ export const COMPANY_TRANSFER_GROUPS = [
|
|
484
|
+
{
|
|
485
|
+
id: 'company',
|
|
486
|
+
label: 'Company'
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
id: 'account',
|
|
490
|
+
label: 'Account'
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
id: 'billing',
|
|
494
|
+
label: 'Billing address'
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
id: 'shipping',
|
|
498
|
+
label: 'Shipping address'
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
id: 'crm',
|
|
502
|
+
label: 'CRM'
|
|
503
|
+
}
|
|
504
|
+
];
|
|
505
|
+
/** A company's own fields, in the order the picker lists them. */ export const COMPANY_TRANSFER_FIELDS = [
|
|
506
|
+
{
|
|
507
|
+
id: 'name',
|
|
508
|
+
label: 'Company name',
|
|
509
|
+
group: 'company',
|
|
510
|
+
type: 'text',
|
|
511
|
+
required: true,
|
|
512
|
+
matchKey: true,
|
|
513
|
+
maxLength: 120,
|
|
514
|
+
aliases: [
|
|
515
|
+
'company',
|
|
516
|
+
'name',
|
|
517
|
+
'organization',
|
|
518
|
+
'account',
|
|
519
|
+
'account name'
|
|
520
|
+
]
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
id: 'domain',
|
|
524
|
+
label: 'Domain',
|
|
525
|
+
group: 'company',
|
|
526
|
+
type: 'text',
|
|
527
|
+
matchKey: true,
|
|
528
|
+
maxLength: 253,
|
|
529
|
+
aliases: [
|
|
530
|
+
'company domain',
|
|
531
|
+
'domain name',
|
|
532
|
+
'web domain',
|
|
533
|
+
'email domain'
|
|
534
|
+
],
|
|
535
|
+
description: 'The web address without the protocol: acme.com.'
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
id: 'website',
|
|
539
|
+
label: 'Website',
|
|
540
|
+
group: 'company',
|
|
541
|
+
type: 'url',
|
|
542
|
+
aliases: [
|
|
543
|
+
'web site',
|
|
544
|
+
'url',
|
|
545
|
+
'website url',
|
|
546
|
+
'homepage'
|
|
547
|
+
]
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
id: 'phone',
|
|
551
|
+
label: 'Phone',
|
|
552
|
+
group: 'company',
|
|
553
|
+
type: 'phone',
|
|
554
|
+
aliases: [
|
|
555
|
+
'phone number',
|
|
556
|
+
'company phone',
|
|
557
|
+
'main phone'
|
|
558
|
+
]
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
id: 'fax',
|
|
562
|
+
label: 'Fax',
|
|
563
|
+
group: 'company',
|
|
564
|
+
type: 'phone',
|
|
565
|
+
aliases: [
|
|
566
|
+
'fax number',
|
|
567
|
+
'company fax'
|
|
568
|
+
]
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
id: 'parentCompany',
|
|
572
|
+
label: 'Parent company',
|
|
573
|
+
group: 'company',
|
|
574
|
+
type: 'lookup',
|
|
575
|
+
lookup: {
|
|
576
|
+
resource: CRM_COMPANIES_RESOURCE,
|
|
577
|
+
by: [
|
|
578
|
+
'domain',
|
|
579
|
+
'name'
|
|
580
|
+
],
|
|
581
|
+
creatable: true
|
|
582
|
+
},
|
|
583
|
+
aliases: [
|
|
584
|
+
'parent',
|
|
585
|
+
'parent account',
|
|
586
|
+
'parent company name'
|
|
587
|
+
],
|
|
588
|
+
description: 'Another company, by its domain or name; never this one or one under it.'
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
id: 'type',
|
|
592
|
+
label: 'Type',
|
|
593
|
+
group: 'account',
|
|
594
|
+
type: 'picklist',
|
|
595
|
+
picklistId: 'accountType',
|
|
596
|
+
aliases: [
|
|
597
|
+
'account type',
|
|
598
|
+
'company type'
|
|
599
|
+
]
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
id: 'industry',
|
|
603
|
+
label: 'Industry',
|
|
604
|
+
group: 'account',
|
|
605
|
+
type: 'picklist',
|
|
606
|
+
picklistId: 'industry',
|
|
607
|
+
aliases: [
|
|
608
|
+
'sector',
|
|
609
|
+
'vertical'
|
|
610
|
+
]
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
id: 'rating',
|
|
614
|
+
label: 'Rating',
|
|
615
|
+
group: 'account',
|
|
616
|
+
type: 'picklist',
|
|
617
|
+
picklistId: 'rating',
|
|
618
|
+
aliases: [
|
|
619
|
+
'account rating'
|
|
620
|
+
]
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
id: 'ownership',
|
|
624
|
+
label: 'Ownership',
|
|
625
|
+
group: 'account',
|
|
626
|
+
type: 'picklist',
|
|
627
|
+
picklistId: 'ownership'
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
id: 'accountSource',
|
|
631
|
+
label: 'Account source',
|
|
632
|
+
group: 'account',
|
|
633
|
+
type: 'picklist',
|
|
634
|
+
picklistId: CRM_LEAD_SOURCE_PICKLIST,
|
|
635
|
+
aliases: [
|
|
636
|
+
'lead source',
|
|
637
|
+
'source'
|
|
638
|
+
]
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
id: 'accountNumber',
|
|
642
|
+
label: 'Account number',
|
|
643
|
+
group: 'account',
|
|
644
|
+
type: 'text',
|
|
645
|
+
maxLength: 40,
|
|
646
|
+
aliases: [
|
|
647
|
+
'account no',
|
|
648
|
+
'account no.'
|
|
649
|
+
]
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
id: 'site',
|
|
653
|
+
label: 'Account site',
|
|
654
|
+
group: 'account',
|
|
655
|
+
type: 'text',
|
|
656
|
+
maxLength: 80
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
id: 'tickerSymbol',
|
|
660
|
+
label: 'Ticker symbol',
|
|
661
|
+
group: 'account',
|
|
662
|
+
type: 'text',
|
|
663
|
+
maxLength: 20,
|
|
664
|
+
aliases: [
|
|
665
|
+
'ticker',
|
|
666
|
+
'stock symbol'
|
|
667
|
+
]
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
id: 'sicCode',
|
|
671
|
+
label: 'SIC code',
|
|
672
|
+
group: 'account',
|
|
673
|
+
type: 'text',
|
|
674
|
+
maxLength: 20,
|
|
675
|
+
aliases: [
|
|
676
|
+
'sic'
|
|
677
|
+
]
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
id: 'numberOfEmployees',
|
|
681
|
+
label: 'Employees',
|
|
682
|
+
group: 'account',
|
|
683
|
+
type: 'integer',
|
|
684
|
+
aliases: [
|
|
685
|
+
'number of employees',
|
|
686
|
+
'employee count',
|
|
687
|
+
'headcount'
|
|
688
|
+
]
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
id: 'annualRevenue',
|
|
692
|
+
label: 'Annual revenue',
|
|
693
|
+
group: 'account',
|
|
694
|
+
type: 'currency',
|
|
695
|
+
aliases: [
|
|
696
|
+
'revenue'
|
|
697
|
+
]
|
|
698
|
+
},
|
|
699
|
+
...addressFields('billing', 'Billing', 'billing'),
|
|
700
|
+
...addressFields('shipping', 'Shipping', 'shipping'),
|
|
701
|
+
{
|
|
702
|
+
id: 'owner',
|
|
703
|
+
label: 'Owner',
|
|
704
|
+
group: 'crm',
|
|
705
|
+
type: 'lookup',
|
|
706
|
+
lookup: {
|
|
707
|
+
resource: CRM_MEMBERS_TARGET,
|
|
708
|
+
by: [
|
|
709
|
+
'email',
|
|
710
|
+
'name'
|
|
711
|
+
]
|
|
712
|
+
},
|
|
713
|
+
aliases: [
|
|
714
|
+
'owner email',
|
|
715
|
+
'company owner',
|
|
716
|
+
'account owner',
|
|
717
|
+
'assigned to'
|
|
718
|
+
],
|
|
719
|
+
description: 'A member of the workspace, by email or name.'
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
id: 'tags',
|
|
723
|
+
label: 'Tags',
|
|
724
|
+
group: 'crm',
|
|
725
|
+
type: 'tags',
|
|
726
|
+
aliases: [
|
|
727
|
+
'tag',
|
|
728
|
+
'labels'
|
|
729
|
+
]
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
id: 'notes',
|
|
733
|
+
label: 'Notes',
|
|
734
|
+
group: 'crm',
|
|
735
|
+
type: 'longText',
|
|
736
|
+
maxLength: 4000,
|
|
737
|
+
aliases: [
|
|
738
|
+
'note',
|
|
739
|
+
'description',
|
|
740
|
+
'comments'
|
|
741
|
+
]
|
|
742
|
+
}
|
|
743
|
+
];
|
|
744
|
+
/** What only the platform writes about a company. */ export const COMPANY_TRANSFER_DERIVED = [
|
|
745
|
+
{
|
|
746
|
+
id: 'contactsCount',
|
|
747
|
+
label: 'Contacts',
|
|
748
|
+
group: 'crm',
|
|
749
|
+
type: 'integer',
|
|
750
|
+
readOnly: true
|
|
751
|
+
}
|
|
752
|
+
];
|
|
753
|
+
/*==========================================
|
|
754
|
+
* CUSTOM FIELDS
|
|
755
|
+
*=========================================*/ /** How each custom field type is read from a file. */ const CUSTOM_TYPES = {
|
|
756
|
+
text: 'text',
|
|
757
|
+
number: 'number',
|
|
758
|
+
date: 'date',
|
|
759
|
+
select: 'picklist',
|
|
760
|
+
checkbox: 'boolean',
|
|
761
|
+
url: 'url'
|
|
762
|
+
};
|
|
763
|
+
/**
|
|
764
|
+
* The organization's custom fields for one kind of record, as the catalog
|
|
765
|
+
* takes them (`custom:<key>`): live definitions only, in their order, a
|
|
766
|
+
* `select` matched as a picklist of its options.
|
|
767
|
+
*/ export function crmCustomTransferFields(definitions, object) {
|
|
768
|
+
return [
|
|
769
|
+
...definitions
|
|
770
|
+
].filter((definition)=>definition.key && !definition.retiredAt).sort((a, b)=>{
|
|
771
|
+
var _a_order, _b_order;
|
|
772
|
+
return Number((_a_order = a.order) != null ? _a_order : 0) - Number((_b_order = b.order) != null ? _b_order : 0) || a.key.localeCompare(b.key);
|
|
773
|
+
}).map((definition)=>{
|
|
774
|
+
var _CUSTOM_TYPES_definition_type;
|
|
775
|
+
return _extends({
|
|
776
|
+
key: definition.key,
|
|
777
|
+
label: definition.label || definition.key,
|
|
778
|
+
type: (_CUSTOM_TYPES_definition_type = CUSTOM_TYPES[definition.type]) != null ? _CUSTOM_TYPES_definition_type : 'text'
|
|
779
|
+
}, definition.type === 'select' ? {
|
|
780
|
+
picklistId: crmCustomPicklistId(object, definition.key)
|
|
781
|
+
} : {});
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
/*==========================================
|
|
785
|
+
* LEADS (AGL-3528)
|
|
786
|
+
*=========================================*/ export const CRM_LEADS_RESOURCE = 'crm.leads';
|
|
787
|
+
export const CRM_DEALS_RESOURCE = 'crm.deals';
|
|
788
|
+
export const CRM_TASKS_RESOURCE = 'crm.tasks';
|
|
789
|
+
export const CRM_ACTIVITIES_RESOURCE = 'crm.activities';
|
|
790
|
+
export const CRM_PIPELINES_RESOURCE = 'crm.pipelines';
|
|
791
|
+
export const CRM_FIELDS_RESOURCE = 'crm.fields';
|
|
792
|
+
/** The organization's live campaigns as a list a lead's campaign names are matched onto. */ export const CRM_CAMPAIGNS_PICKLIST = 'crm.campaigns';
|
|
793
|
+
/** Salesforce's forecast categories as a fixed list a value is matched onto. */ export const CRM_FORECAST_CATEGORY_PICKLIST = 'crm.forecastCategory';
|
|
794
|
+
export const LEAD_TRANSFER_GROUPS = [
|
|
795
|
+
{
|
|
796
|
+
id: 'person',
|
|
797
|
+
label: 'Person'
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
id: 'company',
|
|
801
|
+
label: 'Company'
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
id: 'address',
|
|
805
|
+
label: 'Address'
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
id: 'crm',
|
|
809
|
+
label: 'CRM'
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
id: 'activity',
|
|
813
|
+
label: 'Activity'
|
|
814
|
+
}
|
|
815
|
+
];
|
|
816
|
+
/** A lead's own fields, in the order the picker lists them. */ export const LEAD_TRANSFER_FIELDS = [
|
|
817
|
+
{
|
|
818
|
+
id: 'email',
|
|
819
|
+
label: 'Email',
|
|
820
|
+
group: 'person',
|
|
821
|
+
type: 'email',
|
|
822
|
+
required: true,
|
|
823
|
+
matchKey: true,
|
|
824
|
+
aliases: [
|
|
825
|
+
'email address',
|
|
826
|
+
'e-mail',
|
|
827
|
+
'lead email',
|
|
828
|
+
'work email'
|
|
829
|
+
],
|
|
830
|
+
description: 'Who the person is: a lead is found and kept by its email.'
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
id: 'name',
|
|
834
|
+
label: 'Full name',
|
|
835
|
+
group: 'person',
|
|
836
|
+
type: 'text',
|
|
837
|
+
maxLength: 120,
|
|
838
|
+
aliases: [
|
|
839
|
+
'name',
|
|
840
|
+
'lead name'
|
|
841
|
+
],
|
|
842
|
+
description: 'Built from the first and last names when either is set.'
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
id: 'salutation',
|
|
846
|
+
label: 'Salutation',
|
|
847
|
+
group: 'person',
|
|
848
|
+
type: 'picklist',
|
|
849
|
+
picklistId: CRM_SALUTATION_PICKLIST,
|
|
850
|
+
aliases: [
|
|
851
|
+
'prefix'
|
|
852
|
+
]
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
id: 'firstName',
|
|
856
|
+
label: 'First name',
|
|
857
|
+
group: 'person',
|
|
858
|
+
type: 'text',
|
|
859
|
+
maxLength: 120,
|
|
860
|
+
aliases: [
|
|
861
|
+
'given name'
|
|
862
|
+
]
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
id: 'lastName',
|
|
866
|
+
label: 'Last name',
|
|
867
|
+
group: 'person',
|
|
868
|
+
type: 'text',
|
|
869
|
+
maxLength: 120,
|
|
870
|
+
aliases: [
|
|
871
|
+
'surname',
|
|
872
|
+
'family name'
|
|
873
|
+
]
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
id: 'jobTitle',
|
|
877
|
+
label: 'Job title',
|
|
878
|
+
group: 'person',
|
|
879
|
+
type: 'text',
|
|
880
|
+
maxLength: 120,
|
|
881
|
+
aliases: [
|
|
882
|
+
'title',
|
|
883
|
+
'position'
|
|
884
|
+
]
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
id: 'phone',
|
|
888
|
+
label: 'Phone',
|
|
889
|
+
group: 'person',
|
|
890
|
+
type: 'phone',
|
|
891
|
+
aliases: [
|
|
892
|
+
'phone number',
|
|
893
|
+
'telephone'
|
|
894
|
+
]
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
id: 'mobilePhone',
|
|
898
|
+
label: 'Mobile phone',
|
|
899
|
+
group: 'person',
|
|
900
|
+
type: 'phone',
|
|
901
|
+
aliases: [
|
|
902
|
+
'mobile',
|
|
903
|
+
'cell'
|
|
904
|
+
]
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
id: 'fax',
|
|
908
|
+
label: 'Fax',
|
|
909
|
+
group: 'person',
|
|
910
|
+
type: 'phone'
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
id: 'doNotCall',
|
|
914
|
+
label: 'Do not call',
|
|
915
|
+
group: 'person',
|
|
916
|
+
type: 'boolean',
|
|
917
|
+
description: 'A file can say a person asked not to be called; never that they took it back.'
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
id: 'company',
|
|
921
|
+
label: 'Company',
|
|
922
|
+
group: 'company',
|
|
923
|
+
type: 'text',
|
|
924
|
+
maxLength: 120,
|
|
925
|
+
aliases: [
|
|
926
|
+
'company name',
|
|
927
|
+
'organization',
|
|
928
|
+
'account'
|
|
929
|
+
],
|
|
930
|
+
description: 'The company as text; converting the lead links or creates the company.'
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
id: 'website',
|
|
934
|
+
label: 'Website',
|
|
935
|
+
group: 'company',
|
|
936
|
+
type: 'url',
|
|
937
|
+
aliases: [
|
|
938
|
+
'url',
|
|
939
|
+
'web site'
|
|
940
|
+
]
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
id: 'industry',
|
|
944
|
+
label: 'Industry',
|
|
945
|
+
group: 'company',
|
|
946
|
+
type: 'picklist',
|
|
947
|
+
picklistId: 'industry'
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
id: 'rating',
|
|
951
|
+
label: 'Rating',
|
|
952
|
+
group: 'company',
|
|
953
|
+
type: 'picklist',
|
|
954
|
+
picklistId: 'rating'
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
id: 'numberOfEmployees',
|
|
958
|
+
label: 'Employees',
|
|
959
|
+
group: 'company',
|
|
960
|
+
type: 'integer',
|
|
961
|
+
aliases: [
|
|
962
|
+
'number of employees',
|
|
963
|
+
'headcount'
|
|
964
|
+
]
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
id: 'annualRevenue',
|
|
968
|
+
label: 'Annual revenue',
|
|
969
|
+
group: 'company',
|
|
970
|
+
type: 'currency',
|
|
971
|
+
aliases: [
|
|
972
|
+
'revenue'
|
|
973
|
+
]
|
|
974
|
+
},
|
|
975
|
+
...addressFields('address', 'Address', 'address'),
|
|
976
|
+
{
|
|
977
|
+
id: 'status',
|
|
978
|
+
label: 'Status',
|
|
979
|
+
group: 'crm',
|
|
980
|
+
type: 'picklist',
|
|
981
|
+
picklistId: CRM_LEAD_STATUS_PICKLIST,
|
|
982
|
+
aliases: [
|
|
983
|
+
'lead status'
|
|
984
|
+
],
|
|
985
|
+
description: 'Any status but Qualified, which converting the lead sets.'
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
id: 'owner',
|
|
989
|
+
label: 'Owner',
|
|
990
|
+
group: 'crm',
|
|
991
|
+
type: 'lookup',
|
|
992
|
+
lookup: {
|
|
993
|
+
resource: CRM_MEMBERS_TARGET,
|
|
994
|
+
by: [
|
|
995
|
+
'email',
|
|
996
|
+
'name'
|
|
997
|
+
]
|
|
998
|
+
},
|
|
999
|
+
aliases: [
|
|
1000
|
+
'owner email',
|
|
1001
|
+
'lead owner',
|
|
1002
|
+
'assigned to'
|
|
1003
|
+
],
|
|
1004
|
+
description: 'A member of the workspace, by email or name.'
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
id: 'leadSource',
|
|
1008
|
+
label: 'Lead source',
|
|
1009
|
+
group: 'crm',
|
|
1010
|
+
type: 'picklist',
|
|
1011
|
+
picklistId: CRM_LEAD_SOURCE_PICKLIST,
|
|
1012
|
+
aliases: [
|
|
1013
|
+
'source'
|
|
1014
|
+
]
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
id: 'campaigns',
|
|
1018
|
+
label: 'Campaigns',
|
|
1019
|
+
group: 'crm',
|
|
1020
|
+
type: 'multiPicklist',
|
|
1021
|
+
picklistId: CRM_CAMPAIGNS_PICKLIST,
|
|
1022
|
+
description: 'Campaigns by name; added to the ones the lead is filed under.'
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
id: 'tags',
|
|
1026
|
+
label: 'Tags',
|
|
1027
|
+
group: 'crm',
|
|
1028
|
+
type: 'tags',
|
|
1029
|
+
aliases: [
|
|
1030
|
+
'tag',
|
|
1031
|
+
'labels'
|
|
1032
|
+
]
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
id: 'unqualifiedReason',
|
|
1036
|
+
label: 'Unqualified reason',
|
|
1037
|
+
group: 'crm',
|
|
1038
|
+
type: 'text',
|
|
1039
|
+
maxLength: 120
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
id: 'notes',
|
|
1043
|
+
label: 'Notes',
|
|
1044
|
+
group: 'crm',
|
|
1045
|
+
type: 'longText',
|
|
1046
|
+
maxLength: 4000,
|
|
1047
|
+
aliases: [
|
|
1048
|
+
'note',
|
|
1049
|
+
'description'
|
|
1050
|
+
]
|
|
1051
|
+
}
|
|
1052
|
+
];
|
|
1053
|
+
/** What only the platform records about a lead. */ export const LEAD_TRANSFER_DERIVED = [
|
|
1054
|
+
{
|
|
1055
|
+
id: 'sources',
|
|
1056
|
+
label: 'Captured through',
|
|
1057
|
+
group: 'activity',
|
|
1058
|
+
type: 'tags',
|
|
1059
|
+
readOnly: true
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
id: 'firstSeenAt',
|
|
1063
|
+
label: 'First seen',
|
|
1064
|
+
group: 'activity',
|
|
1065
|
+
type: 'datetime',
|
|
1066
|
+
readOnly: true
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
id: 'lastSeenAt',
|
|
1070
|
+
label: 'Last seen',
|
|
1071
|
+
group: 'activity',
|
|
1072
|
+
type: 'datetime',
|
|
1073
|
+
readOnly: true
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
id: 'captures',
|
|
1077
|
+
label: 'Captures',
|
|
1078
|
+
group: 'activity',
|
|
1079
|
+
type: 'integer',
|
|
1080
|
+
readOnly: true
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
id: 'convertedAt',
|
|
1084
|
+
label: 'Converted',
|
|
1085
|
+
group: 'activity',
|
|
1086
|
+
type: 'datetime',
|
|
1087
|
+
readOnly: true
|
|
1088
|
+
}
|
|
1089
|
+
];
|
|
1090
|
+
/*==========================================
|
|
1091
|
+
* DEALS (AGL-3528)
|
|
1092
|
+
*=========================================*/ export const DEAL_TRANSFER_GROUPS = [
|
|
1093
|
+
{
|
|
1094
|
+
id: 'deal',
|
|
1095
|
+
label: 'Deal'
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
id: 'people',
|
|
1099
|
+
label: 'People and companies'
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
id: 'forecast',
|
|
1103
|
+
label: 'Forecast'
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
id: 'crm',
|
|
1107
|
+
label: 'CRM'
|
|
1108
|
+
}
|
|
1109
|
+
];
|
|
1110
|
+
/** A deal's own fields, in the order the picker lists them. */ export const DEAL_TRANSFER_FIELDS = [
|
|
1111
|
+
{
|
|
1112
|
+
id: 'title',
|
|
1113
|
+
label: 'Deal name',
|
|
1114
|
+
group: 'deal',
|
|
1115
|
+
type: 'text',
|
|
1116
|
+
required: true,
|
|
1117
|
+
maxLength: 200,
|
|
1118
|
+
aliases: [
|
|
1119
|
+
'title',
|
|
1120
|
+
'deal',
|
|
1121
|
+
'opportunity',
|
|
1122
|
+
'opportunity name'
|
|
1123
|
+
]
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
id: 'externalId',
|
|
1127
|
+
label: 'External ID',
|
|
1128
|
+
group: 'deal',
|
|
1129
|
+
type: 'text',
|
|
1130
|
+
matchKey: true,
|
|
1131
|
+
maxLength: 200,
|
|
1132
|
+
aliases: [
|
|
1133
|
+
'external id',
|
|
1134
|
+
'opportunity id',
|
|
1135
|
+
'deal id'
|
|
1136
|
+
],
|
|
1137
|
+
description: 'The id another product gave the deal: an import finds the deal again by it.'
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
id: 'pipeline',
|
|
1141
|
+
label: 'Pipeline',
|
|
1142
|
+
group: 'deal',
|
|
1143
|
+
type: 'text',
|
|
1144
|
+
description: 'By name; the default pipeline when blank.'
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
id: 'stage',
|
|
1148
|
+
label: 'Stage',
|
|
1149
|
+
group: 'deal',
|
|
1150
|
+
type: 'text',
|
|
1151
|
+
aliases: [
|
|
1152
|
+
'deal stage'
|
|
1153
|
+
],
|
|
1154
|
+
description: 'By name; the pipeline’s first open stage when blank.'
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
id: 'amount',
|
|
1158
|
+
label: 'Amount',
|
|
1159
|
+
group: 'deal',
|
|
1160
|
+
type: 'currency',
|
|
1161
|
+
aliases: [
|
|
1162
|
+
'value',
|
|
1163
|
+
'deal value',
|
|
1164
|
+
'deal amount'
|
|
1165
|
+
]
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
id: 'expectedClose',
|
|
1169
|
+
label: 'Expected close',
|
|
1170
|
+
group: 'deal',
|
|
1171
|
+
type: 'date',
|
|
1172
|
+
aliases: [
|
|
1173
|
+
'close date',
|
|
1174
|
+
'expected close date'
|
|
1175
|
+
]
|
|
1176
|
+
},
|
|
1177
|
+
{
|
|
1178
|
+
id: 'type',
|
|
1179
|
+
label: 'Type',
|
|
1180
|
+
group: 'deal',
|
|
1181
|
+
type: 'picklist',
|
|
1182
|
+
picklistId: CRM_OPPORTUNITY_TYPE_PICKLIST,
|
|
1183
|
+
aliases: [
|
|
1184
|
+
'deal type',
|
|
1185
|
+
'opportunity type'
|
|
1186
|
+
]
|
|
1187
|
+
},
|
|
1188
|
+
{
|
|
1189
|
+
id: 'leadSource',
|
|
1190
|
+
label: 'Lead source',
|
|
1191
|
+
group: 'deal',
|
|
1192
|
+
type: 'picklist',
|
|
1193
|
+
picklistId: CRM_LEAD_SOURCE_PICKLIST,
|
|
1194
|
+
aliases: [
|
|
1195
|
+
'source'
|
|
1196
|
+
]
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
id: 'nextStep',
|
|
1200
|
+
label: 'Next step',
|
|
1201
|
+
group: 'deal',
|
|
1202
|
+
type: 'text',
|
|
1203
|
+
maxLength: 255
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
id: 'lostReason',
|
|
1207
|
+
label: 'Lost reason',
|
|
1208
|
+
group: 'deal',
|
|
1209
|
+
type: 'text',
|
|
1210
|
+
maxLength: 500,
|
|
1211
|
+
aliases: [
|
|
1212
|
+
'closed lost reason'
|
|
1213
|
+
]
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
id: 'notes',
|
|
1217
|
+
label: 'Notes',
|
|
1218
|
+
group: 'deal',
|
|
1219
|
+
type: 'longText',
|
|
1220
|
+
maxLength: 4000,
|
|
1221
|
+
aliases: [
|
|
1222
|
+
'description'
|
|
1223
|
+
]
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
id: 'contact',
|
|
1227
|
+
label: 'Contact',
|
|
1228
|
+
group: 'people',
|
|
1229
|
+
type: 'lookup',
|
|
1230
|
+
lookup: {
|
|
1231
|
+
resource: CRM_CONTACTS_RESOURCE,
|
|
1232
|
+
by: [
|
|
1233
|
+
'email'
|
|
1234
|
+
]
|
|
1235
|
+
},
|
|
1236
|
+
aliases: [
|
|
1237
|
+
'contact email',
|
|
1238
|
+
'primary contact',
|
|
1239
|
+
'person'
|
|
1240
|
+
],
|
|
1241
|
+
description: 'The primary contact, by email.'
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
id: 'company',
|
|
1245
|
+
label: 'Company',
|
|
1246
|
+
group: 'people',
|
|
1247
|
+
type: 'lookup',
|
|
1248
|
+
lookup: {
|
|
1249
|
+
resource: CRM_COMPANIES_RESOURCE,
|
|
1250
|
+
by: [
|
|
1251
|
+
'domain',
|
|
1252
|
+
'name'
|
|
1253
|
+
],
|
|
1254
|
+
creatable: true
|
|
1255
|
+
},
|
|
1256
|
+
aliases: [
|
|
1257
|
+
'company name',
|
|
1258
|
+
'account name',
|
|
1259
|
+
'organization'
|
|
1260
|
+
],
|
|
1261
|
+
description: 'A company by its domain or name; one the CRM does not hold can be created.'
|
|
1262
|
+
},
|
|
1263
|
+
{
|
|
1264
|
+
id: 'contactRoles',
|
|
1265
|
+
label: 'Contact roles',
|
|
1266
|
+
group: 'people',
|
|
1267
|
+
type: 'text',
|
|
1268
|
+
description: 'Each contact by email with their role after them, the primary first: ana@acme.com (Decision Maker); bo@acme.com.'
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
id: 'owner',
|
|
1272
|
+
label: 'Owner',
|
|
1273
|
+
group: 'crm',
|
|
1274
|
+
type: 'lookup',
|
|
1275
|
+
lookup: {
|
|
1276
|
+
resource: CRM_MEMBERS_TARGET,
|
|
1277
|
+
by: [
|
|
1278
|
+
'email',
|
|
1279
|
+
'name'
|
|
1280
|
+
]
|
|
1281
|
+
},
|
|
1282
|
+
aliases: [
|
|
1283
|
+
'owner email',
|
|
1284
|
+
'deal owner',
|
|
1285
|
+
'opportunity owner'
|
|
1286
|
+
],
|
|
1287
|
+
description: 'A member of the workspace, by email or name.'
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
id: 'campaign',
|
|
1291
|
+
label: 'Campaign',
|
|
1292
|
+
group: 'crm',
|
|
1293
|
+
type: 'text',
|
|
1294
|
+
aliases: [
|
|
1295
|
+
'primary campaign source'
|
|
1296
|
+
],
|
|
1297
|
+
description: 'A campaign by name.'
|
|
1298
|
+
},
|
|
1299
|
+
{
|
|
1300
|
+
id: 'probability',
|
|
1301
|
+
label: 'Probability',
|
|
1302
|
+
group: 'forecast',
|
|
1303
|
+
type: 'percent',
|
|
1304
|
+
aliases: [
|
|
1305
|
+
'probability (%)'
|
|
1306
|
+
]
|
|
1307
|
+
},
|
|
1308
|
+
{
|
|
1309
|
+
id: 'forecastCategory',
|
|
1310
|
+
label: 'Forecast category',
|
|
1311
|
+
group: 'forecast',
|
|
1312
|
+
type: 'picklist',
|
|
1313
|
+
picklistId: CRM_FORECAST_CATEGORY_PICKLIST
|
|
1314
|
+
}
|
|
1315
|
+
];
|
|
1316
|
+
/** What a deal's stage decides: exported, never written from a file. */ export const DEAL_TRANSFER_DERIVED = [
|
|
1317
|
+
{
|
|
1318
|
+
id: 'status',
|
|
1319
|
+
label: 'Status',
|
|
1320
|
+
group: 'deal',
|
|
1321
|
+
type: 'text',
|
|
1322
|
+
readOnly: true
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
id: 'closedAt',
|
|
1326
|
+
label: 'Closed',
|
|
1327
|
+
group: 'deal',
|
|
1328
|
+
type: 'datetime',
|
|
1329
|
+
readOnly: true
|
|
1330
|
+
}
|
|
1331
|
+
];
|
|
1332
|
+
/*==========================================
|
|
1333
|
+
* TASKS (AGL-3528)
|
|
1334
|
+
*=========================================*/ export const TASK_TRANSFER_GROUPS = [
|
|
1335
|
+
{
|
|
1336
|
+
id: 'task',
|
|
1337
|
+
label: 'Task'
|
|
1338
|
+
},
|
|
1339
|
+
{
|
|
1340
|
+
id: 'links',
|
|
1341
|
+
label: 'What it is for'
|
|
1342
|
+
}
|
|
1343
|
+
];
|
|
1344
|
+
/** A task's own fields, in the order the picker lists them. */ export const TASK_TRANSFER_FIELDS = [
|
|
1345
|
+
{
|
|
1346
|
+
id: 'title',
|
|
1347
|
+
label: 'Subject',
|
|
1348
|
+
group: 'task',
|
|
1349
|
+
type: 'text',
|
|
1350
|
+
required: true,
|
|
1351
|
+
maxLength: 200,
|
|
1352
|
+
aliases: [
|
|
1353
|
+
'title',
|
|
1354
|
+
'task',
|
|
1355
|
+
'task name'
|
|
1356
|
+
]
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
id: 'externalId',
|
|
1360
|
+
label: 'External ID',
|
|
1361
|
+
group: 'task',
|
|
1362
|
+
type: 'text',
|
|
1363
|
+
matchKey: true,
|
|
1364
|
+
maxLength: 200,
|
|
1365
|
+
aliases: [
|
|
1366
|
+
'external id',
|
|
1367
|
+
'task id',
|
|
1368
|
+
'activity id'
|
|
1369
|
+
],
|
|
1370
|
+
description: 'The id another product gave the task: an import finds the task again by it.'
|
|
1371
|
+
},
|
|
1372
|
+
{
|
|
1373
|
+
id: 'type',
|
|
1374
|
+
label: 'Type',
|
|
1375
|
+
group: 'task',
|
|
1376
|
+
type: 'picklist',
|
|
1377
|
+
picklistId: 'taskType',
|
|
1378
|
+
aliases: [
|
|
1379
|
+
'task type'
|
|
1380
|
+
]
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
id: 'priority',
|
|
1384
|
+
label: 'Priority',
|
|
1385
|
+
group: 'task',
|
|
1386
|
+
type: 'picklist',
|
|
1387
|
+
picklistId: 'taskPriority'
|
|
1388
|
+
},
|
|
1389
|
+
{
|
|
1390
|
+
id: 'status',
|
|
1391
|
+
label: 'Status',
|
|
1392
|
+
group: 'task',
|
|
1393
|
+
type: 'picklist',
|
|
1394
|
+
picklistId: 'taskStatus',
|
|
1395
|
+
aliases: [
|
|
1396
|
+
'task status'
|
|
1397
|
+
]
|
|
1398
|
+
},
|
|
1399
|
+
{
|
|
1400
|
+
id: 'dueAt',
|
|
1401
|
+
label: 'Due',
|
|
1402
|
+
group: 'task',
|
|
1403
|
+
type: 'datetime',
|
|
1404
|
+
aliases: [
|
|
1405
|
+
'due date',
|
|
1406
|
+
'due by',
|
|
1407
|
+
'activity date'
|
|
1408
|
+
]
|
|
1409
|
+
},
|
|
1410
|
+
{
|
|
1411
|
+
id: 'assignee',
|
|
1412
|
+
label: 'Assigned to',
|
|
1413
|
+
group: 'task',
|
|
1414
|
+
type: 'lookup',
|
|
1415
|
+
lookup: {
|
|
1416
|
+
resource: CRM_MEMBERS_TARGET,
|
|
1417
|
+
by: [
|
|
1418
|
+
'email',
|
|
1419
|
+
'name'
|
|
1420
|
+
]
|
|
1421
|
+
},
|
|
1422
|
+
aliases: [
|
|
1423
|
+
'assignee',
|
|
1424
|
+
'owner',
|
|
1425
|
+
'assigned to email'
|
|
1426
|
+
],
|
|
1427
|
+
description: 'A member of the workspace, by email or name.'
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
id: 'notes',
|
|
1431
|
+
label: 'Notes',
|
|
1432
|
+
group: 'task',
|
|
1433
|
+
type: 'longText',
|
|
1434
|
+
maxLength: 4000,
|
|
1435
|
+
aliases: [
|
|
1436
|
+
'comments',
|
|
1437
|
+
'description'
|
|
1438
|
+
]
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
id: 'contact',
|
|
1442
|
+
label: 'Contact',
|
|
1443
|
+
group: 'links',
|
|
1444
|
+
type: 'lookup',
|
|
1445
|
+
lookup: {
|
|
1446
|
+
resource: CRM_CONTACTS_RESOURCE,
|
|
1447
|
+
by: [
|
|
1448
|
+
'email'
|
|
1449
|
+
]
|
|
1450
|
+
},
|
|
1451
|
+
aliases: [
|
|
1452
|
+
'contact email'
|
|
1453
|
+
],
|
|
1454
|
+
description: 'A contact, by email.'
|
|
1455
|
+
},
|
|
1456
|
+
{
|
|
1457
|
+
id: 'company',
|
|
1458
|
+
label: 'Company',
|
|
1459
|
+
group: 'links',
|
|
1460
|
+
type: 'lookup',
|
|
1461
|
+
lookup: {
|
|
1462
|
+
resource: CRM_COMPANIES_RESOURCE,
|
|
1463
|
+
by: [
|
|
1464
|
+
'domain',
|
|
1465
|
+
'name'
|
|
1466
|
+
]
|
|
1467
|
+
},
|
|
1468
|
+
aliases: [
|
|
1469
|
+
'company name',
|
|
1470
|
+
'account'
|
|
1471
|
+
],
|
|
1472
|
+
description: 'A company, by its domain or name.'
|
|
1473
|
+
},
|
|
1474
|
+
{
|
|
1475
|
+
id: 'deal',
|
|
1476
|
+
label: 'Deal',
|
|
1477
|
+
group: 'links',
|
|
1478
|
+
type: 'lookup',
|
|
1479
|
+
lookup: {
|
|
1480
|
+
resource: CRM_DEALS_RESOURCE,
|
|
1481
|
+
by: [
|
|
1482
|
+
'externalId',
|
|
1483
|
+
'title'
|
|
1484
|
+
]
|
|
1485
|
+
},
|
|
1486
|
+
aliases: [
|
|
1487
|
+
'deal name',
|
|
1488
|
+
'opportunity',
|
|
1489
|
+
'related to'
|
|
1490
|
+
],
|
|
1491
|
+
description: 'A deal, by its external id or its name.'
|
|
1492
|
+
}
|
|
1493
|
+
];
|
|
1494
|
+
/** When a task was done: exported, never written from a file. */ export const TASK_TRANSFER_DERIVED = [
|
|
1495
|
+
{
|
|
1496
|
+
id: 'completedAt',
|
|
1497
|
+
label: 'Completed',
|
|
1498
|
+
group: 'task',
|
|
1499
|
+
type: 'datetime',
|
|
1500
|
+
readOnly: true
|
|
1501
|
+
}
|
|
1502
|
+
];
|
|
1503
|
+
/*==========================================
|
|
1504
|
+
* ACTIVITIES, PIPELINES AND FIELD DEFINITIONS — exported only (AGL-3528)
|
|
1505
|
+
*=========================================*/ export const ACTIVITY_TRANSFER_GROUPS = [
|
|
1506
|
+
{
|
|
1507
|
+
id: 'activity',
|
|
1508
|
+
label: 'Activity'
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
id: 'links',
|
|
1512
|
+
label: 'What it is about'
|
|
1513
|
+
}
|
|
1514
|
+
];
|
|
1515
|
+
/** Everything an export of the team's logged work carries. Read-only: activities are logged, not imported. */ export const ACTIVITY_TRANSFER_FIELDS = [
|
|
1516
|
+
{
|
|
1517
|
+
id: 'subject',
|
|
1518
|
+
label: 'Subject',
|
|
1519
|
+
group: 'activity',
|
|
1520
|
+
type: 'text',
|
|
1521
|
+
readOnly: true
|
|
1522
|
+
},
|
|
1523
|
+
{
|
|
1524
|
+
id: 'kind',
|
|
1525
|
+
label: 'Type',
|
|
1526
|
+
group: 'activity',
|
|
1527
|
+
type: 'text',
|
|
1528
|
+
readOnly: true
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
id: 'direction',
|
|
1532
|
+
label: 'Direction',
|
|
1533
|
+
group: 'activity',
|
|
1534
|
+
type: 'text',
|
|
1535
|
+
readOnly: true
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
id: 'at',
|
|
1539
|
+
label: 'When',
|
|
1540
|
+
group: 'activity',
|
|
1541
|
+
type: 'datetime',
|
|
1542
|
+
readOnly: true
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
id: 'body',
|
|
1546
|
+
label: 'Details',
|
|
1547
|
+
group: 'activity',
|
|
1548
|
+
type: 'longText',
|
|
1549
|
+
readOnly: true
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
id: 'outcome',
|
|
1553
|
+
label: 'Outcome',
|
|
1554
|
+
group: 'activity',
|
|
1555
|
+
type: 'text',
|
|
1556
|
+
readOnly: true
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
id: 'durationMinutes',
|
|
1560
|
+
label: 'Minutes',
|
|
1561
|
+
group: 'activity',
|
|
1562
|
+
type: 'integer',
|
|
1563
|
+
readOnly: true
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
id: 'by',
|
|
1567
|
+
label: 'Logged by',
|
|
1568
|
+
group: 'activity',
|
|
1569
|
+
type: 'text',
|
|
1570
|
+
readOnly: true
|
|
1571
|
+
},
|
|
1572
|
+
{
|
|
1573
|
+
id: 'to',
|
|
1574
|
+
label: 'To',
|
|
1575
|
+
group: 'activity',
|
|
1576
|
+
type: 'text',
|
|
1577
|
+
readOnly: true
|
|
1578
|
+
},
|
|
1579
|
+
{
|
|
1580
|
+
id: 'from',
|
|
1581
|
+
label: 'From',
|
|
1582
|
+
group: 'activity',
|
|
1583
|
+
type: 'text',
|
|
1584
|
+
readOnly: true
|
|
1585
|
+
},
|
|
1586
|
+
{
|
|
1587
|
+
id: 'deliveryState',
|
|
1588
|
+
label: 'Delivery',
|
|
1589
|
+
group: 'activity',
|
|
1590
|
+
type: 'text',
|
|
1591
|
+
readOnly: true
|
|
1592
|
+
},
|
|
1593
|
+
{
|
|
1594
|
+
id: 'contact',
|
|
1595
|
+
label: 'Contact',
|
|
1596
|
+
group: 'links',
|
|
1597
|
+
type: 'text',
|
|
1598
|
+
readOnly: true
|
|
1599
|
+
},
|
|
1600
|
+
{
|
|
1601
|
+
id: 'company',
|
|
1602
|
+
label: 'Company',
|
|
1603
|
+
group: 'links',
|
|
1604
|
+
type: 'text',
|
|
1605
|
+
readOnly: true
|
|
1606
|
+
},
|
|
1607
|
+
{
|
|
1608
|
+
id: 'deal',
|
|
1609
|
+
label: 'Deal',
|
|
1610
|
+
group: 'links',
|
|
1611
|
+
type: 'text',
|
|
1612
|
+
readOnly: true
|
|
1613
|
+
},
|
|
1614
|
+
{
|
|
1615
|
+
id: 'lead',
|
|
1616
|
+
label: 'Lead',
|
|
1617
|
+
group: 'links',
|
|
1618
|
+
type: 'text',
|
|
1619
|
+
readOnly: true
|
|
1620
|
+
}
|
|
1621
|
+
];
|
|
1622
|
+
export const PIPELINE_TRANSFER_GROUPS = [
|
|
1623
|
+
{
|
|
1624
|
+
id: 'pipeline',
|
|
1625
|
+
label: 'Pipeline'
|
|
1626
|
+
},
|
|
1627
|
+
{
|
|
1628
|
+
id: 'stage',
|
|
1629
|
+
label: 'Stage'
|
|
1630
|
+
}
|
|
1631
|
+
];
|
|
1632
|
+
/** One row per stage of every pipeline. Read-only: pipelines are set up on their own page. */ export const PIPELINE_TRANSFER_FIELDS = [
|
|
1633
|
+
{
|
|
1634
|
+
id: 'pipeline',
|
|
1635
|
+
label: 'Pipeline',
|
|
1636
|
+
group: 'pipeline',
|
|
1637
|
+
type: 'text',
|
|
1638
|
+
readOnly: true
|
|
1639
|
+
},
|
|
1640
|
+
{
|
|
1641
|
+
id: 'pipelineId',
|
|
1642
|
+
label: 'Pipeline ID',
|
|
1643
|
+
group: 'pipeline',
|
|
1644
|
+
type: 'text',
|
|
1645
|
+
readOnly: true
|
|
1646
|
+
},
|
|
1647
|
+
{
|
|
1648
|
+
id: 'isDefault',
|
|
1649
|
+
label: 'Default pipeline',
|
|
1650
|
+
group: 'pipeline',
|
|
1651
|
+
type: 'boolean',
|
|
1652
|
+
readOnly: true
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
id: 'archived',
|
|
1656
|
+
label: 'Archived',
|
|
1657
|
+
group: 'pipeline',
|
|
1658
|
+
type: 'boolean',
|
|
1659
|
+
readOnly: true
|
|
1660
|
+
},
|
|
1661
|
+
{
|
|
1662
|
+
id: 'stage',
|
|
1663
|
+
label: 'Stage',
|
|
1664
|
+
group: 'stage',
|
|
1665
|
+
type: 'text',
|
|
1666
|
+
readOnly: true
|
|
1667
|
+
},
|
|
1668
|
+
{
|
|
1669
|
+
id: 'stageId',
|
|
1670
|
+
label: 'Stage ID',
|
|
1671
|
+
group: 'stage',
|
|
1672
|
+
type: 'text',
|
|
1673
|
+
readOnly: true
|
|
1674
|
+
},
|
|
1675
|
+
{
|
|
1676
|
+
id: 'position',
|
|
1677
|
+
label: 'Position',
|
|
1678
|
+
group: 'stage',
|
|
1679
|
+
type: 'integer',
|
|
1680
|
+
readOnly: true
|
|
1681
|
+
},
|
|
1682
|
+
{
|
|
1683
|
+
id: 'kind',
|
|
1684
|
+
label: 'Kind',
|
|
1685
|
+
group: 'stage',
|
|
1686
|
+
type: 'text',
|
|
1687
|
+
readOnly: true
|
|
1688
|
+
},
|
|
1689
|
+
{
|
|
1690
|
+
id: 'probability',
|
|
1691
|
+
label: 'Probability',
|
|
1692
|
+
group: 'stage',
|
|
1693
|
+
type: 'percent',
|
|
1694
|
+
readOnly: true
|
|
1695
|
+
},
|
|
1696
|
+
{
|
|
1697
|
+
id: 'forecastCategory',
|
|
1698
|
+
label: 'Forecast category',
|
|
1699
|
+
group: 'stage',
|
|
1700
|
+
type: 'text',
|
|
1701
|
+
readOnly: true
|
|
1702
|
+
}
|
|
1703
|
+
];
|
|
1704
|
+
/** One row per custom field. Read-only: fields are defined on the Fields page. */ export const FIELD_DEFINITION_TRANSFER_FIELDS = [
|
|
1705
|
+
{
|
|
1706
|
+
id: 'label',
|
|
1707
|
+
label: 'Name',
|
|
1708
|
+
type: 'text',
|
|
1709
|
+
readOnly: true
|
|
1710
|
+
},
|
|
1711
|
+
{
|
|
1712
|
+
id: 'key',
|
|
1713
|
+
label: 'Key',
|
|
1714
|
+
type: 'text',
|
|
1715
|
+
readOnly: true
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
id: 'object',
|
|
1719
|
+
label: 'Record',
|
|
1720
|
+
type: 'text',
|
|
1721
|
+
readOnly: true
|
|
1722
|
+
},
|
|
1723
|
+
{
|
|
1724
|
+
id: 'type',
|
|
1725
|
+
label: 'Type',
|
|
1726
|
+
type: 'text',
|
|
1727
|
+
readOnly: true
|
|
1728
|
+
},
|
|
1729
|
+
{
|
|
1730
|
+
id: 'options',
|
|
1731
|
+
label: 'Choices',
|
|
1732
|
+
type: 'tags',
|
|
1733
|
+
readOnly: true
|
|
1734
|
+
},
|
|
1735
|
+
{
|
|
1736
|
+
id: 'required',
|
|
1737
|
+
label: 'Required',
|
|
1738
|
+
type: 'boolean',
|
|
1739
|
+
readOnly: true
|
|
1740
|
+
},
|
|
1741
|
+
{
|
|
1742
|
+
id: 'position',
|
|
1743
|
+
label: 'Position',
|
|
1744
|
+
type: 'integer',
|
|
1745
|
+
readOnly: true
|
|
1746
|
+
},
|
|
1747
|
+
{
|
|
1748
|
+
id: 'retired',
|
|
1749
|
+
label: 'Retired',
|
|
1750
|
+
type: 'boolean',
|
|
1751
|
+
readOnly: true
|
|
1752
|
+
}
|
|
1753
|
+
];
|
|
1754
|
+
|
|
1755
|
+
//# sourceMappingURL=fields.js.map
|