From 08860a90e41f504cb83396aa333be2c5eaed571f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=C5=BE=20Jerman?= Date: Tue, 8 Oct 2019 16:09:00 +0200 Subject: [PATCH] Add settings service to compose --- api/compose/spec.json | 86 ++++++ api/compose/spec/settings.json | 100 +++++++ compose/db/mysql/static.go | 2 +- .../mysql/20191008152820.settings.up.sql | 10 + compose/rest/handlers/settings.go | 139 ++++++++++ compose/rest/request/settings.go | 262 ++++++++++++++++++ compose/rest/router.go | 1 + compose/rest/settings.go | 61 ++++ compose/service/access_control.go | 8 + compose/service/service.go | 8 + compose/service/settings.go | 96 +++++++ docs/compose/README.md | 73 +++++ provision/compose/static.go | 2 +- provision/messaging/static.go | 2 +- provision/system/static.go | 2 +- system/db/mysql/static.go | 2 +- 16 files changed, 849 insertions(+), 5 deletions(-) create mode 100644 api/compose/spec/settings.json create mode 100644 compose/db/schema/mysql/20191008152820.settings.up.sql create mode 100644 compose/rest/handlers/settings.go create mode 100644 compose/rest/request/settings.go create mode 100644 compose/rest/settings.go create mode 100644 compose/service/settings.go diff --git a/api/compose/spec.json b/api/compose/spec.json index 0fa299f60..6610c9e9a 100644 --- a/api/compose/spec.json +++ b/api/compose/spec.json @@ -1854,5 +1854,91 @@ } } ] + }, + { + "title": "Settings", + "path": "/settings", + "entrypoint": "settings", + "authentication": [], + "struct": [{ + "imports": [ + "sqlxTypes github.com/jmoiron/sqlx/types" + ] + }], + "apis": [{ + "name": "list", + "method": "GET", + "title": "List settings", + "path": "/", + "parameters": { + "get": [ + { + "name": "prefix", + "type": "string", + "title": "Key prefix" + } + ] + } + }, + { + "name": "update", + "method": "PATCH", + "title": "Update settings", + "path": "/", + "parameters": { + "post": [{ + "name": "values", + "type": "sqlxTypes.JSONText", + "title": "Array of new settings: `[{ name: ..., value: ... }]`. Omit value to remove setting", + "required": true + }] + } + }, + { + "name": "get", + "method": "GET", + "title": "Get a value for a key", + "path": "/{key}", + "parameters": { + "path": [{ + "name": "key", + "type": "string", + "title": "Setting key", + "required": true + }], + "get": [{ + "name": "ownerID", + "type": "uint64", + "title": "Owner ID" + }] + } + }, + { + "name": "set", + "method": "PUT", + "title": "Set a value for a key", + "path": "/{key}", + "parameters": { + "path": [{ + "name": "key", + "type": "string", + "title": "Setting key", + "required": true + }], + "post": [{ + "name": "ownerID", + "type": "uint64", + "title": "Owner" + }, + { + "name": "value", + "type": "sqlxTypes.JSONText", + "required": true, + "title": "Setting value" + } + ] + } + } + ] } ] diff --git a/api/compose/spec/settings.json b/api/compose/spec/settings.json new file mode 100644 index 000000000..12884045d --- /dev/null +++ b/api/compose/spec/settings.json @@ -0,0 +1,100 @@ +{ + "Title": "Settings", + "Interface": "Settings", + "Struct": [ + { + "imports": [ + "sqlxTypes github.com/jmoiron/sqlx/types" + ] + } + ], + "Parameters": null, + "Protocol": "", + "Authentication": [], + "Path": "/settings", + "APIs": [ + { + "Name": "list", + "Method": "GET", + "Title": "List settings", + "Path": "/", + "Parameters": { + "get": [ + { + "name": "prefix", + "title": "Key prefix", + "type": "string" + } + ] + } + }, + { + "Name": "update", + "Method": "PATCH", + "Title": "Update settings", + "Path": "/", + "Parameters": { + "post": [ + { + "name": "values", + "required": true, + "title": "Array of new settings: `[{ name: ..., value: ... }]`. Omit value to remove setting", + "type": "sqlxTypes.JSONText" + } + ] + } + }, + { + "Name": "get", + "Method": "GET", + "Title": "Get a value for a key", + "Path": "/{key}", + "Parameters": { + "get": [ + { + "name": "ownerID", + "title": "Owner ID", + "type": "uint64" + } + ], + "path": [ + { + "name": "key", + "required": true, + "title": "Setting key", + "type": "string" + } + ] + } + }, + { + "Name": "set", + "Method": "PUT", + "Title": "Set a value for a key", + "Path": "/{key}", + "Parameters": { + "path": [ + { + "name": "key", + "required": true, + "title": "Setting key", + "type": "string" + } + ], + "post": [ + { + "name": "ownerID", + "title": "Owner", + "type": "uint64" + }, + { + "name": "value", + "required": true, + "title": "Setting value", + "type": "sqlxTypes.JSONText" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/compose/db/mysql/static.go b/compose/db/mysql/static.go index 51f622a18..6c59e14a4 100644 --- a/compose/db/mysql/static.go +++ b/compose/db/mysql/static.go @@ -3,4 +3,4 @@ // Package contains static assets. package mysql -var Asset = "PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00 \x0020180704080000.base.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE `crm_content` (\n `id` bigint(20) unsigned NOT NULL,\n `module_id` bigint(20) unsigned NOT NULL,\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_at` datetime DEFAULT NULL,\n `deleted_at` datetime DEFAULT NULL,\n PRIMARY KEY (`id`,`module_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE `crm_content_column` (\n `content_id` bigint(20) NOT NULL,\n `column_name` varchar(255) NOT NULL,\n `column_value` text NOT NULL,\n PRIMARY KEY (`content_id`,`column_name`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE `crm_field` (\n `field_type` varchar(16) NOT NULL COMMENT 'Short field type (string, boolean,...)',\n `field_name` varchar(255) NOT NULL COMMENT 'Description of field contents',\n `field_template` varchar(255) NOT NULL COMMENT 'HTML template file for field',\n PRIMARY KEY (`field_type`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE `crm_module` (\n `id` bigint(20) unsigned NOT NULL,\n `name` varchar(64) NOT NULL COMMENT 'The name of the module',\n `json` json NOT NULL COMMENT 'List of field definitions for the module',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_at` datetime DEFAULT NULL,\n `deleted_at` datetime DEFAULT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE `crm_module_form` (\n `module_id` bigint(20) unsigned NOT NULL,\n `place` tinyint(3) unsigned NOT NULL,\n `kind` varchar(64) NOT NULL COMMENT 'The type of the form input field',\n `name` varchar(64) NOT NULL COMMENT 'The name of the field in the form',\n `label` varchar(255) NOT NULL COMMENT 'The label of the form input',\n `help_text` text NOT NULL COMMENT 'Help text',\n `default_value` text NOT NULL COMMENT 'Default value',\n `max_length` int(10) unsigned NOT NULL COMMENT 'Maximum input length',\n `is_private` tinyint(1) NOT NULL COMMENT 'Contains personal/sensitive data?',\n PRIMARY KEY (`module_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE `crm_page` (\n `id` bigint(20) unsigned NOT NULL COMMENT 'Page ID',\n `self_id` bigint(20) unsigned NOT NULL COMMENT 'Parent Page ID',\n `module_id` bigint(20) unsigned NOT NULL COMMENT 'Module ID (optional)',\n `title` varchar(255) NOT NULL COMMENT 'Title (required)',\n `description` text NOT NULL COMMENT 'Description',\n `blocks` json NOT NULL COMMENT 'JSON array of blocks for the page',\n `visible` tinyint(4) NOT NULL COMMENT 'Is page visible in navigation?',\n `weight` int(11) NOT NULL COMMENT 'Order for navigation',\n PRIMARY KEY (`id`) USING BTREE,\n KEY `module_id` (`module_id`),\n KEY `self_id` (`self_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nPK\x07\x08\xac\xe8\x19\x1d\x12\n\x00\x00\x12\n\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00%\x00 \x0020180704080001.crm_fields-data.up.sqlUT\x05\x00\x01\x80Cm8INSERT INTO `crm_field` VALUES ('bool','Boolean value (yes / no)','');\nINSERT INTO `crm_field` VALUES ('email','E-mail input','');\nINSERT INTO `crm_field` VALUES ('enum','Single option picker','');\nINSERT INTO `crm_field` VALUES ('hidden','Hidden value','');\nINSERT INTO `crm_field` VALUES ('stamp','Date/time input','');\nINSERT INTO `crm_field` VALUES ('text','Text input','');\nINSERT INTO `crm_field` VALUES ('textarea','Text input (multi-line)','');\nPK\x07\x08f\x18\x1e\x84\xc5\x01\x00\x00\xc5\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00+\x00 \x0020181109133134.crm_content-ownership.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `crm_content` ADD `user_id` BIGINT UNSIGNED NOT NULL AFTER `module_id`, ADD INDEX (`user_id`);\nPK\x07\x08\xeb!\x81\xc2k\x00\x00\x00k\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00.\x00 \x0020181109193047.crm_fields-related_types.up.sqlUT\x05\x00\x01\x80Cm8INSERT INTO `crm_field` (`field_type`, `field_name`, `field_template`) VALUES ('related', 'Related content', ''), ('related_multi', 'Related content (multiple)', '');PK\x07\x08:.\xfb8\xa6\x00\x00\x00\xa6\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x000\x00 \x0020181125122152.add_multiple_relationships.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE `crm_content_links` (\n `content_id` bigint(20) unsigned NOT NULL,\n `column_name` varchar(255) NOT NULL,\n `rel_content_id` bigint(20) unsigned NOT NULL,\n PRIMARY KEY (`content_id`,`column_name`,`rel_content_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;PK\x07\x08\xee\x12\x15 \x05\x01\x00\x00\x05\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00D\x00 \x0020181125132142.add_required_and_visible_to_module_form_fields.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `crm_module_form` ADD `is_required` TINYINT(1) NOT NULL AFTER `is_private`, ADD `is_visible` TINYINT(1) NOT NULL AFTER `is_required`;PK\x07\x08\xa5q c\x91\x00\x00\x00\x91\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x005\x00 \x0020181202163130.fix-crm-module-form-primary-key.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `crm_module_form` DROP PRIMARY KEY, ADD PRIMARY KEY(`module_id`, `place`);\nPK\x07\x08\xd9\xd4i\xe3W\x00\x00\x00W\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x000\x00 \x0020181204123650.add-crm-content-json-field.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `crm_content` ADD `json` json DEFAULT NULL COMMENT 'Content in JSON format.' AFTER `user_id`;\nPK\x07\x08\"\x96\xd6pj\x00\x00\x00j\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x004\x00 \x0020181204155326.add-crm-module-form-json-field.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `crm_module_form` ADD `json` JSON NOT NULL COMMENT 'Options in JSON format.' AFTER `kind`;PK\x07\x08\xb7\x93\xd4\xf6f\x00\x00\x00f\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00+\x00 \x0020181216214630.crm-content-to-record.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `crm_content` RENAME TO `crm_record`;\nALTER TABLE `crm_record` MODIFY COLUMN `json` json DEFAULT NULL COMMENT 'Records in JSON format.';\n\nALTER TABLE `crm_content_column` RENAME TO `crm_record_column`;\nALTER TABLE `crm_record_column` CHANGE COLUMN `content_id` `record_id` bigint(20);\n\nALTER TABLE `crm_content_links` RENAME TO `crm_record_links`;\nALTER TABLE `crm_record_links` CHANGE COLUMN `content_id` `record_id` bigint(20) unsigned;\nALTER TABLE `crm_record_links` CHANGE COLUMN `rel_content_id` `rel_record_id` bigint(20) unsigned;\nPK\x07\x08mA\xa8\x1e&\x02\x00\x00&\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00$\x00 \x0020181217100000.add-charts-tbl.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE `crm_chart` (\n `id` BIGINT(20) UNSIGNED NOT NULL,\n `name` VARCHAR(64) NOT NULL COMMENT 'The name of the chart',\n `config` JSON NOT NULL COMMENT 'Chart & reporting configuration',\n\n `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_at` DATETIME DEFAULT NULL,\n `deleted_at` DATETIME DEFAULT NULL,\n\n PRIMARY KEY (`id`)\n\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nPK\x07\x08\xcf\xc6g\xf6\xe4\x01\x00\x00\xe4\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00#\x00 \x0020181224122301.rem-crm_field.up.sqlUT\x05\x00\x01\x80Cm8DROP TABLE `crm_field`;\nPK\x07\x08\xae \xfd2\x18\x00\x00\x00\x18\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00&\x00 \x0020190108100000.add-triggers-tbl.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE `crm_trigger` (\n `id` BIGINT(20) UNSIGNED NOT NULL,\n `name` VARCHAR(64) NOT NULL COMMENT 'The name of the trigger',\n `enabled` BOOLEAN NOT NULL COMMENT 'Trigger enabled?',\n `actions` TEXT NOT NULL COMMENT 'All actions that trigger it',\n `source` TEXT NOT NULL COMMENT 'Trigger source',\n `rel_module` BIGINT(20) UNSIGNED NULL COMMENT 'Primary module',\n\n `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_at` DATETIME DEFAULT NULL,\n `deleted_at` DATETIME DEFAULT NULL,\n\n PRIMARY KEY (`id`)\n\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nPK\x07\x08+\xad\xb7\xed\xb8\x02\x00\x00\xb8\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00/\x00 \x0020190110175924.rem-crm-record-json-field.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `crm_record` DROP COLUMN `json`;\nPK\x07\x08\x94#\xb9\x99-\x00\x00\x00-\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x008\x00 \x0020190114072000.cleanup-record-tables-and-multival.up.sqlUT\x05\x00\x01\x80Cm8-- No more links, we'll handle this through ref field on crm_record_value tbl\nDROP TABLE IF EXISTS `crm_record_links`;\n\n-- Not columns, values\nALTER TABLE `crm_record_column` RENAME TO `crm_record_value`;\n\n-- Simplify names\nALTER TABLE `crm_record_value` CHANGE COLUMN `column_name` `name` VARCHAR(64);\nALTER TABLE `crm_record_value` CHANGE COLUMN `column_value` `value` TEXT;\n\n-- Add reference\nALTER TABLE `crm_record_value` ADD COLUMN `ref` BIGINT UNSIGNED DEFAULT 0 NOT NULL;\nALTER TABLE `crm_record_value` ADD COLUMN `deleted_at` datetime DEFAULT NULL;\nALTER TABLE `crm_record_value` ADD COLUMN `place` INT UNSIGNED DEFAULT 0 NOT NULL;\nALTER TABLE `crm_record_value` DROP PRIMARY KEY, ADD PRIMARY KEY(`record_id`, `name`, `place`);\nCREATE INDEX crm_record_value_ref ON crm_record_value (ref);\n\n\n-- We want this as a real field\nALTER TABLE `crm_module_form` ADD COLUMN `is_multi` TINYINT(1) NOT NULL;\n\n-- This will be handled through meta(json) fieldd\nALTER TABLE `crm_module_form` DROP COLUMN `help_text`;\nALTER TABLE `crm_module_form` DROP COLUMN `max_length`;\nALTER TABLE `crm_module_form` DROP COLUMN `default_Value`;\nPK\x07\x08\x04]{\x1fo\x04\x00\x00o\x04\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\x00 \x0020190121132408.record-updated-by.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `crm_record` CHANGE COLUMN `user_id` `owned_by` BIGINT UNSIGNED NOT NULL DEFAULT 0;\nALTER TABLE `crm_record` ADD COLUMN `created_by` BIGINT UNSIGNED NOT NULL DEFAULT 0;\nALTER TABLE `crm_record` ADD COLUMN `updated_by` BIGINT UNSIGNED NOT NULL DEFAULT 0;\nALTER TABLE `crm_record` ADD COLUMN `deleted_by` BIGINT UNSIGNED NOT NULL DEFAULT 0;\nUPDATE crm_record SET created_by = owned_by;\nUPDATE crm_record SET updated_by = owned_by WHERE updated_at IS NOT NULL;\nUPDATE crm_record SET deleted_by = owned_by WHERE deleted_at IS NOT NULL;\nPK\x07\x08h\xe2\xeb\n!\x02\x00\x00!\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00 \x0020190227090642.attachment.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE crm_attachment (\n id BIGINT UNSIGNED NOT NULL,\n rel_owner BIGINT UNSIGNED NOT NULL,\n\n kind VARCHAR(32) NOT NULL,\n\n url VARCHAR(512),\n preview_url VARCHAR(512),\n\n size INT UNSIGNED,\n mimetype VARCHAR(255),\n name TEXT,\n\n meta JSON,\n\n created_at DATETIME NOT NULL DEFAULT NOW(),\n updated_at DATETIME NULL,\n deleted_at DATETIME NULL,\n\n PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\n-- page attachments will be referenced via page-block meta data\n-- module/record attachment will be referenced via crm_record_value\nPK\x07\x08\xce\xde?\x08\xb3\x02\x00\x00\xb3\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\x00 \x0020190427180922.change-tbl-prefix.up.sqlUT\x05\x00\x01\x80Cm8DROP TABLE IF EXISTS crm_field;\nDROP TABLE IF EXISTS crm_fields;\nDROP TABLE IF EXISTS crm_content;\nDROP TABLE IF EXISTS crm_content_links;\nDROP TABLE IF EXISTS crm_content_column;\nDROP TABLE IF EXISTS crm_module_content;\n\nALTER TABLE crm_attachment\n RENAME TO compose_attachment;\n\nALTER TABLE crm_chart\n RENAME TO compose_chart;\n\nALTER TABLE crm_module\n RENAME TO compose_module;\n\nALTER TABLE crm_module_form\n RENAME TO compose_module_form;\n\nALTER TABLE crm_page\n RENAME TO compose_page;\n\nALTER TABLE crm_record\n RENAME TO compose_record;\n\nALTER TABLE crm_record_value\n RENAME TO compose_record_value;\n\nALTER TABLE crm_trigger\n RENAME TO compose_trigger;\nPK\x07\x08\xf2\x1a)|\x97\x02\x00\x00\x97\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00#\x00 \x0020190427210922.namespace-tbl.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE `compose_namespace` (\n `id` BIGINT(20) UNSIGNED NOT NULL,\n `name` VARCHAR(64) NOT NULL COMMENT 'Name',\n `slug` VARCHAR(64) NOT NULL COMMENT 'URL slug',\n `enabled` BOOLEAN NOT NULL COMMENT 'Is namespace enabled?',\n `meta` JSON NOT NULL COMMENT 'Meta data',\n\n `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_at` DATETIME DEFAULT NULL,\n `deleted_at` DATETIME DEFAULT NULL,\n\n PRIMARY KEY (`id`)\n\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nPK\x07\x08m\xeb\xed~R\x02\x00\x00R\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00$\x00 \x0020190428080000.namespace-refs.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `compose_attachment`\n ADD `rel_namespace` BIGINT UNSIGNED NOT NULL AFTER `id`,\n ADD INDEX (`rel_namespace`);\n\nALTER TABLE `compose_chart`\n ADD `rel_namespace` BIGINT UNSIGNED NOT NULL AFTER `id`,\n ADD INDEX (`rel_namespace`);\n\nALTER TABLE `compose_module`\n ADD `rel_namespace` BIGINT UNSIGNED NOT NULL AFTER `id`,\n ADD INDEX (`rel_namespace`);\n\nALTER TABLE `compose_page`\n ADD `rel_namespace` BIGINT UNSIGNED NOT NULL AFTER `id`,\n ADD INDEX (`rel_namespace`);\n\nALTER TABLE `compose_record`\n ADD `rel_namespace` BIGINT UNSIGNED NOT NULL AFTER `id`,\n ADD INDEX (`rel_namespace`);\n\nALTER TABLE `compose_trigger`\n ADD `rel_namespace` BIGINT UNSIGNED NOT NULL AFTER `id`,\n ADD INDEX (`rel_namespace`);\n\nUPDATE `compose_attachment` SET `rel_namespace` = 88714882739863655;\nUPDATE `compose_chart` SET `rel_namespace` = 88714882739863655;\nUPDATE `compose_module` SET `rel_namespace` = 88714882739863655;\nUPDATE `compose_page` SET `rel_namespace` = 88714882739863655;\nUPDATE `compose_record` SET `rel_namespace` = 88714882739863655;\nUPDATE `compose_trigger` SET `rel_namespace` = 88714882739863655;\n\n\nALTER TABLE `compose_attachment`\n ADD CONSTRAINT `compose_attachment_namespace`\n FOREIGN KEY (`rel_namespace`)\n REFERENCES `compose_namespace` (`id`);\n\nALTER TABLE `compose_chart`\n ADD CONSTRAINT `compose_chart_namespace`\n FOREIGN KEY (`rel_namespace`)\n REFERENCES `compose_namespace` (`id`);\n\nALTER TABLE `compose_module`\n ADD CONSTRAINT `compose_module_namespace`\n FOREIGN KEY (`rel_namespace`)\n REFERENCES `compose_namespace` (`id`);\n\nALTER TABLE `compose_page`\n ADD CONSTRAINT `compose_page_namespace`\n FOREIGN KEY (`rel_namespace`)\n REFERENCES `compose_namespace` (`id`);\n\nALTER TABLE `compose_record`\n ADD CONSTRAINT `compose_record_namespace`\n FOREIGN KEY (`rel_namespace`)\n REFERENCES `compose_namespace` (`id`);\n\nALTER TABLE `compose_trigger`\n ADD CONSTRAINT `compose_trigger_namespace`\n FOREIGN KEY (`rel_namespace`)\n REFERENCES `compose_namespace` (`id`);\nPK\x07\x08+\xecO\xd2\xd7\x08\x00\x00\xd7\x08\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00%\x00 \x0020190428080000.page-timestamps.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `compose_page`\n ADD COLUMN `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n ADD COLUMN `updated_at` DATETIME DEFAULT NULL,\n ADD COLUMN `deleted_at` DATETIME DEFAULT NULL;\n\nALTER TABLE `compose_page` CHANGE COLUMN `module_id` `rel_module` BIGINT UNSIGNED NOT NULL DEFAULT 0;\nPK\x07\x08\x82\x01Rn1\x01\x00\x001\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00#\x00 \x0020190514090000.module_fields.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE compose_module_form\n RENAME TO compose_module_field;\n\n-- Remove orphaned and invalid fields\nDELETE FROM `compose_module_field` WHERE `module_id` NOT IN (SELECT `id` FROM `compose_module`) OR `name` = '';\n\n-- Order and consistency.\nALTER TABLE `compose_module_field`\n ADD COLUMN `id` BIGINT UNSIGNED NOT NULL FIRST,\n ADD COLUMN `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n ADD COLUMN `updated_at` DATETIME DEFAULT NULL,\n ADD COLUMN `deleted_at` DATETIME DEFAULT NULL,\n RENAME COLUMN `module_id` TO `rel_module`,\n RENAME COLUMN `json` TO `options`;\n\n-- Generate IDs for the new field, use module, offset by one (just to start with a different ID)\n-- and use place (0 based, +1 for every field, expecting to be unique per module because of the existing pkey)\nUPDATE `compose_module_field` SET id = rel_module + 1 + place;\n\n-- Drop old primary key (module_id, place)\nALTER TABLE `compose_module_field` DROP PRIMARY KEY, ADD PRIMARY KEY(`id`);\n\n-- Foreign key\nALTER TABLE `compose_module_field`\n ADD CONSTRAINT `compose_module`\n FOREIGN KEY (`rel_module`)\n REFERENCES `compose_module` (`id`);\n\n-- And unique indexes for module+place/name combos.\nCREATE UNIQUE INDEX uid_compose_module_field_place ON compose_module_field (`rel_module`, `place`);\nCREATE UNIQUE INDEX uid_compose_module_field_name ON compose_module_field (`rel_module`, `name`);\nPK\x07\x08\xb1(\xbb\xf0\x8d\x05\x00\x00\x8d\x05\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\x00 \x0020190526090000.permissions.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE IF NOT EXISTS compose_permission_rules (\n rel_role BIGINT UNSIGNED NOT NULL,\n resource VARCHAR(128) NOT NULL,\n operation VARCHAR(128) NOT NULL,\n access TINYINT(1) NOT NULL,\n\n PRIMARY KEY (rel_role, resource, operation)\n) ENGINE=InnoDB;\nPK\x07\x08\"\xd8\xe5H\x12\x01\x00\x00\x12\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00 \x0020190701090000.automation.up.sqlUT\x05\x00\x01\x80Cm8DROP TABLE IF EXISTS compose_automation_trigger;\nDROP TABLE IF EXISTS compose_automation_script;\n\nCREATE TABLE IF NOT EXISTS compose_automation_script (\n `id` BIGINT(20) UNSIGNED NOT NULL,\n `name` VARCHAR(64) NOT NULL DEFAULT 'unnamed' COMMENT 'The name of the script',\n `source` TEXT NOT NULL COMMENT 'Source code for the script',\n `source_ref` VARCHAR(200) NOT NULL COMMENT 'Where is the script located (if remote)',\n `async` BOOLEAN NOT NULL DEFAULT FALSE COMMENT 'Do we run this script asynchronously?',\n `rel_runner` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Who is running the script? 0 for invoker',\n `run_in_ua` BOOLEAN NOT NULL DEFAULT FALSE COMMENT 'Run this script inside user-agent environment',\n `timeout` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Any explicit timeout set for this script (milliseconds)?',\n `critical` BOOLEAN NOT NULL DEFAULT TRUE COMMENT 'Is it critical that this script is executed successfully',\n `enabled` BOOLEAN NOT NULL DEFAULT TRUE COMMENT 'Is this script enabled?',\n\n `created_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `updated_at` DATETIME NULL DEFAULT NULL,\n `deleted_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `deleted_at` DATETIME NULL DEFAULT NULL,\n\n PRIMARY KEY (`id`)\n\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE IF NOT EXISTS compose_automation_trigger (\n `id` BIGINT(20) UNSIGNED NOT NULL,\n `rel_script` BIGINT(20) UNSIGNED NOT NULL COMMENT 'Script that is triggered',\n\n `resource` VARCHAR(128) NOT NULL COMMENT 'Resource triggering the event',\n `event` VARCHAR(128) NOT NULL COMMENT 'Event triggered',\n `event_condition`\n TEXT NOT NULL COMMENT 'Trigger condition',\n `enabled` BOOLEAN NOT NULL DEFAULT TRUE COMMENT 'Trigger enabled?',\n\n `weight` INT NOT NULL DEFAULT 0,\n\n `created_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `updated_at` DATETIME NULL DEFAULT NULL,\n `deleted_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `deleted_at` DATETIME NULL DEFAULT NULL,\n\n CONSTRAINT `fk_script` FOREIGN KEY (`rel_script`) REFERENCES `compose_automation_script` (`id`),\n\n PRIMARY KEY (`id`)\n\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\n\n\n# Migrate old triggers into scripts\nINSERT INTO compose_automation_script (id, name, source, source_ref, run_in_ua, critical, enabled, created_at, updated_at, deleted_at)\nSELECT id, name, source, '', true, false, enabled, created_at, updated_at, deleted_at from compose_trigger;\n\n# Migrate old triggers into new triggers\nINSERT INTO compose_automation_trigger (id, event, resource, event_condition, rel_script, enabled, created_at, updated_at, deleted_at)\nSELECT id+seq, events.event, 'compose:record', rel_module, id, enabled, created_at, updated_at, deleted_at from compose_trigger AS t INNER JOIN\n ( SELECT 0 as seq, '' AS event\n UNION SELECT 1 as seq, 'manual' AS event\n UNION SELECT 2 as seq, 'beforeCreate' AS event\n UNION SELECT 3 as seq, 'afterCreate' AS event\n UNION SELECT 4 as seq, 'beforeUpdate' AS event\n UNION SELECT 5 as seq, 'afterUpdate' AS event\n UNION SELECT 6 as seq, 'beforeDelete' AS event\n UNION SELECT 7 as seq, 'afterDelete' AS event) AS events ON ((event = '' AND t.actions = '')\n OR (event <> '' AND t.actions LIKE concat('%',event,'%') ));\n# Normalize and cleanup\nUPDATE compose_automation_trigger SET event = 'manual' WHERE event = '';\nDELETE FROM compose_automation_trigger WHERE event_condition IN ('', '0') AND event <> 'manual';\n\nDROP TABLE IF EXISTS compose_trigger;\nPK\x07\x08c\xda\x17\xa4\x13\x11\x00\x00\x13\x11\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00*\x00 \x0020190825090000.automation-namespace.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `compose_automation_script`\n ADD `rel_namespace` BIGINT UNSIGNED NOT NULL AFTER `id`,\n ADD INDEX (`rel_namespace`);\n\nUPDATE `compose_automation_script` SET `rel_namespace` = (SELECT MIN(id) FROM compose_namespace);\n\nALTER TABLE `compose_automation_script`\n ADD CONSTRAINT `compose_automation_script_namespace`\n FOREIGN KEY (`rel_namespace`)\n REFERENCES `compose_namespace` (`id`);\nPK\x07\x08;#~I\x98\x01\x00\x00\x98\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00#\x00 \x0020190912125228.field-default.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `compose_module_field`\n ADD `default_value` JSON DEFAULT NULL COMMENT 'Default value as a record value set.'\n AFTER `options`;\nPK\x07\x08&~D\xee\x8d\x00\x00\x00\x8d\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\x00 \x0020190917080000.add-handles.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `compose_module` ADD `handle` VARCHAR(200) NOT NULL AFTER `id`;\nALTER TABLE `compose_page` ADD `handle` VARCHAR(200) NOT NULL AFTER `id`;\nALTER TABLE `compose_chart` ADD `handle` VARCHAR(200) NOT NULL AFTER `id`;\nPK\x07\x08}h\xa5\xba\xe4\x00\x00\x00\xe4\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00 \x0020191009172213.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `compose_record_value` MODIFY `value` LONGTEXT;\nPK\x07\x08\xe0\x1e\x94\xc4<\x00\x00\x00<\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00 \x00migrations.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE IF NOT EXISTS `migrations` (\n `project` varchar(16) NOT NULL COMMENT 'sam, crm, ...',\n `filename` varchar(255) NOT NULL COMMENT 'yyyymmddHHMMSS.sql',\n `statement_index` int(11) NOT NULL COMMENT 'Statement number from SQL file',\n `status` text NOT NULL COMMENT 'ok or full error message',\n PRIMARY KEY (`project`,`filename`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nPK\x07\x089S\x05%x\x01\x00\x00x\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00 \x00new.shUT\x05\x00\x01\x80Cm8#!/bin/bash\ntouch $(date +%Y%m%d%H%M%S).up.sql\nPK\x07\x08\xc1h\xf1\xfb/\x00\x00\x00/\x00\x00\x00PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xac\xe8\x19\x1d\x12\n\x00\x00\x12\n\x00\x00\x1a\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x00\x00\x00\x0020180704080000.base.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(f\x18\x1e\x84\xc5\x01\x00\x00\xc5\x01\x00\x00%\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81c\n\x00\x0020180704080001.crm_fields-data.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xeb!\x81\xc2k\x00\x00\x00k\x00\x00\x00+\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x84\x0c\x00\x0020181109133134.crm_content-ownership.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(:.\xfb8\xa6\x00\x00\x00\xa6\x00\x00\x00.\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81Q\x0d\x00\x0020181109193047.crm_fields-related_types.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xee\x12\x15 \x05\x01\x00\x00\x05\x01\x00\x000\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\\\x0e\x00\x0020181125122152.add_multiple_relationships.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xa5q c\x91\x00\x00\x00\x91\x00\x00\x00D\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xc8\x0f\x00\x0020181125132142.add_required_and_visible_to_module_form_fields.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xd9\xd4i\xe3W\x00\x00\x00W\x00\x00\x005\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xd4\x10\x00\x0020181202163130.fix-crm-module-form-primary-key.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\"\x96\xd6pj\x00\x00\x00j\x00\x00\x000\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x97\x11\x00\x0020181204123650.add-crm-content-json-field.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xb7\x93\xd4\xf6f\x00\x00\x00f\x00\x00\x004\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81h\x12\x00\x0020181204155326.add-crm-module-form-json-field.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(mA\xa8\x1e&\x02\x00\x00&\x02\x00\x00+\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x819\x13\x00\x0020181216214630.crm-content-to-record.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xcf\xc6g\xf6\xe4\x01\x00\x00\xe4\x01\x00\x00$\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xc1\x15\x00\x0020181217100000.add-charts-tbl.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xae \xfd2\x18\x00\x00\x00\x18\x00\x00\x00#\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x00\x18\x00\x0020181224122301.rem-crm_field.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(+\xad\xb7\xed\xb8\x02\x00\x00\xb8\x02\x00\x00&\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81r\x18\x00\x0020190108100000.add-triggers-tbl.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x94#\xb9\x99-\x00\x00\x00-\x00\x00\x00/\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x87\x1b\x00\x0020190110175924.rem-crm-record-json-field.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x04]{\x1fo\x04\x00\x00o\x04\x00\x008\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x1a\x1c\x00\x0020190114072000.cleanup-record-tables-and-multival.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(h\xe2\xeb\n!\x02\x00\x00!\x02\x00\x00'\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xf8 \x00\x0020190121132408.record-updated-by.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xce\xde?\x08\xb3\x02\x00\x00\xb3\x02\x00\x00 \x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81w#\x00\x0020190227090642.attachment.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xf2\x1a)|\x97\x02\x00\x00\x97\x02\x00\x00'\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x81&\x00\x0020190427180922.change-tbl-prefix.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(m\xeb\xed~R\x02\x00\x00R\x02\x00\x00#\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81v)\x00\x0020190427210922.namespace-tbl.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(+\xecO\xd2\xd7\x08\x00\x00\xd7\x08\x00\x00$\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\",\x00\x0020190428080000.namespace-refs.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x82\x01Rn1\x01\x00\x001\x01\x00\x00%\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81T5\x00\x0020190428080000.page-timestamps.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xb1(\xbb\xf0\x8d\x05\x00\x00\x8d\x05\x00\x00#\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\xe16\x00\x0020190514090000.module_fields.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\"\xd8\xe5H\x12\x01\x00\x00\x12\x01\x00\x00!\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xc8<\x00\x0020190526090000.permissions.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(c\xda\x17\xa4\x13\x11\x00\x00\x13\x11\x00\x00 \x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x812>\x00\x0020190701090000.automation.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(;#~I\x98\x01\x00\x00\x98\x01\x00\x00*\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\x9cO\x00\x0020190825090000.automation-namespace.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(&~D\xee\x8d\x00\x00\x00\x8d\x00\x00\x00#\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\x95Q\x00\x0020190912125228.field-default.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(}h\xa5\xba\xe4\x00\x00\x00\xe4\x00\x00\x00!\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81|R\x00\x0020190917080000.add-handles.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xe0\x1e\x94\xc4<\x00\x00\x00<\x00\x00\x00\x15\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\xb8S\x00\x0020191009172213.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(9S\x05%x\x01\x00\x00x\x01\x00\x00\x0e\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81@T\x00\x00migrations.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xc1h\xf1\xfb/\x00\x00\x00/\x00\x00\x00\x06\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xed\x81\xfdU\x00\x00new.shUT\x05\x00\x01\x80Cm8PK\x05\x06\x00\x00\x00\x00\x1e\x00\x1e\x00\xeb\n\x00\x00iV\x00\x00\x00\x00" +var Asset = "PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00 \x0020180704080000.base.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE `crm_content` (\n `id` bigint(20) unsigned NOT NULL,\n `module_id` bigint(20) unsigned NOT NULL,\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_at` datetime DEFAULT NULL,\n `deleted_at` datetime DEFAULT NULL,\n PRIMARY KEY (`id`,`module_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE `crm_content_column` (\n `content_id` bigint(20) NOT NULL,\n `column_name` varchar(255) NOT NULL,\n `column_value` text NOT NULL,\n PRIMARY KEY (`content_id`,`column_name`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE `crm_field` (\n `field_type` varchar(16) NOT NULL COMMENT 'Short field type (string, boolean,...)',\n `field_name` varchar(255) NOT NULL COMMENT 'Description of field contents',\n `field_template` varchar(255) NOT NULL COMMENT 'HTML template file for field',\n PRIMARY KEY (`field_type`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE `crm_module` (\n `id` bigint(20) unsigned NOT NULL,\n `name` varchar(64) NOT NULL COMMENT 'The name of the module',\n `json` json NOT NULL COMMENT 'List of field definitions for the module',\n `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_at` datetime DEFAULT NULL,\n `deleted_at` datetime DEFAULT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE `crm_module_form` (\n `module_id` bigint(20) unsigned NOT NULL,\n `place` tinyint(3) unsigned NOT NULL,\n `kind` varchar(64) NOT NULL COMMENT 'The type of the form input field',\n `name` varchar(64) NOT NULL COMMENT 'The name of the field in the form',\n `label` varchar(255) NOT NULL COMMENT 'The label of the form input',\n `help_text` text NOT NULL COMMENT 'Help text',\n `default_value` text NOT NULL COMMENT 'Default value',\n `max_length` int(10) unsigned NOT NULL COMMENT 'Maximum input length',\n `is_private` tinyint(1) NOT NULL COMMENT 'Contains personal/sensitive data?',\n PRIMARY KEY (`module_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE `crm_page` (\n `id` bigint(20) unsigned NOT NULL COMMENT 'Page ID',\n `self_id` bigint(20) unsigned NOT NULL COMMENT 'Parent Page ID',\n `module_id` bigint(20) unsigned NOT NULL COMMENT 'Module ID (optional)',\n `title` varchar(255) NOT NULL COMMENT 'Title (required)',\n `description` text NOT NULL COMMENT 'Description',\n `blocks` json NOT NULL COMMENT 'JSON array of blocks for the page',\n `visible` tinyint(4) NOT NULL COMMENT 'Is page visible in navigation?',\n `weight` int(11) NOT NULL COMMENT 'Order for navigation',\n PRIMARY KEY (`id`) USING BTREE,\n KEY `module_id` (`module_id`),\n KEY `self_id` (`self_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nPK\x07\x08\xac\xe8\x19\x1d\x12\n\x00\x00\x12\n\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00%\x00 \x0020180704080001.crm_fields-data.up.sqlUT\x05\x00\x01\x80Cm8INSERT INTO `crm_field` VALUES ('bool','Boolean value (yes / no)','');\nINSERT INTO `crm_field` VALUES ('email','E-mail input','');\nINSERT INTO `crm_field` VALUES ('enum','Single option picker','');\nINSERT INTO `crm_field` VALUES ('hidden','Hidden value','');\nINSERT INTO `crm_field` VALUES ('stamp','Date/time input','');\nINSERT INTO `crm_field` VALUES ('text','Text input','');\nINSERT INTO `crm_field` VALUES ('textarea','Text input (multi-line)','');\nPK\x07\x08f\x18\x1e\x84\xc5\x01\x00\x00\xc5\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00+\x00 \x0020181109133134.crm_content-ownership.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `crm_content` ADD `user_id` BIGINT UNSIGNED NOT NULL AFTER `module_id`, ADD INDEX (`user_id`);\nPK\x07\x08\xeb!\x81\xc2k\x00\x00\x00k\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00.\x00 \x0020181109193047.crm_fields-related_types.up.sqlUT\x05\x00\x01\x80Cm8INSERT INTO `crm_field` (`field_type`, `field_name`, `field_template`) VALUES ('related', 'Related content', ''), ('related_multi', 'Related content (multiple)', '');PK\x07\x08:.\xfb8\xa6\x00\x00\x00\xa6\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x000\x00 \x0020181125122152.add_multiple_relationships.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE `crm_content_links` (\n `content_id` bigint(20) unsigned NOT NULL,\n `column_name` varchar(255) NOT NULL,\n `rel_content_id` bigint(20) unsigned NOT NULL,\n PRIMARY KEY (`content_id`,`column_name`,`rel_content_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;PK\x07\x08\xee\x12\x15 \x05\x01\x00\x00\x05\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00D\x00 \x0020181125132142.add_required_and_visible_to_module_form_fields.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `crm_module_form` ADD `is_required` TINYINT(1) NOT NULL AFTER `is_private`, ADD `is_visible` TINYINT(1) NOT NULL AFTER `is_required`;PK\x07\x08\xa5q c\x91\x00\x00\x00\x91\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x005\x00 \x0020181202163130.fix-crm-module-form-primary-key.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `crm_module_form` DROP PRIMARY KEY, ADD PRIMARY KEY(`module_id`, `place`);\nPK\x07\x08\xd9\xd4i\xe3W\x00\x00\x00W\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x000\x00 \x0020181204123650.add-crm-content-json-field.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `crm_content` ADD `json` json DEFAULT NULL COMMENT 'Content in JSON format.' AFTER `user_id`;\nPK\x07\x08\"\x96\xd6pj\x00\x00\x00j\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x004\x00 \x0020181204155326.add-crm-module-form-json-field.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `crm_module_form` ADD `json` JSON NOT NULL COMMENT 'Options in JSON format.' AFTER `kind`;PK\x07\x08\xb7\x93\xd4\xf6f\x00\x00\x00f\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00+\x00 \x0020181216214630.crm-content-to-record.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `crm_content` RENAME TO `crm_record`;\nALTER TABLE `crm_record` MODIFY COLUMN `json` json DEFAULT NULL COMMENT 'Records in JSON format.';\n\nALTER TABLE `crm_content_column` RENAME TO `crm_record_column`;\nALTER TABLE `crm_record_column` CHANGE COLUMN `content_id` `record_id` bigint(20);\n\nALTER TABLE `crm_content_links` RENAME TO `crm_record_links`;\nALTER TABLE `crm_record_links` CHANGE COLUMN `content_id` `record_id` bigint(20) unsigned;\nALTER TABLE `crm_record_links` CHANGE COLUMN `rel_content_id` `rel_record_id` bigint(20) unsigned;\nPK\x07\x08mA\xa8\x1e&\x02\x00\x00&\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00$\x00 \x0020181217100000.add-charts-tbl.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE `crm_chart` (\n `id` BIGINT(20) UNSIGNED NOT NULL,\n `name` VARCHAR(64) NOT NULL COMMENT 'The name of the chart',\n `config` JSON NOT NULL COMMENT 'Chart & reporting configuration',\n\n `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_at` DATETIME DEFAULT NULL,\n `deleted_at` DATETIME DEFAULT NULL,\n\n PRIMARY KEY (`id`)\n\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nPK\x07\x08\xcf\xc6g\xf6\xe4\x01\x00\x00\xe4\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00#\x00 \x0020181224122301.rem-crm_field.up.sqlUT\x05\x00\x01\x80Cm8DROP TABLE `crm_field`;\nPK\x07\x08\xae \xfd2\x18\x00\x00\x00\x18\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00&\x00 \x0020190108100000.add-triggers-tbl.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE `crm_trigger` (\n `id` BIGINT(20) UNSIGNED NOT NULL,\n `name` VARCHAR(64) NOT NULL COMMENT 'The name of the trigger',\n `enabled` BOOLEAN NOT NULL COMMENT 'Trigger enabled?',\n `actions` TEXT NOT NULL COMMENT 'All actions that trigger it',\n `source` TEXT NOT NULL COMMENT 'Trigger source',\n `rel_module` BIGINT(20) UNSIGNED NULL COMMENT 'Primary module',\n\n `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_at` DATETIME DEFAULT NULL,\n `deleted_at` DATETIME DEFAULT NULL,\n\n PRIMARY KEY (`id`)\n\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nPK\x07\x08+\xad\xb7\xed\xb8\x02\x00\x00\xb8\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00/\x00 \x0020190110175924.rem-crm-record-json-field.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `crm_record` DROP COLUMN `json`;\nPK\x07\x08\x94#\xb9\x99-\x00\x00\x00-\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x008\x00 \x0020190114072000.cleanup-record-tables-and-multival.up.sqlUT\x05\x00\x01\x80Cm8-- No more links, we'll handle this through ref field on crm_record_value tbl\nDROP TABLE IF EXISTS `crm_record_links`;\n\n-- Not columns, values\nALTER TABLE `crm_record_column` RENAME TO `crm_record_value`;\n\n-- Simplify names\nALTER TABLE `crm_record_value` CHANGE COLUMN `column_name` `name` VARCHAR(64);\nALTER TABLE `crm_record_value` CHANGE COLUMN `column_value` `value` TEXT;\n\n-- Add reference\nALTER TABLE `crm_record_value` ADD COLUMN `ref` BIGINT UNSIGNED DEFAULT 0 NOT NULL;\nALTER TABLE `crm_record_value` ADD COLUMN `deleted_at` datetime DEFAULT NULL;\nALTER TABLE `crm_record_value` ADD COLUMN `place` INT UNSIGNED DEFAULT 0 NOT NULL;\nALTER TABLE `crm_record_value` DROP PRIMARY KEY, ADD PRIMARY KEY(`record_id`, `name`, `place`);\nCREATE INDEX crm_record_value_ref ON crm_record_value (ref);\n\n\n-- We want this as a real field\nALTER TABLE `crm_module_form` ADD COLUMN `is_multi` TINYINT(1) NOT NULL;\n\n-- This will be handled through meta(json) fieldd\nALTER TABLE `crm_module_form` DROP COLUMN `help_text`;\nALTER TABLE `crm_module_form` DROP COLUMN `max_length`;\nALTER TABLE `crm_module_form` DROP COLUMN `default_Value`;\nPK\x07\x08\x04]{\x1fo\x04\x00\x00o\x04\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\x00 \x0020190121132408.record-updated-by.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `crm_record` CHANGE COLUMN `user_id` `owned_by` BIGINT UNSIGNED NOT NULL DEFAULT 0;\nALTER TABLE `crm_record` ADD COLUMN `created_by` BIGINT UNSIGNED NOT NULL DEFAULT 0;\nALTER TABLE `crm_record` ADD COLUMN `updated_by` BIGINT UNSIGNED NOT NULL DEFAULT 0;\nALTER TABLE `crm_record` ADD COLUMN `deleted_by` BIGINT UNSIGNED NOT NULL DEFAULT 0;\nUPDATE crm_record SET created_by = owned_by;\nUPDATE crm_record SET updated_by = owned_by WHERE updated_at IS NOT NULL;\nUPDATE crm_record SET deleted_by = owned_by WHERE deleted_at IS NOT NULL;\nPK\x07\x08h\xe2\xeb\n!\x02\x00\x00!\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00 \x0020190227090642.attachment.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE crm_attachment (\n id BIGINT UNSIGNED NOT NULL,\n rel_owner BIGINT UNSIGNED NOT NULL,\n\n kind VARCHAR(32) NOT NULL,\n\n url VARCHAR(512),\n preview_url VARCHAR(512),\n\n size INT UNSIGNED,\n mimetype VARCHAR(255),\n name TEXT,\n\n meta JSON,\n\n created_at DATETIME NOT NULL DEFAULT NOW(),\n updated_at DATETIME NULL,\n deleted_at DATETIME NULL,\n\n PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\n-- page attachments will be referenced via page-block meta data\n-- module/record attachment will be referenced via crm_record_value\nPK\x07\x08\xce\xde?\x08\xb3\x02\x00\x00\xb3\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\x00 \x0020190427180922.change-tbl-prefix.up.sqlUT\x05\x00\x01\x80Cm8DROP TABLE IF EXISTS crm_field;\nDROP TABLE IF EXISTS crm_fields;\nDROP TABLE IF EXISTS crm_content;\nDROP TABLE IF EXISTS crm_content_links;\nDROP TABLE IF EXISTS crm_content_column;\nDROP TABLE IF EXISTS crm_module_content;\n\nALTER TABLE crm_attachment\n RENAME TO compose_attachment;\n\nALTER TABLE crm_chart\n RENAME TO compose_chart;\n\nALTER TABLE crm_module\n RENAME TO compose_module;\n\nALTER TABLE crm_module_form\n RENAME TO compose_module_form;\n\nALTER TABLE crm_page\n RENAME TO compose_page;\n\nALTER TABLE crm_record\n RENAME TO compose_record;\n\nALTER TABLE crm_record_value\n RENAME TO compose_record_value;\n\nALTER TABLE crm_trigger\n RENAME TO compose_trigger;\nPK\x07\x08\xf2\x1a)|\x97\x02\x00\x00\x97\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00#\x00 \x0020190427210922.namespace-tbl.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE `compose_namespace` (\n `id` BIGINT(20) UNSIGNED NOT NULL,\n `name` VARCHAR(64) NOT NULL COMMENT 'Name',\n `slug` VARCHAR(64) NOT NULL COMMENT 'URL slug',\n `enabled` BOOLEAN NOT NULL COMMENT 'Is namespace enabled?',\n `meta` JSON NOT NULL COMMENT 'Meta data',\n\n `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_at` DATETIME DEFAULT NULL,\n `deleted_at` DATETIME DEFAULT NULL,\n\n PRIMARY KEY (`id`)\n\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nPK\x07\x08m\xeb\xed~R\x02\x00\x00R\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00$\x00 \x0020190428080000.namespace-refs.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `compose_attachment`\n ADD `rel_namespace` BIGINT UNSIGNED NOT NULL AFTER `id`,\n ADD INDEX (`rel_namespace`);\n\nALTER TABLE `compose_chart`\n ADD `rel_namespace` BIGINT UNSIGNED NOT NULL AFTER `id`,\n ADD INDEX (`rel_namespace`);\n\nALTER TABLE `compose_module`\n ADD `rel_namespace` BIGINT UNSIGNED NOT NULL AFTER `id`,\n ADD INDEX (`rel_namespace`);\n\nALTER TABLE `compose_page`\n ADD `rel_namespace` BIGINT UNSIGNED NOT NULL AFTER `id`,\n ADD INDEX (`rel_namespace`);\n\nALTER TABLE `compose_record`\n ADD `rel_namespace` BIGINT UNSIGNED NOT NULL AFTER `id`,\n ADD INDEX (`rel_namespace`);\n\nALTER TABLE `compose_trigger`\n ADD `rel_namespace` BIGINT UNSIGNED NOT NULL AFTER `id`,\n ADD INDEX (`rel_namespace`);\n\nUPDATE `compose_attachment` SET `rel_namespace` = 88714882739863655;\nUPDATE `compose_chart` SET `rel_namespace` = 88714882739863655;\nUPDATE `compose_module` SET `rel_namespace` = 88714882739863655;\nUPDATE `compose_page` SET `rel_namespace` = 88714882739863655;\nUPDATE `compose_record` SET `rel_namespace` = 88714882739863655;\nUPDATE `compose_trigger` SET `rel_namespace` = 88714882739863655;\n\n\nALTER TABLE `compose_attachment`\n ADD CONSTRAINT `compose_attachment_namespace`\n FOREIGN KEY (`rel_namespace`)\n REFERENCES `compose_namespace` (`id`);\n\nALTER TABLE `compose_chart`\n ADD CONSTRAINT `compose_chart_namespace`\n FOREIGN KEY (`rel_namespace`)\n REFERENCES `compose_namespace` (`id`);\n\nALTER TABLE `compose_module`\n ADD CONSTRAINT `compose_module_namespace`\n FOREIGN KEY (`rel_namespace`)\n REFERENCES `compose_namespace` (`id`);\n\nALTER TABLE `compose_page`\n ADD CONSTRAINT `compose_page_namespace`\n FOREIGN KEY (`rel_namespace`)\n REFERENCES `compose_namespace` (`id`);\n\nALTER TABLE `compose_record`\n ADD CONSTRAINT `compose_record_namespace`\n FOREIGN KEY (`rel_namespace`)\n REFERENCES `compose_namespace` (`id`);\n\nALTER TABLE `compose_trigger`\n ADD CONSTRAINT `compose_trigger_namespace`\n FOREIGN KEY (`rel_namespace`)\n REFERENCES `compose_namespace` (`id`);\nPK\x07\x08+\xecO\xd2\xd7\x08\x00\x00\xd7\x08\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00%\x00 \x0020190428080000.page-timestamps.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `compose_page`\n ADD COLUMN `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n ADD COLUMN `updated_at` DATETIME DEFAULT NULL,\n ADD COLUMN `deleted_at` DATETIME DEFAULT NULL;\n\nALTER TABLE `compose_page` CHANGE COLUMN `module_id` `rel_module` BIGINT UNSIGNED NOT NULL DEFAULT 0;\nPK\x07\x08\x82\x01Rn1\x01\x00\x001\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00#\x00 \x0020190514090000.module_fields.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE compose_module_form\n RENAME TO compose_module_field;\n\n-- Remove orphaned and invalid fields\nDELETE FROM `compose_module_field` WHERE `module_id` NOT IN (SELECT `id` FROM `compose_module`) OR `name` = '';\n\n-- Order and consistency.\nALTER TABLE `compose_module_field`\n ADD COLUMN `id` BIGINT UNSIGNED NOT NULL FIRST,\n ADD COLUMN `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n ADD COLUMN `updated_at` DATETIME DEFAULT NULL,\n ADD COLUMN `deleted_at` DATETIME DEFAULT NULL,\n RENAME COLUMN `module_id` TO `rel_module`,\n RENAME COLUMN `json` TO `options`;\n\n-- Generate IDs for the new field, use module, offset by one (just to start with a different ID)\n-- and use place (0 based, +1 for every field, expecting to be unique per module because of the existing pkey)\nUPDATE `compose_module_field` SET id = rel_module + 1 + place;\n\n-- Drop old primary key (module_id, place)\nALTER TABLE `compose_module_field` DROP PRIMARY KEY, ADD PRIMARY KEY(`id`);\n\n-- Foreign key\nALTER TABLE `compose_module_field`\n ADD CONSTRAINT `compose_module`\n FOREIGN KEY (`rel_module`)\n REFERENCES `compose_module` (`id`);\n\n-- And unique indexes for module+place/name combos.\nCREATE UNIQUE INDEX uid_compose_module_field_place ON compose_module_field (`rel_module`, `place`);\nCREATE UNIQUE INDEX uid_compose_module_field_name ON compose_module_field (`rel_module`, `name`);\nPK\x07\x08\xb1(\xbb\xf0\x8d\x05\x00\x00\x8d\x05\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\x00 \x0020190526090000.permissions.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE IF NOT EXISTS compose_permission_rules (\n rel_role BIGINT UNSIGNED NOT NULL,\n resource VARCHAR(128) NOT NULL,\n operation VARCHAR(128) NOT NULL,\n access TINYINT(1) NOT NULL,\n\n PRIMARY KEY (rel_role, resource, operation)\n) ENGINE=InnoDB;\nPK\x07\x08\"\xd8\xe5H\x12\x01\x00\x00\x12\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00 \x0020190701090000.automation.up.sqlUT\x05\x00\x01\x80Cm8DROP TABLE IF EXISTS compose_automation_trigger;\nDROP TABLE IF EXISTS compose_automation_script;\n\nCREATE TABLE IF NOT EXISTS compose_automation_script (\n `id` BIGINT(20) UNSIGNED NOT NULL,\n `name` VARCHAR(64) NOT NULL DEFAULT 'unnamed' COMMENT 'The name of the script',\n `source` TEXT NOT NULL COMMENT 'Source code for the script',\n `source_ref` VARCHAR(200) NOT NULL COMMENT 'Where is the script located (if remote)',\n `async` BOOLEAN NOT NULL DEFAULT FALSE COMMENT 'Do we run this script asynchronously?',\n `rel_runner` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Who is running the script? 0 for invoker',\n `run_in_ua` BOOLEAN NOT NULL DEFAULT FALSE COMMENT 'Run this script inside user-agent environment',\n `timeout` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Any explicit timeout set for this script (milliseconds)?',\n `critical` BOOLEAN NOT NULL DEFAULT TRUE COMMENT 'Is it critical that this script is executed successfully',\n `enabled` BOOLEAN NOT NULL DEFAULT TRUE COMMENT 'Is this script enabled?',\n\n `created_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `updated_at` DATETIME NULL DEFAULT NULL,\n `deleted_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `deleted_at` DATETIME NULL DEFAULT NULL,\n\n PRIMARY KEY (`id`)\n\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE IF NOT EXISTS compose_automation_trigger (\n `id` BIGINT(20) UNSIGNED NOT NULL,\n `rel_script` BIGINT(20) UNSIGNED NOT NULL COMMENT 'Script that is triggered',\n\n `resource` VARCHAR(128) NOT NULL COMMENT 'Resource triggering the event',\n `event` VARCHAR(128) NOT NULL COMMENT 'Event triggered',\n `event_condition`\n TEXT NOT NULL COMMENT 'Trigger condition',\n `enabled` BOOLEAN NOT NULL DEFAULT TRUE COMMENT 'Trigger enabled?',\n\n `weight` INT NOT NULL DEFAULT 0,\n\n `created_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `updated_at` DATETIME NULL DEFAULT NULL,\n `deleted_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `deleted_at` DATETIME NULL DEFAULT NULL,\n\n CONSTRAINT `fk_script` FOREIGN KEY (`rel_script`) REFERENCES `compose_automation_script` (`id`),\n\n PRIMARY KEY (`id`)\n\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\n\n\n# Migrate old triggers into scripts\nINSERT INTO compose_automation_script (id, name, source, source_ref, run_in_ua, critical, enabled, created_at, updated_at, deleted_at)\nSELECT id, name, source, '', true, false, enabled, created_at, updated_at, deleted_at from compose_trigger;\n\n# Migrate old triggers into new triggers\nINSERT INTO compose_automation_trigger (id, event, resource, event_condition, rel_script, enabled, created_at, updated_at, deleted_at)\nSELECT id+seq, events.event, 'compose:record', rel_module, id, enabled, created_at, updated_at, deleted_at from compose_trigger AS t INNER JOIN\n ( SELECT 0 as seq, '' AS event\n UNION SELECT 1 as seq, 'manual' AS event\n UNION SELECT 2 as seq, 'beforeCreate' AS event\n UNION SELECT 3 as seq, 'afterCreate' AS event\n UNION SELECT 4 as seq, 'beforeUpdate' AS event\n UNION SELECT 5 as seq, 'afterUpdate' AS event\n UNION SELECT 6 as seq, 'beforeDelete' AS event\n UNION SELECT 7 as seq, 'afterDelete' AS event) AS events ON ((event = '' AND t.actions = '')\n OR (event <> '' AND t.actions LIKE concat('%',event,'%') ));\n# Normalize and cleanup\nUPDATE compose_automation_trigger SET event = 'manual' WHERE event = '';\nDELETE FROM compose_automation_trigger WHERE event_condition IN ('', '0') AND event <> 'manual';\n\nDROP TABLE IF EXISTS compose_trigger;\nPK\x07\x08c\xda\x17\xa4\x13\x11\x00\x00\x13\x11\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00*\x00 \x0020190825090000.automation-namespace.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `compose_automation_script`\n ADD `rel_namespace` BIGINT UNSIGNED NOT NULL AFTER `id`,\n ADD INDEX (`rel_namespace`);\n\nUPDATE `compose_automation_script` SET `rel_namespace` = (SELECT MIN(id) FROM compose_namespace);\n\nALTER TABLE `compose_automation_script`\n ADD CONSTRAINT `compose_automation_script_namespace`\n FOREIGN KEY (`rel_namespace`)\n REFERENCES `compose_namespace` (`id`);\nPK\x07\x08;#~I\x98\x01\x00\x00\x98\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00#\x00 \x0020190912125228.field-default.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `compose_module_field`\n ADD `default_value` JSON DEFAULT NULL COMMENT 'Default value as a record value set.'\n AFTER `options`;\nPK\x07\x08&~D\xee\x8d\x00\x00\x00\x8d\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\x00 \x0020190917080000.add-handles.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `compose_module` ADD `handle` VARCHAR(200) NOT NULL AFTER `id`;\nALTER TABLE `compose_page` ADD `handle` VARCHAR(200) NOT NULL AFTER `id`;\nALTER TABLE `compose_chart` ADD `handle` VARCHAR(200) NOT NULL AFTER `id`;\nPK\x07\x08}h\xa5\xba\xe4\x00\x00\x00\xe4\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00 \x0020191008152820.settings.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE IF NOT EXISTS `compose_settings` (\n rel_owner BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Value owner, 0 for global settings',\n name VARCHAR(200) NOT NULL COMMENT 'Unique set of setting keys',\n value JSON COMMENT 'Setting value',\n\n updated_at DATETIME NOT NULL DEFAULT NOW() COMMENT 'When was the value updated',\n updated_by BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Who created/updated the value',\n\n PRIMARY KEY (name, rel_owner)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nPK\x07\x08WF\x8e\xd1V\x02\x00\x00V\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00 \x0020191009172213.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `compose_record_value` MODIFY `value` LONGTEXT;\nPK\x07\x08\xe0\x1e\x94\xc4<\x00\x00\x00<\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00 \x00migrations.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE IF NOT EXISTS `migrations` (\n `project` varchar(16) NOT NULL COMMENT 'sam, crm, ...',\n `filename` varchar(255) NOT NULL COMMENT 'yyyymmddHHMMSS.sql',\n `statement_index` int(11) NOT NULL COMMENT 'Statement number from SQL file',\n `status` text NOT NULL COMMENT 'ok or full error message',\n PRIMARY KEY (`project`,`filename`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nPK\x07\x089S\x05%x\x01\x00\x00x\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00 \x00new.shUT\x05\x00\x01\x80Cm8#!/bin/bash\ntouch $(date +%Y%m%d%H%M%S).up.sql\nPK\x07\x08\xc1h\xf1\xfb/\x00\x00\x00/\x00\x00\x00PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xac\xe8\x19\x1d\x12\n\x00\x00\x12\n\x00\x00\x1a\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x00\x00\x00\x0020180704080000.base.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(f\x18\x1e\x84\xc5\x01\x00\x00\xc5\x01\x00\x00%\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81c\n\x00\x0020180704080001.crm_fields-data.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xeb!\x81\xc2k\x00\x00\x00k\x00\x00\x00+\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x84\x0c\x00\x0020181109133134.crm_content-ownership.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(:.\xfb8\xa6\x00\x00\x00\xa6\x00\x00\x00.\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81Q\x0d\x00\x0020181109193047.crm_fields-related_types.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xee\x12\x15 \x05\x01\x00\x00\x05\x01\x00\x000\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\\\x0e\x00\x0020181125122152.add_multiple_relationships.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xa5q c\x91\x00\x00\x00\x91\x00\x00\x00D\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xc8\x0f\x00\x0020181125132142.add_required_and_visible_to_module_form_fields.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xd9\xd4i\xe3W\x00\x00\x00W\x00\x00\x005\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xd4\x10\x00\x0020181202163130.fix-crm-module-form-primary-key.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\"\x96\xd6pj\x00\x00\x00j\x00\x00\x000\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x97\x11\x00\x0020181204123650.add-crm-content-json-field.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xb7\x93\xd4\xf6f\x00\x00\x00f\x00\x00\x004\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81h\x12\x00\x0020181204155326.add-crm-module-form-json-field.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(mA\xa8\x1e&\x02\x00\x00&\x02\x00\x00+\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x819\x13\x00\x0020181216214630.crm-content-to-record.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xcf\xc6g\xf6\xe4\x01\x00\x00\xe4\x01\x00\x00$\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xc1\x15\x00\x0020181217100000.add-charts-tbl.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xae \xfd2\x18\x00\x00\x00\x18\x00\x00\x00#\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x00\x18\x00\x0020181224122301.rem-crm_field.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(+\xad\xb7\xed\xb8\x02\x00\x00\xb8\x02\x00\x00&\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81r\x18\x00\x0020190108100000.add-triggers-tbl.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x94#\xb9\x99-\x00\x00\x00-\x00\x00\x00/\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x87\x1b\x00\x0020190110175924.rem-crm-record-json-field.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x04]{\x1fo\x04\x00\x00o\x04\x00\x008\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x1a\x1c\x00\x0020190114072000.cleanup-record-tables-and-multival.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(h\xe2\xeb\n!\x02\x00\x00!\x02\x00\x00'\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xf8 \x00\x0020190121132408.record-updated-by.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xce\xde?\x08\xb3\x02\x00\x00\xb3\x02\x00\x00 \x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81w#\x00\x0020190227090642.attachment.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xf2\x1a)|\x97\x02\x00\x00\x97\x02\x00\x00'\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x81&\x00\x0020190427180922.change-tbl-prefix.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(m\xeb\xed~R\x02\x00\x00R\x02\x00\x00#\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81v)\x00\x0020190427210922.namespace-tbl.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(+\xecO\xd2\xd7\x08\x00\x00\xd7\x08\x00\x00$\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\",\x00\x0020190428080000.namespace-refs.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x82\x01Rn1\x01\x00\x001\x01\x00\x00%\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81T5\x00\x0020190428080000.page-timestamps.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xb1(\xbb\xf0\x8d\x05\x00\x00\x8d\x05\x00\x00#\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\xe16\x00\x0020190514090000.module_fields.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\"\xd8\xe5H\x12\x01\x00\x00\x12\x01\x00\x00!\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xc8<\x00\x0020190526090000.permissions.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(c\xda\x17\xa4\x13\x11\x00\x00\x13\x11\x00\x00 \x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x812>\x00\x0020190701090000.automation.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(;#~I\x98\x01\x00\x00\x98\x01\x00\x00*\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\x9cO\x00\x0020190825090000.automation-namespace.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(&~D\xee\x8d\x00\x00\x00\x8d\x00\x00\x00#\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\x95Q\x00\x0020190912125228.field-default.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(}h\xa5\xba\xe4\x00\x00\x00\xe4\x00\x00\x00!\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81|R\x00\x0020190917080000.add-handles.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(WF\x8e\xd1V\x02\x00\x00V\x02\x00\x00\x1e\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\xb8S\x00\x0020191008152820.settings.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xe0\x1e\x94\xc4<\x00\x00\x00<\x00\x00\x00\x15\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81cV\x00\x0020191009172213.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(9S\x05%x\x01\x00\x00x\x01\x00\x00\x0e\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xebV\x00\x00migrations.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xc1h\xf1\xfb/\x00\x00\x00/\x00\x00\x00\x06\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xed\x81\xa8X\x00\x00new.shUT\x05\x00\x01\x80Cm8PK\x05\x06\x00\x00\x00\x00\x1f\x00\x1f\x00@\x0b\x00\x00\x14Y\x00\x00\x00\x00" diff --git a/compose/db/schema/mysql/20191008152820.settings.up.sql b/compose/db/schema/mysql/20191008152820.settings.up.sql new file mode 100644 index 000000000..a1c21d84d --- /dev/null +++ b/compose/db/schema/mysql/20191008152820.settings.up.sql @@ -0,0 +1,10 @@ +CREATE TABLE IF NOT EXISTS `compose_settings` ( + rel_owner BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Value owner, 0 for global settings', + name VARCHAR(200) NOT NULL COMMENT 'Unique set of setting keys', + value JSON COMMENT 'Setting value', + + updated_at DATETIME NOT NULL DEFAULT NOW() COMMENT 'When was the value updated', + updated_by BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Who created/updated the value', + + PRIMARY KEY (name, rel_owner) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/compose/rest/handlers/settings.go b/compose/rest/handlers/settings.go new file mode 100644 index 000000000..f0e266bf9 --- /dev/null +++ b/compose/rest/handlers/settings.go @@ -0,0 +1,139 @@ +package handlers + +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `settings.go`, `settings.util.go` or `settings_test.go` to + implement your API calls, helper functions and tests. The file `settings.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + +import ( + "context" + + "net/http" + + "github.com/go-chi/chi" + "github.com/titpetric/factory/resputil" + + "github.com/cortezaproject/corteza-server/compose/rest/request" + "github.com/cortezaproject/corteza-server/pkg/logger" +) + +// Internal API interface +type SettingsAPI interface { + List(context.Context, *request.SettingsList) (interface{}, error) + Update(context.Context, *request.SettingsUpdate) (interface{}, error) + Get(context.Context, *request.SettingsGet) (interface{}, error) + Set(context.Context, *request.SettingsSet) (interface{}, error) +} + +// HTTP API interface +type Settings struct { + List func(http.ResponseWriter, *http.Request) + Update func(http.ResponseWriter, *http.Request) + Get func(http.ResponseWriter, *http.Request) + Set func(http.ResponseWriter, *http.Request) +} + +func NewSettings(h SettingsAPI) *Settings { + return &Settings{ + List: func(w http.ResponseWriter, r *http.Request) { + defer r.Body.Close() + params := request.NewSettingsList() + if err := params.Fill(r); err != nil { + logger.LogParamError("Settings.List", r, err) + resputil.JSON(w, err) + return + } + + value, err := h.List(r.Context(), params) + if err != nil { + logger.LogControllerError("Settings.List", r, err, params.Auditable()) + resputil.JSON(w, err) + return + } + logger.LogControllerCall("Settings.List", r, params.Auditable()) + if !serveHTTP(value, w, r) { + resputil.JSON(w, value) + } + }, + Update: func(w http.ResponseWriter, r *http.Request) { + defer r.Body.Close() + params := request.NewSettingsUpdate() + if err := params.Fill(r); err != nil { + logger.LogParamError("Settings.Update", r, err) + resputil.JSON(w, err) + return + } + + value, err := h.Update(r.Context(), params) + if err != nil { + logger.LogControllerError("Settings.Update", r, err, params.Auditable()) + resputil.JSON(w, err) + return + } + logger.LogControllerCall("Settings.Update", r, params.Auditable()) + if !serveHTTP(value, w, r) { + resputil.JSON(w, value) + } + }, + Get: func(w http.ResponseWriter, r *http.Request) { + defer r.Body.Close() + params := request.NewSettingsGet() + if err := params.Fill(r); err != nil { + logger.LogParamError("Settings.Get", r, err) + resputil.JSON(w, err) + return + } + + value, err := h.Get(r.Context(), params) + if err != nil { + logger.LogControllerError("Settings.Get", r, err, params.Auditable()) + resputil.JSON(w, err) + return + } + logger.LogControllerCall("Settings.Get", r, params.Auditable()) + if !serveHTTP(value, w, r) { + resputil.JSON(w, value) + } + }, + Set: func(w http.ResponseWriter, r *http.Request) { + defer r.Body.Close() + params := request.NewSettingsSet() + if err := params.Fill(r); err != nil { + logger.LogParamError("Settings.Set", r, err) + resputil.JSON(w, err) + return + } + + value, err := h.Set(r.Context(), params) + if err != nil { + logger.LogControllerError("Settings.Set", r, err, params.Auditable()) + resputil.JSON(w, err) + return + } + logger.LogControllerCall("Settings.Set", r, params.Auditable()) + if !serveHTTP(value, w, r) { + resputil.JSON(w, value) + } + }, + } +} + +func (h Settings) MountRoutes(r chi.Router, middlewares ...func(http.Handler) http.Handler) { + r.Group(func(r chi.Router) { + r.Use(middlewares...) + r.Get("/settings/", h.List) + r.Patch("/settings/", h.Update) + r.Get("/settings/{key}", h.Get) + r.Put("/settings/{key}", h.Set) + }) +} diff --git a/compose/rest/request/settings.go b/compose/rest/request/settings.go new file mode 100644 index 000000000..368166e14 --- /dev/null +++ b/compose/rest/request/settings.go @@ -0,0 +1,262 @@ +package request + +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `settings.go`, `settings.util.go` or `settings_test.go` to + implement your API calls, helper functions and tests. The file `settings.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + +import ( + "io" + "strings" + + "encoding/json" + "mime/multipart" + "net/http" + + "github.com/go-chi/chi" + "github.com/pkg/errors" + + sqlxTypes "github.com/jmoiron/sqlx/types" +) + +var _ = chi.URLParam +var _ = multipart.FileHeader{} + +// Settings list request parameters +type SettingsList struct { + Prefix string +} + +func NewSettingsList() *SettingsList { + return &SettingsList{} +} + +func (r SettingsList) Auditable() map[string]interface{} { + var out = map[string]interface{}{} + + out["prefix"] = r.Prefix + + return out +} + +func (r *SettingsList) Fill(req *http.Request) (err error) { + if strings.ToLower(req.Header.Get("content-type")) == "application/json" { + err = json.NewDecoder(req.Body).Decode(r) + + switch { + case err == io.EOF: + err = nil + case err != nil: + return errors.Wrap(err, "error parsing http request body") + } + } + + if err = req.ParseForm(); err != nil { + return err + } + + get := map[string]string{} + post := map[string]string{} + urlQuery := req.URL.Query() + for name, param := range urlQuery { + get[name] = string(param[0]) + } + postVars := req.Form + for name, param := range postVars { + post[name] = string(param[0]) + } + + if val, ok := get["prefix"]; ok { + r.Prefix = val + } + + return err +} + +var _ RequestFiller = NewSettingsList() + +// Settings update request parameters +type SettingsUpdate struct { + Values sqlxTypes.JSONText +} + +func NewSettingsUpdate() *SettingsUpdate { + return &SettingsUpdate{} +} + +func (r SettingsUpdate) Auditable() map[string]interface{} { + var out = map[string]interface{}{} + + out["values"] = r.Values + + return out +} + +func (r *SettingsUpdate) Fill(req *http.Request) (err error) { + if strings.ToLower(req.Header.Get("content-type")) == "application/json" { + err = json.NewDecoder(req.Body).Decode(r) + + switch { + case err == io.EOF: + err = nil + case err != nil: + return errors.Wrap(err, "error parsing http request body") + } + } + + if err = req.ParseForm(); err != nil { + return err + } + + get := map[string]string{} + post := map[string]string{} + urlQuery := req.URL.Query() + for name, param := range urlQuery { + get[name] = string(param[0]) + } + postVars := req.Form + for name, param := range postVars { + post[name] = string(param[0]) + } + + if val, ok := post["values"]; ok { + + if r.Values, err = parseJSONTextWithErr(val); err != nil { + return err + } + } + + return err +} + +var _ RequestFiller = NewSettingsUpdate() + +// Settings get request parameters +type SettingsGet struct { + OwnerID uint64 `json:",string"` + Key string +} + +func NewSettingsGet() *SettingsGet { + return &SettingsGet{} +} + +func (r SettingsGet) Auditable() map[string]interface{} { + var out = map[string]interface{}{} + + out["ownerID"] = r.OwnerID + out["key"] = r.Key + + return out +} + +func (r *SettingsGet) Fill(req *http.Request) (err error) { + if strings.ToLower(req.Header.Get("content-type")) == "application/json" { + err = json.NewDecoder(req.Body).Decode(r) + + switch { + case err == io.EOF: + err = nil + case err != nil: + return errors.Wrap(err, "error parsing http request body") + } + } + + if err = req.ParseForm(); err != nil { + return err + } + + get := map[string]string{} + post := map[string]string{} + urlQuery := req.URL.Query() + for name, param := range urlQuery { + get[name] = string(param[0]) + } + postVars := req.Form + for name, param := range postVars { + post[name] = string(param[0]) + } + + if val, ok := get["ownerID"]; ok { + r.OwnerID = parseUInt64(val) + } + r.Key = chi.URLParam(req, "key") + + return err +} + +var _ RequestFiller = NewSettingsGet() + +// Settings set request parameters +type SettingsSet struct { + Key string + OwnerID uint64 `json:",string"` + Value sqlxTypes.JSONText +} + +func NewSettingsSet() *SettingsSet { + return &SettingsSet{} +} + +func (r SettingsSet) Auditable() map[string]interface{} { + var out = map[string]interface{}{} + + out["key"] = r.Key + out["ownerID"] = r.OwnerID + out["value"] = r.Value + + return out +} + +func (r *SettingsSet) Fill(req *http.Request) (err error) { + if strings.ToLower(req.Header.Get("content-type")) == "application/json" { + err = json.NewDecoder(req.Body).Decode(r) + + switch { + case err == io.EOF: + err = nil + case err != nil: + return errors.Wrap(err, "error parsing http request body") + } + } + + if err = req.ParseForm(); err != nil { + return err + } + + get := map[string]string{} + post := map[string]string{} + urlQuery := req.URL.Query() + for name, param := range urlQuery { + get[name] = string(param[0]) + } + postVars := req.Form + for name, param := range postVars { + post[name] = string(param[0]) + } + + r.Key = chi.URLParam(req, "key") + if val, ok := post["ownerID"]; ok { + r.OwnerID = parseUInt64(val) + } + if val, ok := post["value"]; ok { + + if r.Value, err = parseJSONTextWithErr(val); err != nil { + return err + } + } + + return err +} + +var _ RequestFiller = NewSettingsSet() diff --git a/compose/rest/router.go b/compose/rest/router.go index 93831805d..5d6a7c5f7 100644 --- a/compose/rest/router.go +++ b/compose/rest/router.go @@ -39,6 +39,7 @@ func MountRoutes(r chi.Router) { handlers.NewChart(chart).MountRoutes(r) handlers.NewNotification(notification).MountRoutes(r) handlers.NewPermissions(Permissions{}.New()).MountRoutes(r) + handlers.NewSettings(Settings{}.New()).MountRoutes(r) handlers.NewAutomationScript(automationScript).MountRoutes(r) handlers.NewAutomationTrigger(automationTrigger).MountRoutes(r) diff --git a/compose/rest/settings.go b/compose/rest/settings.go new file mode 100644 index 000000000..7964da17d --- /dev/null +++ b/compose/rest/settings.go @@ -0,0 +1,61 @@ +package rest + +import ( + "context" + + "github.com/pkg/errors" + "github.com/titpetric/factory/resputil" + + "github.com/cortezaproject/corteza-server/compose/rest/request" + "github.com/cortezaproject/corteza-server/compose/service" + "github.com/cortezaproject/corteza-server/pkg/settings" +) + +var _ = errors.Wrap + +type ( + Settings struct { + svc struct { + settings service.SettingsService + } + } +) + +func (Settings) New() *Settings { + ctrl := &Settings{} + ctrl.svc.settings = service.DefaultSettings + + return ctrl +} + +func (ctrl *Settings) List(ctx context.Context, r *request.SettingsList) (interface{}, error) { + if vv, err := ctrl.svc.settings.With(ctx).FindByPrefix(r.Prefix); err != nil { + return nil, err + } else { + return vv, err + } +} + +func (ctrl *Settings) Update(ctx context.Context, r *request.SettingsUpdate) (interface{}, error) { + values := settings.ValueSet{} + + if err := r.Values.Unmarshal(&values); err != nil { + return nil, err + } else if err := ctrl.svc.settings.With(ctx).BulkSet(values); err != nil { + return nil, err + } else { + return true, nil + } +} + +func (ctrl *Settings) Get(ctx context.Context, r *request.SettingsGet) (interface{}, error) { + if v, err := ctrl.svc.settings.With(ctx).Get(r.Key, r.OwnerID); err != nil { + return nil, err + } else { + return v, nil + } +} + +func (ctrl *Settings) Set(ctx context.Context, r *request.SettingsSet) (interface{}, error) { + return resputil.OK(), errors.New("Not implemented: Settings.set") +} diff --git a/compose/service/access_control.go b/compose/service/access_control.go index 8913d3641..034ea93e8 100644 --- a/compose/service/access_control.go +++ b/compose/service/access_control.go @@ -49,6 +49,14 @@ func (svc accessControl) CanGrant(ctx context.Context) bool { return svc.can(ctx, types.ComposePermissionResource, "grant") } +func (svc accessControl) CanReadSettings(ctx context.Context) bool { + return svc.can(ctx, types.ComposePermissionResource, "settings.read") +} + +func (svc accessControl) CanManageSettings(ctx context.Context) bool { + return svc.can(ctx, types.ComposePermissionResource, "settings.manage") +} + func (svc accessControl) CanCreateNamespace(ctx context.Context) bool { return svc.can(ctx, types.ComposePermissionResource, "namespace.create") } diff --git a/compose/service/service.go b/compose/service/service.go index 9aae14622..b938996b6 100644 --- a/compose/service/service.go +++ b/compose/service/service.go @@ -12,6 +12,7 @@ import ( "github.com/cortezaproject/corteza-server/pkg/automation/corredor" "github.com/cortezaproject/corteza-server/pkg/cli/options" "github.com/cortezaproject/corteza-server/pkg/permissions" + internalSettings "github.com/cortezaproject/corteza-server/pkg/settings" "github.com/cortezaproject/corteza-server/pkg/store" "github.com/cortezaproject/corteza-server/pkg/store/minio" "github.com/cortezaproject/corteza-server/pkg/store/plain" @@ -42,6 +43,9 @@ var ( DefaultLogger *zap.Logger + DefaultInternalSettings internalSettings.Service + DefaultSettings SettingsService + // DefaultPermissions Retrieves & stores permissions DefaultPermissions permissionServicer @@ -78,6 +82,8 @@ func Init(ctx context.Context, log *zap.Logger, c Config) (err error) { DefaultLogger = log.Named("service") + DefaultInternalSettings = internalSettings.NewService(internalSettings.NewRepository(repository.DB(ctx), "compose_settings")) + if DefaultStore == nil { if c.Storage.MinioEndpoint != "" { if c.Storage.MinioBucket == "" { @@ -119,6 +125,8 @@ func Init(ctx context.Context, log *zap.Logger, c Config) (err error) { } DefaultAccessControl = AccessControl(DefaultPermissions) + DefaultSettings = Settings(ctx, DefaultInternalSettings) + DefaultNamespace = Namespace() DefaultModule = Module() diff --git a/compose/service/settings.go b/compose/service/settings.go new file mode 100644 index 000000000..45e4105b2 --- /dev/null +++ b/compose/service/settings.go @@ -0,0 +1,96 @@ +package service + +import ( + "context" + + "github.com/pkg/errors" + "github.com/titpetric/factory" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" + + "github.com/cortezaproject/corteza-server/compose/repository" + "github.com/cortezaproject/corteza-server/pkg/logger" + internalSettings "github.com/cortezaproject/corteza-server/pkg/settings" +) + +type ( + // Wrapper service for compose around internal settings service + settings struct { + ctx context.Context + db *factory.DB + logger *zap.Logger + + ac settingsAccessController + internalSettings internalSettings.Service + } + + settingsAccessController interface { + CanReadSettings(ctx context.Context) bool + CanManageSettings(ctx context.Context) bool + } + + SettingsService interface { + With(ctx context.Context) SettingsService + FindByPrefix(prefix string) (vv internalSettings.ValueSet, err error) + Set(v *internalSettings.Value) (err error) + BulkSet(vv internalSettings.ValueSet) (err error) + Get(name string, ownedBy uint64) (out *internalSettings.Value, err error) + } +) + +func Settings(ctx context.Context, intSet internalSettings.Service) SettingsService { + return (&settings{ + internalSettings: intSet, + ac: DefaultAccessControl, + logger: DefaultLogger.Named("settings"), + }).With(ctx) +} + +func (svc settings) With(ctx context.Context) SettingsService { + db := repository.DB(ctx) + + return &settings{ + ctx: ctx, + db: db, + ac: svc.ac, + logger: svc.logger, + + internalSettings: svc.internalSettings.With(ctx), + } +} + +func (svc settings) log(ctx context.Context, fields ...zapcore.Field) *zap.Logger { + return logger.AddRequestID(ctx, svc.logger).With(fields...) +} + +func (svc settings) FindByPrefix(prefix string) (vv internalSettings.ValueSet, err error) { + if !svc.ac.CanReadSettings(svc.ctx) { + return nil, errors.New("not allowed to read settings") + } + + return svc.internalSettings.FindByPrefix(prefix) +} + +func (svc settings) Set(v *internalSettings.Value) (err error) { + if !svc.ac.CanManageSettings(svc.ctx) { + return errors.New("not allowed to manage settings") + } + + return svc.internalSettings.Set(v) +} + +func (svc settings) BulkSet(vv internalSettings.ValueSet) (err error) { + if !svc.ac.CanManageSettings(svc.ctx) { + return errors.New("not allowed to manage settings") + } + + return svc.internalSettings.BulkSet(vv) +} + +func (svc settings) Get(name string, ownedBy uint64) (out *internalSettings.Value, err error) { + if !svc.ac.CanReadSettings(svc.ctx) { + return nil, errors.New("not allowed to read settings") + } + + return svc.internalSettings.Get(name, ownedBy) +} diff --git a/docs/compose/README.md b/docs/compose/README.md index de75513ab..228e3e4b3 100644 --- a/docs/compose/README.md +++ b/docs/compose/README.md @@ -1183,4 +1183,77 @@ Compose records | namespaceID | uint64 | PATH | Namespace ID | N/A | YES | | moduleID | uint64 | PATH | Module ID | N/A | YES | +--- + + + + +# Settings + +| Method | Endpoint | Purpose | +| ------ | -------- | ------- | +| `GET` | `/settings/` | List settings | +| `PATCH` | `/settings/` | Update settings | +| `GET` | `/settings/{key}` | Get a value for a key | +| `PUT` | `/settings/{key}` | Set a value for a key | + +## List settings + +#### Method + +| URI | Protocol | Method | Authentication | +| --- | -------- | ------ | -------------- | +| `/settings/` | HTTP/S | GET | | + +#### Request parameters + +| Parameter | Type | Method | Description | Default | Required? | +| --------- | ---- | ------ | ----------- | ------- | --------- | +| prefix | string | GET | Key prefix | N/A | NO | + +## Update settings + +#### Method + +| URI | Protocol | Method | Authentication | +| --- | -------- | ------ | -------------- | +| `/settings/` | HTTP/S | PATCH | | + +#### Request parameters + +| Parameter | Type | Method | Description | Default | Required? | +| --------- | ---- | ------ | ----------- | ------- | --------- | +| values | sqlxTypes.JSONText | POST | Array of new settings: `[{ name: ..., value: ... }]`. Omit value to remove setting | N/A | YES | + +## Get a value for a key + +#### Method + +| URI | Protocol | Method | Authentication | +| --- | -------- | ------ | -------------- | +| `/settings/{key}` | HTTP/S | GET | | + +#### Request parameters + +| Parameter | Type | Method | Description | Default | Required? | +| --------- | ---- | ------ | ----------- | ------- | --------- | +| ownerID | uint64 | GET | Owner ID | N/A | NO | +| key | string | PATH | Setting key | N/A | YES | + +## Set a value for a key + +#### Method + +| URI | Protocol | Method | Authentication | +| --- | -------- | ------ | -------------- | +| `/settings/{key}` | HTTP/S | PUT | | + +#### Request parameters + +| Parameter | Type | Method | Description | Default | Required? | +| --------- | ---- | ------ | ----------- | ------- | --------- | +| key | string | PATH | Setting key | N/A | YES | +| ownerID | uint64 | POST | Owner | N/A | NO | +| value | sqlxTypes.JSONText | POST | Setting value | N/A | YES | + --- \ No newline at end of file diff --git a/provision/compose/static.go b/provision/compose/static.go index 22ed411ad..9403c2113 100644 --- a/provision/compose/static.go +++ b/provision/compose/static.go @@ -3,4 +3,4 @@ // Package contains static assets. package compose -var Asset = "PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00 \x000000_access_control.yamlUT\x05\x00\x01\x80Cm8allow:\n everyone:\n compose:\n - access\n\n admins:\n compose:\n - access\n - grant\n - namespace.create\n\n compose:namespace:\n - read\n - update\n - delete\n - manage\n - page.create\n - module.create\n - chart.create\n - automation-script.create\n\n compose:module:\n - read\n - update\n - delete\n - record.create\n - record.read\n - record.update\n - record.delete\n - automation-trigger.manage\n\n compose:chart:\n - read\n - update\n - delete\n\n compose:page:\n - read\n - update\n - delete\n\n compose:automation-script:\n - read\n - update\n - delete\nPK\x07\x08\xe2u&+\xaf\x02\x00\x00\xaf\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00 \x001000_namespace.yamlUT\x05\x00\x01\x80Cm8namespaces:\n crm:\n name: CRM\n allow:\n everyone:\n - module.create\n - read\n deny:\n everyone:\n - delete\nPK\x07\x08\xe8\x0c\x08\xf3\x88\x00\x00\x00\x88\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00 \x001100_modules.yamlUT\x05\x00\x01\x80Cm8namespace: crm\nmodules:\n Account:\n name: Account\n fields:\n AccountName:\n label: Account Name\n kind: String\n required: true\n AccountSource:\n label: Account Source\n kind: Select\n options:\n options:\n - Customer Referral\n - Direct\n - Employee Referral\n - Event\n - Existing Customer\n - Inbound Call\n - Outbound List\n - Partner Referral\n - Seminar\n - Social Media\n - Webinar\n - Website (Organic)\n - Website (PPC)\n - Word of Mouth\n - Other\n selectType: default\n AnnualRevenue:\n label: Annual Revenue\n kind: Select\n options:\n options:\n - Less Than 500,000\n - 500,000 To 1 Million\n - 1 To 2.5 Million\n - 2.5 To 5 Million\n - 5 To 10 Million\n - 10 To 20 Million\n - 20 To 50 Million\n - 50 To 100 Million\n - 100 To 500 Million\n selectType: default\n BillingCity:\n label: Billing City\n kind: String\n BillingCountry:\n label: Billing Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n selectType: default\n BillingPostalCode:\n label: Billing Postal Code\n kind: String\n BillingState:\n label: Billing State\n kind: String\n BillingStreet:\n label: Billing Street\n kind: String\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n Facebook:\n label: Facebook\n kind: String\n Fax:\n label: Fax\n kind: String\n Industry:\n label: Industry\n kind: Select\n options:\n options:\n - \"\"\n - Agriculture\n - Apparel\n - Banking\n - Biotechnology\n - Chemicals\n - Communications\n - Construction\n - Consulting\n - Education\n - Electronics\n - Energy\n - Engineering\n - Entertainment\n - Environmental\n - Finance\n - Food & Beverage\n - Government\n - Healthcare\n - Hospitality\n - Insurance\n - Machinery\n - Manufacturing\n - Media\n - Not For Profit\n - Other\n - Recreation\n - Retail\n - Shipping\n - Technology\n - Telecommunications\n - Transportation\n - Utilities\n selectType: default\n LastViewedDate:\n label: Last Viewed Date\n kind: DateTime\n LinkedIn:\n label: LinkedIn\n kind: String\n NumberOfEmployees:\n label: Employees\n kind: Number\n options:\n format: 0\n precision: 0\n OwnerId:\n label: Account Owner\n kind: User\n options:\n presetWithAuthenticated: false\n selectType: default\n Ownership:\n label: Ownership\n kind: Select\n options:\n options:\n - Public\n - Private\n selectType: default\n ParentId:\n label: Parent Account\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n selectType: default\n Phone:\n label: Phone\n kind: String\n Rating:\n label: Rating\n kind: Select\n options:\n options:\n - \xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x85\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x86\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\n selectType: default\n ShippingCity:\n label: Shipping City\n kind: String\n ShippingCountry:\n label: Shipping Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n selectType: default\n ShippingPostalCode:\n label: Shipping Postal Code\n kind: String\n ShippingState:\n label: Shipping State\n kind: String\n ShippingStreet:\n label: Shipping Street\n kind: String\n Sic:\n label: SIC Code\n kind: String\n SicDesc:\n label: SIC Description\n kind: String\n Twitter:\n label: Twitter\n kind: String\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Channel Partner / Reseller\n - Customer - Channel\n - Customer - Direct\n - Installation Partner\n - Pending\n - Prospect\n - Technology Partner\n - Other\n selectType: default\n Website:\n label: Website\n kind: String\n AccountContactRole:\n name: AccountContactRole\n fields:\n AccountId:\n label: Account\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n ContactId:\n label: Contact\n kind: Record\n options:\n labelField: MasterRecordId\n module: Contact\n queryFields:\n - AccountId\n - MasterRecordId\n IsPrimary:\n label: Primary\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Role:\n label: Role\n kind: Select\n options:\n options:\n - Business User\n - Decision Maker\n - Economic Buyer\n - Economic Decision Maker\n - Evaluator\n - Executive Sponsor\n - Gatekeeper\n - Influencer\n - Project Manager\n - Technical Buyer\n - Other\n CampaignMember:\n name: CampaignMember\n fields:\n CampaignId:\n label: Campaign\n kind: Record\n options:\n labelField: Name\n module: Campaigns\n queryFields:\n - Name\n ContactId:\n label: Contact\n kind: Record\n options:\n labelField: Email\n module: Contact\n queryFields:\n - AccountId\n - Email\n - FirstName\n - LastName\n FirstRespondedDate:\n label: First Responded Date\n kind: DateTime\n HasResponded:\n label: Responded\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LeadId:\n label: Lead\n kind: Record\n options:\n labelField: Email\n module: Lead\n queryFields:\n - Email\n - FirstName\n - LastName\n Status:\n label: Status\n kind: Select\n options:\n options:\n - Attended\n - Registered\n - Responded\n - Viewed a Demo\n - Visited Booth\n - Viewed a Webinar\n Campaigns:\n name: Campaigns\n fields:\n ActualCost:\n label: Actual Cost\n kind: Number\n options:\n format: 0\n precision: 0\n AmountAllOpportunities:\n label: Value Opportunities in Campaign\n kind: Number\n options:\n format: 0\n precision: 0\n AmountWonOpportunities:\n label: Value Won Opportunities in Campaign\n kind: Number\n options:\n format: 0\n precision: 0\n BudgetedCost:\n label: Budgeted Cost\n kind: Number\n options:\n format: 0\n precision: 0\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n EndDate:\n label: End Date\n kind: DateTime\n options:\n onlyDate: true\n ExpectedResponse:\n label: Expected Response (%)\n kind: Number\n options:\n format: 0\n precision: 0\n ExpectedRevenue:\n label: Expected Revenue\n kind: Number\n options:\n format: 0\n precision: 0\n IsActive:\n label: Active\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LastActivityDate:\n label: Last Activity\n kind: DateTime\n LastModifiedById:\n label: Last Modified By\n kind: User\n options:\n presetWithAuthenticated: false\n LastModifiedDate:\n label: Last Modified Date\n kind: DateTime\n LastViewedDate:\n label: Last Viewed Date\n kind: DateTime\n Name:\n label: Campaign Name\n kind: String\n NumberOfContacts:\n label: Contacts in Campaign\n kind: Number\n options:\n format: 0\n precision: 0\n NumberOfConvertedLeads:\n label: Converted Leads in Campaign\n kind: Number\n options:\n format: 0\n precision: 0\n NumberOfLeads:\n label: Leads in Campaign\n kind: Number\n options:\n format: 0\n precision: 0\n NumberOfOpportunities:\n label: Opportunities in Campaign\n kind: Number\n options:\n format: 0\n precision: 0\n NumberOfResponses:\n label: Responses in Campaign\n kind: Number\n options:\n format: 0\n precision: 0\n NumberOfWonOpportunities:\n label: Won Opportunities in Campaign\n kind: Number\n options:\n format: 0\n precision: 0\n NumberSent:\n label: Num Sent\n kind: Number\n options:\n format: 0\n precision: 0\n OwnerId:\n label: Campaign Owner\n kind: User\n options:\n presetWithAuthenticated: false\n ParentId:\n label: Parent Campaign\n kind: Record\n options:\n module: Campaigns\n queryFields:\n - Name\n StartDate:\n label: Start Date\n kind: DateTime\n options:\n onlyDate: true\n Status:\n label: Status\n kind: Select\n options:\n options:\n - Aborted\n - Completed\n - In Progress\n - Planned\n - Tentative\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Lead Generation - Direct Mail\n - Lead Generation - Conference\n - Lead Generation - Email Blast\n - Lead Generation - PPC\n - Lead Generation - Seminar\n - Lead Generation - Trade Show\n - Lead Generation - Webinar\n - Lead Generation - Website\n - Brand Building - Print advertisement\n - Brand Building - Radio advertisement\n - Brand Building - TV advertisement\n - Brand Building - Sponsoring\n - Brand Building - Social Media\n - Lead Generation - Contacting personal network\n Case:\n name: Case\n fields:\n AccountId:\n label: Account Name\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n CaseNumber:\n label: Case Number\n kind: Number\n options:\n format: \"0000000\"\n precision: 0\n ClosedDate:\n label: Date/Time Closed\n kind: DateTime\n ContactId:\n label: Contact Name\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n File:\n label: File\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: list\n IsClosed:\n label: Closed\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsClosedOnCreate:\n label: Closed When Created\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsEscalated:\n label: Escalated\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Origin:\n label: Case Origin\n kind: Select\n options:\n options:\n - Email\n - Messaging\n - Phone\n - Web\n - Other\n OwnerId:\n label: Case Owner\n kind: User\n options:\n presetWithAuthenticated: false\n ParentId:\n label: Parent Case\n kind: Record\n options:\n labelField: Subject\n module: Case\n queryFields:\n - AccountId\n - CaseNumber\n - Subject\n Priority:\n label: Priority\n kind: Select\n options:\n options:\n - Low\n - Medium\n - High\n ProductId:\n label: Product\n kind: Record\n options:\n labelField: Name\n module: Product\n queryFields:\n - ProductCode\n - Name\n Reason:\n label: Case Reason\n kind: Select\n options:\n options:\n - Documentation unclear\n - Software bug\n - User didn't attend training\n - Other\n SolutionFile:\n label: Solution File\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: list\n SolutionId:\n label: Solution Record\n kind: Record\n options:\n labelField: SolutionName\n module: Solution\n queryFields:\n - SolutionNote\n - SolutionNumber\n - SolutionName\n SolutionName:\n label: Solution Title\n kind: String\n SolutionNote:\n label: Solution Details\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n Status:\n label: Status\n kind: Select\n options:\n options:\n - New\n - Working\n - Escalated\n - Closed\n Subject:\n label: Subject\n kind: String\n SubmitAsSolution:\n label: Submit as Solution Record when Case is Closed\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n SuppliedCompany:\n label: Supplied Company\n kind: String\n SuppliedEmail:\n label: Supplied Email\n kind: String\n SuppliedName:\n label: Supplied Name\n kind: String\n SuppliedPhone:\n label: Supplied Phone\n kind: String\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Bug\n - Feature Request\n - Question\n - Other\n CaseContactRole:\n name: CaseContactRole\n fields:\n CaseId:\n label: Case\n kind: Record\n options:\n labelField: Subject\n module: Case\n queryFields:\n - CaseNumber\n - Subject\n ContactId:\n label: Contact\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n IsPrimary:\n label: Primary\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Role:\n label: Role\n kind: Select\n options:\n options:\n - Business User\n - Decision Maker\n - Economic Buyer\n - Economic Decision Maker\n - Evaluator\n - Executive Sponsor\n - Gatekeeper\n - Influencer\n - Project Manager\n - Technical Buyer\n - Other\n CaseMilestone:\n name: CaseMilestone\n fields:\n CaseId:\n label: Case\n kind: Record\n options:\n labelField: Subject\n module: Case\n queryFields:\n - AccountId\n - CaseNumber\n - Subject\n CompletionDate:\n label: Completion Date\n kind: DateTime\n IsCompleted:\n label: Completed\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsViolated:\n label: Violation\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n MilestoneTypeId:\n label: Milestone Type\n kind: Record\n options:\n labelField: Name\n module: MilestoneType\n queryFields:\n - Name\n StartDate:\n label: Start Date\n kind: DateTime\n TargetDate:\n label: Target Date\n kind: DateTime\n TargetResponseInDays:\n label: Target Response (Days)\n kind: Number\n options:\n format: 0\n precision: 0\n TargetResponseInHrs:\n label: Target Response (Hours)\n kind: Number\n options:\n format: 0\n precision: 0\n TargetResponseInMins:\n label: Target Response (Mins)\n kind: Number\n options:\n format: 0\n precision: 0\n CaseUpdate:\n name: CaseUpdate\n fields:\n CaseId:\n label: Case\n kind: Record\n options:\n labelField: Subject\n module: Case\n queryFields:\n - AccountId\n - CaseNumber\n - Subject\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n File:\n label: File\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: list\n IsSolution:\n label: Marked as solution\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Email\n - Call\n - Fax\n - Letter\n - Visit\n Contact:\n name: Contact\n fields:\n AccountId:\n label: Account Name\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields: []\n AssistantName:\n label: Assistant\n kind: String\n AssistantPhone:\n label: Asst. Phone\n kind: String\n Birthdate:\n label: Birthdate\n kind: DateTime\n private: true\n Department:\n label: Department\n kind: String\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n DoNotCall:\n label: Do Not Call\n kind: Bool\n options:\n falseLabel: \"False\"\n trueLabel: Do Not Call\n Email:\n label: Email\n kind: Email\n private: true\n Facebook:\n label: Facebook\n kind: Url\n private: true\n Fax:\n label: Fax\n kind: String\n private: true\n FirstName:\n label: First Name\n kind: String\n private: true\n HasOptedOutOfEmail:\n label: Email Opt Out\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n HasOptedOutOfFax:\n label: Fax Opt Out\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n HomePhone:\n label: Home Phone\n kind: String\n private: true\n IsDeleted:\n label: Deleted\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsPrimary:\n label: Primary contact for account\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LastName:\n label: Last Name\n kind: String\n private: true\n LastViewedDate:\n label: Last Viewed Date\n kind: DateTime\n LeadSource:\n label: Lead Source\n kind: Select\n options:\n options:\n - Customer Referral\n - Direct\n - Employee Referral\n - Event\n - Existing Customer\n - Inbound Call\n - Outbound List\n - Partner Referral\n - Seminar\n - Social Media\n - Webinar\n - Website (Organic)\n - Website (PPC)\n - Word of Mouth\n - Other\n LinkedIn:\n label: LinkedIn\n kind: Url\n private: true\n MailingCity:\n label: Mailing City\n kind: String\n private: true\n MailingCountry:\n label: Mailing Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n private: true\n MailingPostalCode:\n label: Mailing Postal Code\n kind: String\n private: true\n MailingState:\n label: Mailing State\n kind: String\n private: true\n MailingStreet:\n label: Mailing Street\n kind: String\n private: true\n MasterRecordId:\n label: Contact\n kind: Record\n options:\n labelField: Email\n module: Contact\n queryFields: []\n MobilePhone:\n label: Mobile\n kind: String\n private: true\n OtherCity:\n label: Other City\n kind: String\n private: true\n OtherCountry:\n label: Other Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n private: true\n OtherPhone:\n label: Other Phone\n kind: String\n private: true\n OtherPostalCode:\n label: Other Postal Code\n kind: String\n private: true\n OtherState:\n label: Other State\n kind: String\n private: true\n OtherStreet:\n label: Other Street\n kind: String\n private: true\n OwnerId:\n label: Contact Owner\n kind: User\n options:\n presetWithAuthenticated: false\n Phone:\n label: Phone\n kind: String\n private: true\n PhotoUrl:\n label: Photo URL\n kind: Url\n private: true\n RecordLabel:\n label: Record Label\n kind: String\n private: true\n ReportsToId:\n label: Reports To\n kind: Record\n options:\n labelField: Email\n module: Contact\n queryFields:\n - AccountId\n - Email\n - FirstName\n - LastName\n Salutation:\n label: Salutation\n kind: String\n private: true\n Title:\n label: Title\n kind: String\n private: true\n Twitter:\n label: Twitter\n kind: Url\n private: true\n Contract:\n name: Contract\n fields:\n AccountId:\n label: Account Name\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n ActivatedById:\n label: Activated By\n kind: Record\n options:\n labelField: Email\n module: Contact\n queryFields:\n - AccountId\n - Email\n - FirstName\n - LastName\n ActivatedDate:\n label: Activated Date\n kind: DateTime\n BillingCity:\n label: Billing City\n kind: String\n private: true\n BillingCountry:\n label: Billing Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n private: true\n BillingPostalCode:\n label: Billing Postal Code\n kind: String\n private: true\n BillingState:\n label: Billing State\n kind: String\n private: true\n BillingStreet:\n label: Billing Street\n kind: String\n private: true\n CompanySignedDate:\n label: Company Signed Date\n kind: DateTime\n CompanySignedId:\n label: Company Signed By\n kind: Record\n options:\n labelField: Email\n module: Contact\n queryFields:\n - AccountId\n - Email\n - FirstName\n - LastName\n ContractNumber:\n label: Contract Number\n kind: Number\n options:\n format: \"0000000\"\n precision: 0\n ContractTerm:\n label: Term (months)\n kind: Number\n options:\n format: 0\n precision: 0\n CustomerSignedDate:\n label: Customer Signed Date\n kind: DateTime\n CustomerSignedId:\n label: Customer Signed By\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n CustomerSignedTitle:\n label: Customer Signed Title\n kind: String\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n EndDate:\n label: End Date\n kind: DateTime\n options:\n onlyDate: true\n File1:\n label: File 1\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: list\n File2:\n label: File 2\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: list\n File3:\n label: File 3\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: list\n File4:\n label: File 4\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: list\n LastActivityDate:\n label: Last Activity\n kind: DateTime\n LastApprovedDate:\n label: Last Approved Date\n kind: DateTime\n Name:\n label: Contract Name\n kind: String\n OwnerExpirationNotice:\n label: Owner Expiration Notice\n kind: Select\n options:\n options:\n - 3 Days\n - 5 Days\n - 7 Days\n - 14 Days\n - 30 Days\n - 45 Days\n - 60 Days\n - 75 Days\n - 90 Days\n - 120 Days\n - 180 Days\n - 240 Days\n - 300 Days\n - 365 Days\n OwnerId:\n label: Contract Owner\n kind: User\n options:\n presetWithAuthenticated: false\n RecordLabel:\n label: Record Label\n kind: String\n ShippingCity:\n label: Shipping City\n kind: String\n private: true\n ShippingCountry:\n label: Shipping Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n private: true\n ShippingPostalCode:\n label: Shipping Postal Code\n kind: String\n private: true\n ShippingState:\n label: Shipping State\n kind: String\n private: true\n ShippingStreet:\n label: Shipping Street\n kind: String\n private: true\n SpecialTerms:\n label: Special Terms\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n StartDate:\n label: Start Date\n kind: DateTime\n options:\n onlyDate: true\n Status:\n label: Status\n kind: Select\n options:\n options:\n - Draft\n - Activated\n - In Approval Process\n - Inactive (Expired)\n - Inactive (Deactivated)\n ContractContactRole:\n name: ContractContactRole\n fields:\n ContactId:\n label: Contact\n kind: Record\n options:\n labelField: Email\n module: Contact\n queryFields:\n - AccountId\n - Email\n - FirstName\n - LastName\n ContractId:\n label: Contract\n kind: Record\n options:\n labelField: Name\n module: Contract\n queryFields:\n - AccountId\n - Name\n - ContractNumber\n IsPrimary:\n label: Primary\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Role:\n label: Role\n kind: Select\n options:\n options:\n - Business User\n - Decision Maker\n - Economic Buyer\n - Economic Decision Maker\n - Evaluator\n - Executive Sponsor\n - Gatekeeper\n - Influencer\n - Project Manager\n - Technical Buyer\n - Other\n ContractLineItem:\n name: ContractLineItem\n fields:\n ContractId:\n label: 'Contract '\n kind: Record\n options:\n labelField: Name\n module: Contract\n queryFields:\n - AccountId\n - Name\n - ContractNumber\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n Discount:\n label: Discount\n kind: Number\n options:\n format: 0\n precision: 0\n EndDate:\n label: End Date\n kind: DateTime\n options:\n onlyDate: true\n LineItemNumber:\n label: Line Item Number\n kind: String\n ListPrice:\n label: List Price\n kind: Number\n options:\n format: 0\n precision: \"2\"\n suffix: \xe2\x82\xac\n PricebookEntryId:\n label: Price Book Entry\n kind: Record\n options:\n labelField: Name\n module: PricebookEntry\n queryFields:\n - ProductCode\n - Name\n Quantity:\n label: Quantity\n kind: Number\n options:\n format: 0\n precision: 0\n StartDate:\n label: Start Date\n kind: DateTime\n options:\n onlyDate: true\n Status:\n label: Status\n kind: Select\n options:\n options:\n - Active\n - Expired\n - Inactive\n Subtotal:\n label: 'Subtotal '\n kind: Number\n options:\n format: 0\n precision: \"2\"\n suffix: \xe2\x82\xac\n TotalPrice:\n label: Total Price\n kind: Number\n options:\n format: 0\n precision: \"2\"\n suffix: \xe2\x82\xac\n UnitPrice:\n label: Sales Price\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n Settings:\n name: Settings\n fields:\n CaseNextNumber:\n label: Next number for a case (updates after saving a new case)\n kind: Number\n options:\n format: \"0000000\"\n precision: 0\n ContractDefaultTime:\n label: Default time for a contract (in months)\n kind: Number\n options:\n format: 0\n precision: 0\n ContractNextNumber:\n label: Next number for a contract (updates after saving a new contract)\n kind: Number\n options:\n format: \"0000000\"\n precision: 0\n OpportunityCloseDateDays:\n label: Days for an opportunity to close\n kind: Number\n options:\n format: 0\n precision: 0\n OpportunityForecaseCategory:\n label: Forecast Category\n kind: String\n OpportunityProbability:\n label: Probability\n kind: Number\n options:\n format: 0\n precision: 0\n suffix: '%'\n OpportunityStagename:\n label: Stage\n kind: String\n QuoteExpirationDays:\n label: Days for a quote to expire\n kind: Number\n options:\n format: 0\n precision: 0\n QuoteNextNumber:\n label: Next number for a quote (updates after saving a new quote)\n kind: Number\n options:\n format: \"0000000\"\n precision: 0\n SolutionNextNumber:\n label: Next number for a solution (updates after saving a new solution)\n kind: Number\n options:\n format: \"0000000\"\n precision: 0\n EmailTemplate:\n name: EmailTemplate\n fields:\n Body:\n label: Body\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n DeveloperName:\n label: Template Unique Name\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n IsActive:\n label: Available For Use\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LastUsedDate:\n label: Last Used Date\n kind: DateTime\n Markup:\n label: Markup\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n Name:\n label: Email Template Name\n kind: String\n Subject:\n label: Subject\n kind: String\n TemplateStyle:\n label: Style\n kind: Select\n options:\n options:\n - \"\"\n TemplateType:\n label: Template Type\n kind: Select\n options:\n options:\n - \"\"\n Entitlement:\n name: Entitlement\n fields:\n AccountId:\n label: Account Name\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n CasesPerEntitlement:\n label: Cases Per Entitlement\n kind: Number\n options:\n format: 0\n precision: 0\n ContractLineItemId:\n label: Contract Line Item\n kind: Record\n options:\n labelField: ContractId\n module: ContractLineItem\n queryFields:\n - Description\n - LineItemNumber\n - ContractId\n EndDate:\n label: End Date\n kind: DateTime\n EntitlementProcess:\n label: Entitlement Process\n kind: String\n IsPerIncident:\n label: Per Incident\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LastModifiedById:\n label: Last Modified By\n kind: User\n options:\n presetWithAuthenticated: false\n LastModifiedDate:\n label: Last Modified Date\n kind: DateTime\n LastViewedDate:\n label: Last Viewed Date\n kind: DateTime\n Name:\n label: Entitlement Name\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n RemainingCases:\n label: Remaining Cases\n kind: Number\n options:\n format: 0\n precision: 0\n StartDate:\n label: Start Date\n kind: DateTime\n Status:\n label: Status\n kind: Select\n options:\n options:\n - Active\n - Expired\n - Inactive\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Web Support\n - Phone Support\n - Email Support\n - Dedicated Support\n EntitlementContact:\n name: EntitlementContact\n fields:\n CaseMilestoneTypeId:\n label: Casemilestone Type\n kind: Record\n options:\n labelField: Name\n module: MilestoneType\n queryFields:\n - Name\n ContactId:\n label: Contact Name\n kind: Record\n options:\n labelField: Email\n module: Contact\n queryFields:\n - AccountId\n - Email\n - FirstName\n - LastName\n EntitlementId:\n label: Entitlement Name\n kind: Record\n options:\n labelField: Name\n module: Entitlement\n queryFields:\n - AccountId\n - Name\n Name:\n label: Entitlement Contact\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n EntitlementTemplate:\n name: EntitlementTemplate\n fields:\n BusinessHours:\n label: Business Hours\n kind: String\n CasesPerEntitlement:\n label: Cases Per Entitlement\n kind: Number\n options:\n format: 0\n precision: 0\n IsPerIncident:\n label: Per Incident\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Name:\n label: Entitlement Template Name\n kind: String\n Term:\n label: Term (Days)\n kind: Number\n options:\n format: 0\n precision: 0\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Email\n - Messaging\n - Phone\n - Web\n Event:\n name: Event\n fields:\n AccountId:\n label: Account\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n ActivityDate:\n label: Start\n kind: DateTime\n CaseId:\n label: Case\n kind: Record\n options:\n labelField: Subject\n module: Case\n queryFields:\n - AccountId\n - CaseNumber\n - Subject\n ContactId:\n label: Contact\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n ContractId:\n label: Contract\n kind: Record\n options:\n labelField: Name\n module: Contract\n queryFields:\n - AccountId\n - Name\n - ContractNumber\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n DurationInMinutes:\n label: Duration\n kind: Number\n options:\n format: 0\n precision: 0\n EndDateTime:\n label: End\n kind: DateTime\n IsAllDayEvent:\n label: All-Day Event\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsArchived:\n label: Archived\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsPrivate:\n label: Private\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsReminderSet:\n label: Reminder Set\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LeadId:\n label: Lead\n kind: Record\n options:\n labelField: RecordLabel\n module: Lead\n queryFields:\n - RecordLabel\n Location:\n label: Location\n kind: String\n OpportunityId:\n label: Opportunity\n kind: Record\n options:\n labelField: RecordLabel\n module: Opportunity\n queryFields:\n - AccountId\n - Name\n OwnerId:\n label: Assigned To\n kind: User\n options:\n presetWithAuthenticated: false\n QuoteId:\n label: Quote\n kind: Record\n options:\n labelField: Name\n module: Quote\n queryFields:\n - AccountId\n - Name\n - QuoteNumber\n ReminderDateTime:\n label: Reminder Date/Time\n kind: DateTime\n Subject:\n label: Subject\n kind: String\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Call\n - Email\n - Meeting\n - Send Letter / Quote\n - Other\n Idea:\n name: Idea\n fields:\n Body:\n label: Idea Body\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n Categories:\n label: Categories\n kind: Select\n options:\n options:\n - Ecosystem\n - Human Resources\n - Marketing\n - Product\n - Sales\n - Services\n - Support\n CreatorName:\n label: Name of Creator\n kind: String\n ParentIdeaId:\n label: Parent Idea\n kind: Record\n options:\n labelField: Title\n module: Idea\n queryFields:\n - Title\n Status:\n label: Status\n kind: Select\n options:\n options:\n - New\n - Under Consideration\n - Accepted\n - Implemented\n - Duplicate\n Title:\n label: Title\n kind: String\n VoteScore:\n label: Vote Score\n kind: Number\n options:\n format: 0\n precision: 0\n VoteTotal:\n label: Vote Total\n kind: Number\n options:\n format: 0\n precision: 0\n Lead:\n name: Lead\n fields:\n AnnualRevenue:\n label: Annual Revenue\n kind: Select\n options:\n options:\n - Less Than 500,000\n - 500,000 To 1 Million\n - 1 To 2.5 Million\n - 2.5 To 5 Million\n - 5 To 10 Million\n - 10 To 20 Million\n - 20 To 50 Million\n - 50 To 100 Million\n - 100 To 500 Million\n selectType: default\n City:\n label: Address City\n kind: String\n private: true\n Company:\n label: Company\n kind: String\n required: true\n ConvertedAccountId:\n label: Converted Account\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n selectType: default\n ConvertedContactId:\n label: Converted Contact\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n selectType: default\n ConvertedDate:\n label: Converted Date\n kind: DateTime\n ConvertedOpportunityId:\n label: Converted Opportunity\n kind: Record\n options:\n labelField: Name\n module: Opportunity\n queryFields:\n - AccountId\n - Name\n selectType: default\n Country:\n label: Address Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n selectType: default\n private: true\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n DoNotCall:\n label: Do Not Call\n kind: Bool\n options:\n falseLabel: \"False\"\n trueLabel: Do Not Call\n Email:\n label: Email\n kind: String\n private: true\n Facebook:\n label: Facebook\n kind: Url\n private: true\n Fax:\n label: Fax\n kind: String\n private: true\n FirstName:\n label: First Name\n kind: String\n private: true\n HasOptedOutOfEmail:\n label: Email Opt Out\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n HasOptedOutOfFax:\n label: Fax Opt Out\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Industry:\n label: Industry\n kind: Select\n options:\n options:\n - \"\"\n - Agriculture\n - Apparel\n - Banking\n - Biotechnology\n - Chemicals\n - Communications\n - Construction\n - Consulting\n - Education\n - Electronics\n - Energy\n - Engineering\n - Entertainment\n - Environmental\n - Finance\n - Food & Beverage\n - Government\n - Healthcare\n - Hospitality\n - Insurance\n - Machinery\n - Manufacturing\n - Media\n - Not For Profit\n - Other\n - Recreation\n - Retail\n - Shipping\n - Technology\n - Telecommunications\n - Transportation\n - Utilities\n selectType: default\n IsConverted:\n label: Converted\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsDeleted:\n label: Deleted\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsUnreadByOwner:\n label: Unread By Owner\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LastName:\n label: Last Name\n kind: String\n private: true\n required: true\n LastTransferDate:\n label: Last Transfer Date\n kind: DateTime\n LastViewedDate:\n label: Last Viewed Date\n kind: DateTime\n LeadSource:\n label: Lead Source\n kind: Select\n options:\n options:\n - Customer Referral\n - Direct\n - Employee Referral\n - Event\n - Existing Customer\n - Inbound Call\n - Outbound List\n - Partner Referral\n - Seminar\n - Social Media\n - Webinar\n - Website (Organic)\n - Website (PPC)\n - Word of Mouth\n - Other\n selectType: default\n LinkedIn:\n label: LinkedIn\n kind: Url\n private: true\n MasterRecordId:\n label: Lead\n kind: Record\n options:\n labelField: Email\n module: Lead\n queryFields: []\n selectType: default\n MobilePhone:\n label: Mobile\n kind: String\n NumberOfEmployees:\n label: No. of Employees (exact)\n kind: Number\n options:\n format: 0\n precision: 0\n NumberOfEmployeesRange:\n label: No. of Employees (range)\n kind: Select\n options:\n options:\n - 1 - 9\n - 10 - 24\n - 25 - 49\n - 50 - 99\n - 100 - 249\n - 250 - 499\n - 500 - 999\n - 1000 - 2499\n - 2500 - 4999\n - 5000 - 9999\n - Over 10000\n selectType: default\n OwnerId:\n label: Lead Owner\n kind: User\n options:\n presetWithAuthenticated: false\n selectType: default\n Phone:\n label: Phone\n kind: String\n private: true\n PostalCode:\n label: Address Postal Code\n kind: String\n private: true\n Rating:\n label: Rating\n kind: Select\n options:\n options:\n - \xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x85\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x86\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\n selectType: default\n RecordLabel:\n label: Record Label\n kind: String\n private: true\n SICCode:\n label: SIC Code\n kind: Number\n options:\n format: 0\n precision: 0\n Salutation:\n label: Salutation\n kind: String\n State:\n label: Address State\n kind: String\n private: true\n Status:\n label: Lead Status\n kind: Select\n options:\n options:\n - New\n - Assigned\n - In Progress\n - Converted\n - Recycled\n - Dead\n selectType: default\n Street:\n label: Address Street\n kind: String\n private: true\n Title:\n label: Title\n kind: String\n Twitter:\n label: Twitter\n kind: Url\n private: true\n Website:\n label: Website\n kind: Url\n MilestoneType:\n name: MilestoneType\n fields:\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n Name:\n label: Name\n kind: String\n RecurrenceType:\n label: Recurrence Type\n kind: Select\n options:\n options:\n - No Recurrence\n - Independent\n - Sequential\n Note:\n name: Note\n fields:\n AccountContactRoleId:\n label: Account Contact Role\n kind: Record\n options:\n labelField: Role\n module: AccountContactRole\n queryFields:\n - AccountId\n - ContactId\n - Role\n AccountId:\n label: Account\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n Body:\n label: Body\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n CampaignId:\n label: Campaign\n kind: Record\n options:\n labelField: Name\n module: Campaigns\n queryFields:\n - Name\n CampaignMemberId:\n label: Campaign Member\n kind: Record\n options:\n labelField: CampaignId\n module: CampaignMember\n queryFields:\n - CampaignId\n - ContactId\n - LeadId\n CaseContactRoleId:\n label: Case Contact Role\n kind: Record\n options:\n labelField: Role\n module: CaseContactRole\n queryFields:\n - CaseId\n - Role\n CaseId:\n label: Case\n kind: Record\n options:\n labelField: Subject\n module: Case\n queryFields:\n - AccountId\n - CaseNumber\n - Subject\n CaseMilestoneId:\n label: Case Milestone\n kind: Record\n options:\n labelField: CaseId\n module: CaseMilestone\n queryFields:\n - CaseId\n - MilestoneTypeId\n ContactId:\n label: Contact\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n ContractContactRoleId:\n label: Contract Contact Role\n kind: Record\n options:\n labelField: ContactId\n module: ContractContactRole\n queryFields:\n - ContactId\n - ContractId\n ContractId:\n label: Contract\n kind: Record\n options:\n labelField: Name\n module: Contract\n queryFields:\n - AccountId\n - Name\n - ContractNumber\n ContractLineItemId:\n label: Contract Line Item\n kind: Record\n options:\n labelField: PricebookEntryId\n module: ContractLineItem\n queryFields:\n - PricebookEntryId\n EmailTemplateId:\n label: Email Template\n kind: Record\n options:\n labelField: Subject\n module: EmailTemplate\n queryFields:\n - Subject\n EntitlementContactId:\n label: Entitlement Contact\n kind: Record\n options:\n labelField: EntitlementId\n module: EntitlementContact\n queryFields:\n - EntitlementId\n EntitlementId:\n label: Entitlement\n kind: Record\n options:\n labelField: Name\n module: Entitlement\n queryFields:\n - Name\n EntitlementTemplateId:\n label: Entitlement Template\n kind: Record\n options:\n labelField: Name\n module: EntitlementTemplate\n queryFields:\n - Name\n EventId:\n label: Event\n kind: Record\n options:\n labelField: Subject\n module: Event\n queryFields:\n - Subject\n FileAdd1:\n label: File 1\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: grid\n FileAdd2:\n label: File 2\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: grid\n FileAdd3:\n label: File 3\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: grid\n FileAdd4:\n label: File 4\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: grid\n IsPrivate:\n label: Private\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LeadId:\n label: Lead\n kind: Record\n options:\n labelField: RecordLabel\n module: Lead\n queryFields:\n - RecordLabel\n OpportunityCompetitorId:\n label: Opportunity Competitor\n kind: Record\n options:\n labelField: CompetitorName\n module: OpportunityCompetitor\n queryFields:\n - CompetitorName\n OpportunityContactRoleId:\n label: Opportunity Contact Role\n kind: Record\n options:\n labelField: ContactId\n module: OpportunityContactRole\n queryFields:\n - ContactId\n - Role\n OpportunityId:\n label: Opportunity\n kind: Record\n options:\n labelField: Name\n module: Opportunity\n queryFields:\n - AccountId\n - Name\n OpportunityLineItemId:\n label: Opportunity Line Item\n kind: Record\n options:\n labelField: ProductId\n module: OpportunityLineItem\n queryFields:\n - Description\n - Name\n - ProductId\n PricebookEntryId:\n label: Pricebook Entry\n kind: Record\n options:\n labelField: Name\n module: PricebookEntry\n queryFields:\n - ProductCode\n - Name\n PricebookId:\n label: Pricebook\n kind: Record\n options:\n labelField: Name\n module: Pricebook\n queryFields:\n - Name\n ProductId:\n label: Product\n kind: Record\n options:\n labelField: Name\n module: Product\n queryFields:\n - ProductCode\n - Name\n QuoteId:\n label: Quote\n kind: Record\n options:\n labelField: Name\n module: Quote\n queryFields:\n - AccountId\n - Name\n - QuoteNumber\n TaskId:\n label: Task\n kind: Record\n options:\n labelField: Subject\n module: Task\n queryFields:\n - Subject\n Title:\n label: Title\n kind: String\n Opportunity:\n name: Opportunity\n fields:\n AccountId:\n label: Account Name\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n selectType: default\n Amount:\n label: Amount\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n Authority:\n label: Authority\n kind: String\n options:\n multiLine: true\n Budget:\n label: Budget\n kind: String\n options:\n multiLine: true\n CampaignId:\n label: Primary Campaign Source\n kind: Record\n options:\n labelField: Name\n module: Campaigns\n queryFields:\n - Name\n selectType: default\n CloseDate:\n label: Close Date\n kind: DateTime\n Competition:\n label: Competition\n kind: String\n options:\n multiLine: true\n ContractId:\n label: Contract\n kind: Record\n options:\n labelField: Name\n module: Contract\n queryFields:\n - AccountId\n - Name\n - ContractNumber\n selectType: default\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n ExpectedRevenue:\n label: Expected Revenue\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n FiscalQuarter:\n label: Fiscal Period\n kind: Number\n options:\n format: 0\n precision: 0\n FiscalYear:\n label: Fiscal Period\n kind: Number\n options:\n format: 0\n precision: 0\n ForecastCategory:\n label: Forecast Category\n kind: Select\n options:\n options:\n - Pipeline\n - Best Case\n - Commit\n selectType: default\n HasOpportunityLineItem:\n label: Has Line Item\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsClosed:\n label: Closed\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsPrivate:\n label: Private\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsWon:\n label: Won\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LeadSource:\n label: Lead Source\n kind: Select\n options:\n options:\n - Customer Referral\n - Direct\n - Employee Referral\n - Event\n - Existing Customer\n - Inbound Call\n - Outbound List\n - Partner Referral\n - Seminar\n - Social Media\n - Webinar\n - Website (Organic)\n - Website (PPC)\n - Word of Mouth\n - Other\n selectType: default\n Name:\n label: Opportunity Name\n kind: String\n Need:\n label: Need\n kind: String\n options:\n multiLine: true\n NextStep:\n label: Next Step\n kind: String\n OwnerId:\n label: Opportunity Owner\n kind: User\n options:\n presetWithAuthenticated: false\n selectType: default\n PricebookId:\n label: Price Book\n kind: Record\n options:\n labelField: Name\n module: Pricebook\n queryFields:\n - Name\n selectType: default\n Probability:\n label: Probability (%)\n kind: Number\n options:\n format: 0\n precision: 0\n suffix: '%'\n RecordLabel:\n label: Record Label\n kind: String\n StageName:\n label: Stage\n kind: Select\n options:\n options:\n - Qualification\n - Need Analysis\n - Proposal\n - Negotiation\n - Closed Won\n - Closed Lost\n selectType: default\n Timeline:\n label: Timeline\n kind: String\n options:\n multiLine: true\n TotalOpportunityQuantity:\n label: Quantity\n kind: Number\n options:\n format: 0\n precision: 0\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Exisiting Business\n - New Business\n selectType: default\n OpportunityCompetitor:\n name: OpportunityCompetitor\n fields:\n CompetitorName:\n label: Competitor Name\n kind: String\n OpportunityId:\n label: Opportunity\n kind: Record\n options:\n labelField: Name\n module: Opportunity\n queryFields:\n - AccountId\n - Name\n Strengths:\n label: Strengths\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n Weaknesses:\n label: Weaknesses\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n OpportunityContactRole:\n name: OpportunityContactRole\n fields:\n ContactId:\n label: Contact\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n IsPrimary:\n label: Primary\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n OpportunityId:\n label: Opportunity\n kind: Record\n options:\n labelField: Name\n module: Opportunity\n queryFields: []\n Role:\n label: Role\n kind: Select\n options:\n options:\n - Business User\n - Decision Maker\n - Economic Buyer\n - Economic Decision Maker\n - Evaluator\n - Executive Sponsor\n - Gatekeeper\n - Influencer\n - Project Manager\n - Technical Buyer\n - Other\n OpportunityLineItem:\n name: OpportunityLineItem\n fields:\n Description:\n label: Line Description\n kind: String\n Discount:\n label: Discount\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n ListPrice:\n label: List Price\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n Name:\n label: Opportunity Product Name\n kind: String\n OpportunityId:\n label: Opportunity\n kind: Record\n options:\n labelField: Name\n module: Opportunity\n queryFields:\n - AccountId\n - Name\n PricebookEntryId:\n label: Price Book Entry\n kind: Record\n options:\n labelField: Name\n module: PricebookEntry\n queryFields:\n - ProductCode\n - Name\n ProductCode:\n label: Product Code\n kind: String\n ProductId:\n label: Product\n kind: Record\n options:\n labelField: Name\n module: Product\n queryFields: []\n Quantity:\n label: Quantity\n kind: Number\n options:\n format: 0\n precision: 0\n ServiceDate:\n label: Date\n kind: DateTime\n SortOrder:\n label: Sort Order\n kind: Number\n options:\n format: 0\n precision: 0\n Subtotal:\n label: Subtotal\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n TotalPrice:\n label: Total Price\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n UnitPrice:\n label: Sales Price\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n Pricebook:\n name: Pricebook\n fields:\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n IsActive:\n label: Active\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsStandard:\n label: Is Standard Price Book\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Name:\n label: Price Book Name\n kind: String\n PricebookEntry:\n name: PricebookEntry\n fields:\n IsActive:\n label: Active\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Name:\n label: Product Name\n kind: String\n PricebookId:\n label: Price Book\n kind: Record\n options:\n labelField: Name\n module: Pricebook\n queryFields:\n - Name\n ProductCode:\n label: Product Code\n kind: String\n ProductId:\n label: Product\n kind: Record\n options:\n labelField: Name\n module: Product\n queryFields:\n - ProductCode\n - Name\n UnitPrice:\n label: List Price\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n UseStandardPrice:\n label: Use Standard Price\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Product:\n name: Product\n fields:\n Description:\n label: Product Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n Family:\n label: Product Family\n kind: Select\n options:\n options:\n - Crust Core\n - Crust Add-On\n IsActive:\n label: Active\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Name:\n label: Product Name\n kind: String\n ProductCode:\n label: Product Code\n kind: String\n Question:\n name: Question\n fields:\n BestReplyId:\n label: Best Reply\n kind: Record\n options:\n labelField: Name\n module: Reply\n queryFields:\n - Name\n Body:\n label: Question Body\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n NumReplies:\n label: Number of Replies\n kind: Number\n options:\n format: 0\n precision: 0\n Title:\n label: Question Title\n kind: String\n UpVotes:\n label: Up Votes\n kind: Number\n options:\n format: 0\n precision: 0\n VoteScore:\n label: Vote Score\n kind: Number\n options:\n format: 0\n precision: 0\n Quote:\n name: Quote\n fields:\n AccountId:\n label: Account Name\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n AdditionalCity:\n label: Additional To City\n kind: String\n AdditionalCountry:\n label: Additional To Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n AdditionalName:\n label: Additional To Name\n kind: String\n AdditionalPostalCode:\n label: Additional To Postal Code\n kind: String\n AdditionalState:\n label: Additional To State\n kind: String\n AdditionalStreet:\n label: Additional To Street\n kind: String\n BillingCity:\n label: Bill To City\n kind: String\n BillingCountry:\n label: Bill To Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n BillingName:\n label: Bill To Name\n kind: String\n BillingPostalCode:\n label: Bill To Postal Code\n kind: String\n BillingState:\n label: Bill To State\n kind: String\n BillingStreet:\n label: Bill To Street\n kind: String\n ContactId:\n label: Contact Name\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n Discount:\n label: Additional Discount\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n Email:\n label: Email\n kind: Email\n ExpirationDate:\n label: Expiration Date\n kind: DateTime\n Fax:\n label: Fax\n kind: String\n GrandTotal:\n label: Grand Total (calculated)\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n LineItemCount:\n label: Line Items\n kind: Number\n options:\n format: 0\n precision: 0\n Name:\n label: Quote Name\n kind: String\n OpportunityId:\n label: Opportunity Name\n kind: Record\n options:\n labelField: Name\n module: Opportunity\n queryFields:\n - AccountId\n - Name\n Phone:\n label: Phone\n kind: String\n PricebookId:\n label: Pricebook\n kind: Record\n options:\n labelField: Name\n module: Pricebook\n queryFields:\n - Name\n QuoteNumber:\n label: Quote Number\n kind: Number\n options:\n format: \"0000000\"\n precision: 0\n QuoteToCity:\n label: Quote To City\n kind: String\n QuoteToCountry:\n label: Quote To Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n QuoteToName:\n label: Quote To Name\n kind: String\n QuoteToPostalCode:\n label: Quote To Postal Code\n kind: String\n QuoteToState:\n label: Quote To State\n kind: String\n QuoteToStreet:\n label: Quote To Street\n kind: String\n RecordLabel:\n label: Record Label\n kind: String\n ShippingCity:\n label: Ship To City\n kind: String\n ShippingCountry:\n label: Ship To Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n ShippingHandling:\n label: Shipping and Handling\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n ShippingName:\n label: Ship To Name\n kind: String\n ShippingPostalCode:\n label: Ship To Postal Code\n kind: String\n ShippingState:\n label: Ship To State\n kind: String\n ShippingStreet:\n label: Ship To Street\n kind: String\n Status:\n label: Status\n kind: Select\n options:\n options:\n - Draft\n - Needs Review\n - In Review\n - Approved\n - Rejected\n - Presented\n - Accepted\n - Denied\n Subtotal:\n label: Subtotal (calculated)\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n Tax:\n label: Tax\n kind: Number\n options:\n format: 0\n precision: 0\n suffix: '%'\n TotalPrice:\n label: Total Price (calculated)\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n QuoteLineItem:\n name: QuoteLineItem\n fields:\n Description:\n label: Line Description\n kind: String\n Discount:\n label: Discount\n kind: Number\n options:\n format: 0\n precision: \"2\"\n suffix: \xe2\x82\xac\n LineItemDescription:\n label: Line Item Description\n kind: String\n options:\n multiLine: true\n LineItemNumber:\n label: Line Item Number\n kind: String\n ListPrice:\n label: List Price\n kind: Number\n options:\n format: 0\n precision: \"2\"\n suffix: \xe2\x82\xac\n PricebookEntryId:\n label: Price Book Entry\n kind: Record\n options:\n labelField: Name\n module: PricebookEntry\n queryFields:\n - ProductCode\n - Name\n ProductCode:\n label: Product Code\n kind: String\n ProductId:\n label: Product\n kind: Record\n options:\n labelField: Name\n module: Product\n queryFields:\n - ProductCode\n - Name\n Quantity:\n label: Quantity\n kind: Number\n options:\n format: 0\n precision: 0\n QuoteId:\n label: Quote\n kind: Record\n options:\n labelField: Name\n module: Quote\n queryFields:\n - AccountId\n - Name\n - QuoteNumber\n ServiceDate:\n label: Date\n kind: DateTime\n SortOrder:\n label: Sort Order\n kind: Number\n options:\n format: 0\n precision: 0\n Subtotal:\n label: Subtotal\n kind: Number\n options:\n format: 0\n precision: \"2\"\n suffix: \xe2\x82\xac\n TotalPrice:\n label: Total Price\n kind: Number\n options:\n format: 0\n precision: \"2\"\n suffix: \xe2\x82\xac\n UnitPrice:\n label: Sales Price\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n Reply:\n name: Reply\n fields:\n Body:\n label: Reply Body\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n DownVotes:\n label: Down Votes\n kind: Number\n options:\n format: 0\n precision: 0\n IdeaId:\n label: Idea\n kind: Record\n options:\n labelField: Title\n module: Idea\n queryFields:\n - Title\n Name:\n label: Name\n kind: String\n QuestionId:\n label: Question\n kind: Record\n options:\n labelField: Title\n module: Question\n queryFields:\n - Title\n UpVotes:\n label: Up Votes\n kind: Number\n options:\n format: 0\n precision: 0\n VoteTotal:\n label: Vote Total\n kind: Number\n options:\n format: 0\n precision: 0\n Solution:\n name: Solution\n fields:\n CaseId:\n label: Case\n kind: Record\n options:\n labelField: Subject\n module: Case\n queryFields:\n - AccountId\n - CaseNumber\n - Subject\n File:\n label: File\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: list\n IsPublished:\n label: Public\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsReviewed:\n label: Reviewed\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n ProductId:\n label: Product\n kind: Record\n options:\n labelField: Name\n module: Product\n queryFields:\n - ProductCode\n - Name\n SolutionName:\n label: Solution Title\n kind: String\n SolutionNote:\n label: Solution Details\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n SolutionNumber:\n label: Solution Number\n kind: Number\n options:\n format: \"0000000\"\n precision: 0\n Status:\n label: Status\n kind: Select\n options:\n options:\n - New\n - Pending review\n - Accepted\n - Obsolete\n - Duplicate\n Task:\n name: Task\n fields:\n AccountId:\n label: Account\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n selectType: default\n ActivityDate:\n label: Due Date\n kind: DateTime\n CallDisposition:\n label: Call Result\n kind: String\n CallDurationInSeconds:\n label: Call Duration\n kind: Number\n options:\n format: 0\n precision: 0\n CallObject:\n label: Call Object Identifier\n kind: String\n CallType:\n label: Call Type\n kind: Select\n options:\n options:\n - Internal\n - Inbound\n - Outbound\n selectType: default\n CaseId:\n label: Case\n kind: Record\n options:\n labelField: Subject\n module: Case\n queryFields:\n - AccountId\n - CaseNumber\n - Subject\n selectType: default\n ContactId:\n label: Contact\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n selectType: default\n ContractId:\n label: Contract\n kind: Record\n options:\n labelField: Name\n module: Contract\n queryFields:\n - AccountId\n - Name\n - ContractNumber\n selectType: default\n Description:\n label: Comments\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n IsClosed:\n label: Closed\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsReminderSet:\n label: Reminder Set\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LeadId:\n label: Lead\n kind: Record\n options:\n labelField: RecordLabel\n module: Lead\n queryFields:\n - RecordLabel\n selectType: default\n OpportunityId:\n label: Opportunity\n kind: Record\n options:\n labelField: Name\n module: Opportunity\n queryFields:\n - AccountId\n - Name\n selectType: default\n OwnerId:\n label: Assigned To\n kind: User\n options:\n presetWithAuthenticated: false\n selectType: default\n Priority:\n label: Priority\n kind: Select\n options:\n options:\n - High\n - Normal\n - Low\n selectType: default\n QuoteId:\n label: Quote\n kind: Record\n options:\n labelField: Name\n module: Quote\n queryFields:\n - AccountId\n - Name\n - QuoteNumber\n selectType: default\n ReminderDateTime:\n label: Reminder Date/Time\n kind: DateTime\n Status:\n label: Status\n kind: Select\n options:\n options:\n - Open\n - Completed\n selectType: default\n Subject:\n label: Subject\n kind: String\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Call\n - Email\n - Send letter\n - Send Quote\n - Send Message\n - Other\n selectType: default\n Vote:\n name: Vote\n fields:\n IdeaId:\n label: Idea\n kind: Record\n options:\n labelField: Title\n module: Idea\n queryFields:\n - Title\n QuestionId:\n label: Question\n kind: Record\n options:\n labelField: Title\n module: Question\n queryFields:\n - Title\n ReplyId:\n label: Reply\n kind: Record\n options:\n labelField: Name\n module: Reply\n queryFields:\n - Name\n Score:\n label: Score\n kind: Number\n options:\n format: 0\n precision: 0\nPK\x07\x08r<\x06\xf9\xc9-\x02\x00\xc9-\x02\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00 \x001200_charts.yamlUT\x05\x00\x01\x80Cm8namespace: crm\ncharts:\n LeadsByCountry:\n name: Leads by country\n config:\n reports:\n - metrics:\n - backgroundColor: '#e5a83b'\n beginAtZero: true\n field: count\n fixTooltips: true\n label: Number of leads\n type: bar\n dimensions:\n - conditions: {}\n field: Country\n modifier: (no grouping / buckets)\n module: Lead\n LeadsBySource:\n name: Leads by source\n config:\n reports:\n - metrics:\n - backgroundColor: '#36d436'\n beginAtZero: true\n field: count\n label: Number of leads\n type: bar\n dimensions:\n - conditions: {}\n field: LeadSource\n modifier: (no grouping / buckets)\n module: Lead\n LeadsByType:\n name: Leads by type\n config:\n reports:\n - metrics:\n - backgroundColor: '#63da1a'\n beginAtZero: true\n field: count\n label: Number of leads\n type: bar\n dimensions:\n - conditions: {}\n field: Status\n modifier: (no grouping / buckets)\n module: Lead\n LeadsPerDay:\n name: Leads per day\n config:\n reports:\n - metrics:\n - aggregate: SUM\n axisType: linear\n backgroundColor: '#fc7507'\n beginAtZero: true\n field: count\n fill: false\n label: Leads per day\n type: line\n dimensions:\n - conditions: {}\n field: created_at\n modifier: DATE\n module: Lead\n OpportunitiesByValue:\n name: Opportunities by value\n config:\n reports:\n - metrics:\n - aggregate: SUM\n backgroundColor: '#5977ff'\n beginAtZero: true\n field: Amount\n label: Total value\n type: bar\n dimensions:\n - conditions: {}\n field: StageName\n modifier: (no grouping / buckets)\n module: Opportunity\n QuarterlyPerformance:\n name: Quarterly performance\n config:\n reports:\n - filter: Amount > 0\n metrics:\n - aggregate: SUM\n axisPosition: left\n axisType: linear\n backgroundColor: '#009eff'\n beginAtZero: true\n field: Amount\n fill: true\n label: Amount\n type: line\n dimensions:\n - autoSkip: true\n conditions: {}\n field: CloseDate\n modifier: QUARTER\n module: Opportunity\nPK\x07\x08\x18\x18\xf1\xc2\xb0 \x00\x00\xb0 \x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00 \x001300_scripts.yamlUT\x05\x00\x01\x80Cm8namespace: crm\nscripts:\n AccountCreateNewOpportunity:\n source: |-\n //Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n let opportunityCloseDays = settings.values.OpportunityCloseDateDays\n let opportunityProbability = settings.values.OpportunityProbability\n let opportunityForecaseCategory = settings.values.OpportunityForecaseCategory\n let opportunityStagename = settings.values.OpportunityStagename\n\n //Calculate the expiration date\n let m = new Date()\n m.setDate(m.getDate() + parseInt(opportunityCloseDays, 10))\n let closeDate = m.getUTCFullYear() + \"/\" + (m.getUTCMonth() + 1) + \"/\" + m.getUTCDate() + \" \" + m.getUTCHours() + \":\" + m.getUTCMinutes() + \":\" + m.getUTCSeconds()\n\n // Find the contact we want to link the new case to (by default, the primary contact)\n return Compose.findRecords(`AccountId = ${$record.recordID}`, 'Contact')\n\n .then(({ set, filter }) => {\n\n let ContactId, SuppliedName, SuppliedEmail, SuppliedPhone\n\n // Loop through the contacts of the account, to save the primary contact\n set.forEach(r => {\n\n //Check if it's the primary contact\n let contactIsPrimary = r.values.IsPrimary\n if (contactIsPrimary === '1') {\n\n //Add the contact\n ContactId = r.recordID\n }\n })\n\n // Create the related opportunity\n return Compose.makeRecord({\n 'OwnerId': $record.values.OwnerId,\n 'LeadSource': $record.values.LeadSource,\n 'Name': '(unnamed)',\n 'AccountId': $record.recordID,\n 'IsClosed': 'No',\n 'IsWon': 'No',\n 'CloseDate': closeDate,\n 'Probability': opportunityProbability,\n 'ForecastCategory': opportunityForecaseCategory,\n 'StageName': opportunityStagename\n }, 'Opportunity')\n\n .then(myOpportunity => {\n\n return Compose.saveRecord(myOpportunity)\n\n }).then(mySavedOpportunity => {\n\n //Create a new contact linked to the opportunity\n return Compose.makeRecord({\n 'ContactId': ContactId,\n 'OpportunityId': mySavedOpportunity.recordID,\n 'IsPrimary': '1'\n }, 'OpportunityContactRole')\n\n .then(myOpportunityContactRole => {\n\n return Compose.saveRecord(myOpportunityContactRole)\n\n .then(() => {\n\n // Notify current user\n ComposeUI.success(`The new opportunity has been created.`)\n\n\n }).then(() => {\n\n // Go to the record\n ComposeUI.gotoRecordEditor(mySavedOpportunity)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Account\n resource: compose:record\n CaseInsertCaseNumber:\n source: |-\n //Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n // Map the case number\n let nextCaseNumber = settings.values.CaseNextNumber\n if (typeof nextCaseNumber == \"undefined\" || nextCaseNumber === '' || isNaN(nextCaseNumber)) {\n nextCaseNumber = 0\n }\n\n $record.values.CaseNumber = nextCaseNumber\n let nextCaseNumberUpdated = parseInt(nextCaseNumber,10) + 1\n\n // Update the config\n settings.values.CaseNextNumber = nextCaseNumberUpdated\n return Compose.saveRecord(settings).then(mySavedSettings => {\n\n console.log('Record saved, new ID', mySavedSettings.recordID)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: false\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: beforeCreate\n module: Case\n resource: compose:record\n CaseInformContactOfSolution:\n source: |-\n // Check if the case is solved\n if (!$record.values.Status === 'Closed') {\n\n // Get the to address\n let to = $record.values.SuppliedEmail\n if (!to) {\n ComposeUI.warning(`There is no supplied email. Please fill in an email address in the supplied email field.`)\n return\n }\n\n // Get email body\n let html = \"

Solution of case: \" + $record.values.CaseNumber + \" - \" + $record.values.Subject + \"

\"\n html = html + \"
\"\n html = html + \"Solution Title: \" + $record.values.SolutionName + \"
\"\n html = html + \"Solution Details: \" + $record.values.SolutionNote\n\n // Send the email\n return Compose.sendMail(to, `Corteza - Quote: ${$record.values.QuoteNumber} - ${$record.values.Name}`, { html: html }).then(() => {\n ComposeUI.success(`The case solutoin has been sent via email.`)\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n } else {\n ComposeUI.warning(`You can only inform the client of a solution when the case status is \"Closed\".`)\n return\n }\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Case\n resource: compose:record\n ContactSetRecordLabel:\n source: |-\n // Set the record label string\n let recordLabel = ''\n\n // Get the first name\n let firstName = $record.values.FirstName\n if (!firstName) {\n firstName = ''\n }\n\n // Get the last name\n let lastName = $record.values.LastName\n if (!lastName) {\n lastName = ''\n }\n\n // Create the full name\n let fullName = ''\n if ((firstName !== '') && (lastName === '')) {\n recordLabel = firstName\n }\n\n if ((firstName === '') && (lastName !== '')) {\n recordLabel = lastName\n }\n\n if ((firstName !== '') && (lastName !== '')) {\n recordLabel = firstName + ' ' + lastName\n }\n\n // Get the company name from the account\n // Check if there is a related account, to map the fields of the account\n let accountId = $record.values.AccountId\n if (accountId) {\n return Compose.findRecordByID(accountId, 'Account').then(accountRecord => {\n\n // Add to the record label\n recordLabel = recordLabel + ' (' + accountRecord.values.AccountName + ')'\n $record.values.RecordLabel = recordLabel\n\n }).catch(err => {\n // solve the problem\n $record.values.RecordLabel = recordLabel\n\n console.error(err)\n })\n\n }\n async: false\n runInUA: false\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: beforeUpdate\n module: Contact\n resource: compose:record\n - event: beforeCreate\n module: Contact\n resource: compose:record\n LeadSetRecordLabel:\n source: |-\n // Set the record label string\n let recordLabel = ''\n\n // Get the first name\n let firstName = $record.values.FirstName\n if (!firstName) {\n fistName = ''\n }\n\n // Get the last name\n let lastName = $record.values.LastName\n if (!lastName) {\n lastName = ''\n }\n\n // Create the full name\n let fullName = ''\n if ((firstName !== '') && (lastName === '')) {\n recordLabel = firstName\n }\n\n if ((firstName === '') && (lastName !== '')) {\n recordLabel = lastName\n }\n\n if ((firstName !== '') && (lastName !== '')) {\n recordLabel = firstName + ' ' + lastName\n }\n\n // Get the company name\n let company = $record.values.Company\n if (!company) {\n company = ''\n }\n\n // Add the company name (if there is one)\n if (company !== '') {\n recordLabel = recordLabel + ' (' + company + ')'\n }\n\n // Set the label\n $record.values.RecordLabel = recordLabel\n async: false\n runInUA: false\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: beforeUpdate\n module: Lead\n resource: compose:record\n - event: beforeCreate\n module: Lead\n resource: compose:record\n QuoteApproveQuote:\n source: |-\n //Check if the quote has the correct status\n if ($record.values.Status !== 'In Review') {\n // Inform\n ComposeUI.warning(`A quote needs to have the status In Review in order to be approved.`)\n return true\n }\n\n //Change value\n $record.values.Status = 'Approved'\n\n return Compose.saveRecord($record)\n .then(mySavedRecord => {\n\n // Get the email of the owner\n return System.findUserByID($record.createdBy).then(user => {\n\n // Send the mail\n return Compose.sendMail(\n user.email,\n `Quote \"${$record.values.Name}\" has been approved`,\n { html: `The following quote has been approved:

${$record.values.Name}` }\n )\n }).then(() => {\n\n // Notify current user\n ComposeUI.success(`The quote has been approved and the quote owner has been notified via email.`)\n\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Quote\n resource: compose:record\n SolutionInsertSolutionNumber:\n source: |-\n //Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n // Map the case number\n let nextSolutionNumber = settings.values.SolutionNextNumber\n if (typeof nextSolutionNumber == \"undefined\" || nextSolutionNumber === '' || isNaN(nextSolutionNumber)) {\n nextSolutionNumber = 0\n }\n $record.values.SolutionNumber = nextSolutionNumber\n let nextSolutionNumberUpdated = parseInt(nextSolutionNumber,10) + 1\n\n // Update the config\n settings.values.SolutionNextNumber = nextSolutionNumberUpdated\n\n return Compose.saveRecord(settings).then(mySavedSettings => {\n console.log('Record saved, new ID', mySavedSettings.recordID)\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: false\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: beforeCreate\n module: Solution\n resource: compose:record\n AccountCreateNewContract:\n source: |-\n //Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n // Map the case number\n let ContractDefaultTime = settings.values.ContractDefaultTime\n\n // Get the contract number\n let nextContractNumber = settings.values.ContractNextNumber\n if (typeof nextContractNumber == \"undefined\" || nextContractNumber === '' || isNaN(nextContractNumber)) {\n nextContractNumber = 0\n }\n\n return Compose.makeRecord({\n 'OwnerId' : $record.values.OwnerId,\n 'AccountId' : $record.recordID,\n 'Status' : 'Draft',\n 'BillingStreet' : $record.values.BillingStreet,\n 'BillingCity' : $record.values.BillingCity,\n 'BillingState' : $record.values.BillingState,\n 'BillingPostalCode' : $record.values.BillingPostalCode,\n 'BillingCountry' : $record.values.BillingCountry,\n 'ShippingStreet' : $record.values.BillingStreet,\n 'ShippingCity' : $record.values.BillingCity,\n 'ShippingState' : $record.values.BillingState,\n 'ShippingPostalCode' : $record.values.BillingPostalCode,\n 'ShippingCountry' : $record.values.BillingCountry,\n 'ContractTerm' : ContractDefaultTime,\n 'ContractNumber' : nextContractNumber\n }, 'Contract').then(myContract => {\n\n // return was missing here. Set tjhe mySavedCase below\n return Compose.saveRecord(myContract)\n\n }).then(mySavedContract => {\n let nextContractNumberUpdated = parseInt(nextContractNumber,10) + 1\n\n // Update the config\n settings.values.ContractNextNumber = nextContractNumberUpdated\n return Compose.saveRecord(settings).then(mySavedSettings => {\n\n console.log('Record saved, new ID', mySavedSettings.recordID)\n\n }).then(() => {\n\n // Notify current user\n ComposeUI.success(`The new contract record has been created.`)\n\n }).then(() => {\n\n // Go to the record\n ComposeUI.gotoRecordEditor(mySavedContract)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Account\n resource: compose:record\n CaseSetStatusToWorking:\n source: |-\n // Update the status\n $record.values.Status = 'Working'\n let caseRecord = $record\n\n // Save the case\n return Compose.makeRecord({\n 'CaseId' : caseRecord.recordID,\n 'Description' : 'State set to \"Working\"',\n 'Type' : 'State change'\n }, 'CaseUpdate').then(myCaseUpdate => {\n\n return Compose.saveRecord(myCaseUpdate)\n\n }).then(myCaseUpdate => {\n\n return Compose.saveRecord(caseRecord)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Case\n resource: compose:record\n CaseSetStatusToClosed:\n source: |-\n // Check if the case is already closed\n if ($record.values.Status === 'Closed') {\n // Case is closed already. Exit\n ComposeUI.success(`This case is already closed.`)\n return true\n }\n\n // Check if there is a solution\n let SolutionName = $record.values.SolutionName\n let solutionRecord = $record.values.SolutionId\n\n // If there is no solution, show that it's not possible to close the case\n if ((!SolutionName) && (!solutionRecord)) {\n ComposeUI.warning(`Unable to close the case. Please add a solution name or select an existing solution before closing the case.`)\n return true\n }\n\n // Update the status\n $record.values.IsClosed = true\n var m = new Date()\n var dateString = m.getUTCFullYear() + \"/\" + (m.getUTCMonth() + 1) + \"/\" + m.getUTCDate() + \" \" + m.getUTCHours() + \":\" + m.getUTCMinutes() + \":\" + m.getUTCSeconds()\n $record.values.ClosedDate = dateString\n $record.values.Status = 'Closed'\n\n return Compose.saveRecord($record)\n .then(mySavedRecord => {\n\n // Create the CaseUpdate record\n return Compose.makeRecord({\n 'Description': 'State set to \"Closed',\n 'Type': 'State change',\n 'CaseId': $record.recordID\n }, 'CaseUpdate')\n\n .then(myCaseUpdate => {\n\n return Compose.saveRecord(myCaseUpdate)\n\n }).then(mySavedCaseUpdate => {\n\n // Check if a solution record has been selected\n if (solutionRecord) {\n\n // If there is a solution record, map the values in the case\n return Compose.findRecordByID(solutionRecord, 'Solution').then(solution => {\n $record.values.SolutionName = solution.values.SolutionName\n $record.values.SolutionNote = solution.values.SolutionNote\n $record.values.SolutionFile = solution.values.File\n\n return Compose.saveRecord($record)\n }).catch(err => {\n\n // solve the problem\n console.error(err)\n })\n } else {\n\n // If there is no solution record, check if the value \"SubmitAsSolution\" is checked. If so, save the solution as a Solution record\n if ($record.values.SubmitAsSolution) {\n\n //Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n // Map the solution number\n let nextSolutionNumber = settings.values.SolutionNextNumber\n if (typeof nextSolutionNumber == \"undefined\" || nextSolutionNumber === '' || isNaN(nextSolutionNumber)) {\n nextSolutionNumber = 0\n }\n\n // Create the Solution record\n return Compose.makeRecord({\n 'SolutionName': $record.values.SolutionName,\n 'SolutionNote': $record.values.SolutionNote,\n 'File': $record.values.SolutionFile,\n 'Status': 'New',\n 'IsPublished': '1',\n 'CaseId': $record.recordID,\n 'SolutionNumber': nextSolutionNumber,\n 'ProductId': $record.values.ProductId\n }, 'Solution')\n\n .then(mySolution => {\n\n return Compose.saveRecord(mySolution)\n\n }).then(mySavedSolution => {\n\n // Save the solution record in the case record\n $record.values.SolutionId = mySavedSolution.recordID\n return Compose.saveRecord($record)\n\n }).then(mySavedSolution => {\n\n let nextSolutionNumberUpdated = parseInt(nextSolutionNumber, 10) + 1\n\n // Update the config\n settings.values.SolutionNextNumber = nextSolutionNumberUpdated\n return Compose.saveRecord(settings).then(mySavedSettings => {\n\n console.log('Record saved, ID', mySavedSettings.recordID)\n\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }\n }\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Case\n resource: compose:record\n AccountCreateNewCase:\n source: |-\n //Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n // Map the case number\n let nextCaseNumber = settings.values.CaseNextNumber\n if (typeof nextCaseNumber == \"undefined\" || nextCaseNumber === '' || isNaN(nextCaseNumber)) {\n nextCaseNumber = 0\n }\n\n // Find the contact we want to link the new case to (by default, the primary contact)\n return Compose.findRecords(`AccountId = ${$record.recordID}`, 'Contact').then(({ set, filter }) => {\n\n let ContactId, SuppliedName, SuppliedEmail, SuppliedPhone\n\n // Loop through the contacts of the account, to save the primary contact\n set.forEach(r => {\n\n //Check if it's the primary contact\n let contactIsPrimary = r.values.IsPrimary\n console.log(contactIsPrimary)\n if (contactIsPrimary === '1') {\n\n //Add the contact\n ContactId = r.recordID\n SuppliedName = r.values.FirstName + ' ' + r.values.LastName\n SuppliedEmail = r.values.Email\n SuppliedPhone = r.values.Phone\n }\n })\n\n return Compose.makeRecord({\n 'OwnerId' : $record.values.OwnerId,\n 'Subject' : '(no subject)',\n 'ContactId' : ContactId,\n 'AccountId' : $record.recordID,\n 'Status' : 'New',\n 'Priority' : 'Low',\n 'SuppliedName' : SuppliedName,\n 'SuppliedEmail' : SuppliedEmail,\n 'SuppliedPhone' : SuppliedPhone,\n 'CaseNumber' : nextCaseNumber\n }, 'Case').then(myCase => {\n\n Compose.saveRecord(myCase)\n\n }).then(mySavedCase => {\n let nextCaseNumberUpdated = parseInt(nextCaseNumber,10) + 1\n\n // Update the config\n settings.values.CaseNextNumber = nextCaseNumberUpdated\n return Compose.saveRecord(settings).then(mySavedSettings => {\n\n console.log('Record saved, new ID', mySavedSettings.recordID)\n\n }).then(({ mySavedCase }) => {\n\n // Notify current user\n ComposeUI.success(`The new case has been created.`)\n\n\n }).then(({ mySavedCase }) => {\n\n // Go to the record\n ComposeUI.gotoRecordEditor(mySavedCase)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Account\n resource: compose:record\n ContactCreateNewCase:\n source: |-\n //Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n // Map the case number\n let nextCaseNumber = settings.values.CaseNextNumber\n if (typeof nextCaseNumber == \"undefined\" || nextCaseNumber === '' || isNaN(nextCaseNumber)) {\n nextCaseNumber = 0\n }\n\n return Compose.makeRecord({\n 'OwnerId' : $record.values.OwnerId,\n 'Subject' : '(no subject)',\n 'ContactId' : $record.recordID,\n 'AccountId' : $record.values.AccountId,\n 'Status' : 'New',\n 'Priority' : 'Low',\n 'SuppliedName' : $record.values.FirstName + ' ' + $record.values.LastName,\n 'SuppliedEmail' : $record.values.Email,\n 'SuppliedPhone' : $record.values.Phone,\n 'CaseNumber' : nextCaseNumber\n }, 'Case').then(myCase => {\n\n // return was missing here. Set tjhe mySavedCase below\n return Compose.saveRecord(myCase)\n\n }).then(mySavedCase => {\n let nextCaseNumberUpdated = parseInt(nextCaseNumber, 10) + 1\n\n // Update the config\n settings.values.CaseNextNumber = nextCaseNumberUpdated\n return Compose.saveRecord(settings).then(mySavedSettings => {\n\n console.log('Record saved, new ID', mySavedSettings.recordID)\n // then(({ mySavedCase }) wasn't needed, since it is already defined\n // for the entire block, starting at line 27\n }).then(() => {\n\n // Notify current user\n ComposeUI.success(`The new case has been created.`)\n\n }).then(() => {\n\n // Go to the record\n ComposeUI.gotoRecordEditor(mySavedCase)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Contact\n resource: compose:record\n LeadConvertLeadIntoAccount:\n source: |-\n if ($record.values.Status === 'Converted') {\n // Lead already converted. Inform user and exit\n ComposeUI.warning('This lead is already converted.')\n return true\n }\n\n // create new record of type/module Account and copy all values\n return Compose.makeRecord({\n 'BillingStreet' : $record.values.Street,\n 'BillingCity' : $record.values.City,\n 'BillingState' : $record.values.State,\n 'BillingPostalCode' : $record.values.PostalCode,\n 'BillingCountry' : $record.values.Country,\n 'AnnualRevenue' : $record.values.AnnualRevenue,\n 'AccountName' : $record.values.Company,\n 'Description' : $record.values.Description,\n 'Fax' : $record.values.Fax,\n 'Industry' : $record.values.Industry,\n 'OwnerId' : $record.values.OwnerId,\n 'AccountSource' : $record.values.LeadSource,\n 'Phone' : $record.values.Phone,\n 'NumberOfEmployees' : $record.values.NumberOfEmployees,\n 'Rating' : $record.values.Rating,\n 'Website' : $record.values.Website,\n 'Twitter' : $record.values.Twitter,\n 'Facebook' : $record.values.Facebook,\n 'LinkedIn' : $record.values.LinkedIn\n }, 'Account').then(myAccount => {\n\n return Compose.saveRecord(myAccount)\n\n }).then(mySavedAccount => {\n\n // Create the related contact\n return Compose.makeRecord({\n 'MailingStreet' : $record.values.Street,\n 'MailingCity' : $record.values.City,\n 'MailingState' : $record.values.State,\n 'MailingPostalCode' : $record.values.PostalCode,\n 'MailingCountry' : $record.values.Country,\n 'Description' : $record.values.Description,\n 'DoNotCall' : $record.values.DoNotCall,\n 'Email' : $record.values.Email,\n 'HasOptedOutOfEmail' : $record.values.HasOptedOutOfEmail,\n 'Fax' : $record.values.Fax,\n 'HasOptedOutOfFax' : $record.values.HasOptedOutOfFax,\n 'OwnerId' : $record.values.OwnerId,\n 'LeadSource' : $record.values.LeadSource,\n 'Website' : $record.values.Website,\n 'Twitter' : $record.values.Twitter,\n 'Facebook' : $record.values.Facebook,\n 'LinkedIn' : $record.values.LinkedIn,\n 'Salutation' : $record.values.Salutation,\n 'FirstName' : $record.values.FirstName,\n 'LastName' : $record.values.LastName,\n 'MobilePhone' : $record.values.MobilePhone,\n 'Phone' : $record.values.Phone,\n 'Title' : $record.values.Title,\n 'IsPrimary' : '1',\n 'AccountId' : mySavedAccount.recordID\n }, 'Contact').then(myContact => {\n\n return Compose.saveRecord(myContact)\n\n }).then(updatedAccount => {\n\n //Update the lead record\n $record.values.Status = 'Converted'\n $record.values.IsConverted = 'Yes'\n $record.values.ConvertedAccountId = mySavedAccount.recordID\n $record.values.ConvertedContactId = mySavedAccount.recordID\n $record.values.ConvertedDate = mySavedAccount.createdAt\n\n return Compose.saveRecord($record)\n\n }).then(leadUser => {\n\n return System.findUserByID($record.values.OwnerId).then(user => {\n\n // Notifies the owner that a new account was created and assigned to him\n Compose.sendRecordToMail(\n user.email,\n 'Lead ' + $record.values.FirstName + ' ' + $record.values.LastName + ' from ' + $record.values.Company + ' has been converted',\n {\n header: '

The following lead has been converted:

'\n },\n mySavedAccount\n )\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).then(({ mySavedAccount }) => {\n\n // Notify current user\n ComposeUI.success(`The lead has been converted.`)\n\n\n }).then(({ mySavedAccount }) => {\n\n // Go to the record\n ComposeUI.gotoRecordEditor(mySavedAccount)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Lead\n resource: compose:record\n LeadConvertLeadToAccountAndOpportunity:\n source: |-\n if ($record.values.Status === 'Converted') {\n // Lead already converted. Inform user and exit\n ComposeUI.warning('This lead is already converted.')\n return true\n }\n\n // create new record of type/module Account and copy all values\n return Compose.makeRecord({\n 'BillingStreet' : $record.values.Street,\n 'BillingCity' : $record.values.City,\n 'BillingState' : $record.values.State,\n 'BillingPostalCode' : $record.values.PostalCode,\n 'BillingCountry' : $record.values.Country,\n 'AnnualRevenue' : $record.values.AnnualRevenue,\n 'AccountName' : $record.values.Company,\n 'Description' : $record.values.Description,\n 'Fax' : $record.values.Fax,\n 'Industry' : $record.values.Industry,\n 'OwnerId' : $record.values.OwnerId,\n 'AccountSource' : $record.values.LeadSource,\n 'Phone' : $record.values.Phone,\n 'NumberOfEmployees' : $record.values.NumberOfEmployees,\n 'Rating' : $record.values.Rating,\n 'Website' : $record.values.Website,\n 'Twitter' : $record.values.Twitter,\n 'Facebook' : $record.values.Facebook,\n 'LinkedIn' : $record.values.LinkedIn\n }, 'Account').then(myAccount => {\n\n return Compose.saveRecord(myAccount)\n\n }).then(mySavedAccount => {\n\n // Create the related contact\n return Compose.makeRecord({\n 'MailingStreet' : $record.values.Street,\n 'MailingCity' : $record.values.City,\n 'MailingState' : $record.values.State,\n 'MailingPostalCode' : $record.values.PostalCode,\n 'MailingCountry' : $record.values.Country,\n 'Description' : $record.values.Description,\n 'DoNotCall' : $record.values.DoNotCall,\n 'Email' : $record.values.Email,\n 'HasOptedOutOfEmail' : $record.values.HasOptedOutOfEmail,\n 'Fax' : $record.values.Fax,\n 'HasOptedOutOfFax' : $record.values.HasOptedOutOfFax,\n 'OwnerId' : $record.values.OwnerId,\n 'LeadSource' : $record.values.LeadSource,\n 'Website' : $record.values.Website,\n 'Twitter' : $record.values.Twitter,\n 'Facebook' : $record.values.Facebook,\n 'LinkedIn' : $record.values.LinkedIn,\n 'Salutation' : $record.values.Salutation,\n 'FirstName' : $record.values.FirstName,\n 'LastName' : $record.values.LastName,\n 'MobilePhone' : $record.values.MobilePhone,\n 'Phone' : $record.values.Phone,\n 'Title' : $record.values.Title,\n 'IsPrimary' : '1',\n 'AccountId' : mySavedAccount.recordID\n }, 'Contact').then(mySavedContact => {\n\n return Compose.saveRecord(mySavedContact).then(mySavedContact => {\n\n // First get the default values\n //Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n let opportunityCloseDays = settings.values.OpportunityCloseDateDays\n let opportunityProbability = settings.values.OpportunityProbability\n let opportunityForecaseCategory = settings.values.OpportunityForecaseCategory\n let opportunityStagename = settings.values.OpportunityStagename\n\n //Calculate the expiration date\n let m = new Date()\n m.setDate(m.getDate() + parseInt(opportunityCloseDays,10))\n let closeDate = m.getUTCFullYear() +\"/\"+ (m.getUTCMonth()+1) +\"/\"+ m.getUTCDate() + \" \" + m.getUTCHours() + \":\" + m.getUTCMinutes() + \":\" + m.getUTCSeconds()\n\n // Create the related opportunity\n return Compose.makeRecord({\n 'Description' : $record.values.Description,\n 'OwnerId' : $record.values.OwnerId,\n 'LeadSource' : $record.values.LeadSource,\n 'Name' : '(unnamed)',\n 'AccountId' : mySavedAccount.recordID,\n 'IsClosed' : 'No',\n 'IsWon' : 'No',\n 'CloseDate' : closeDate,\n 'Probability' : opportunityProbability,\n 'ForecastCategory' : opportunityForecaseCategory,\n 'StageName' : opportunityStagename\n }, 'Opportunity').then(myOpportunity => {\n return Compose.saveRecord(myOpportunity)\n\n }).then(mySavedOpportunity => {\n\n //Create a new contact linked to the opportunity\n return Compose.makeRecord({\n 'ContactId' : mySavedContact.recordID,\n 'OpportunityId' : mySavedOpportunity.recordID,\n 'IsPrimary' : '1'\n }, 'OpportunityContactRole').then(myOpportunityContactRole => {\n return Compose.saveRecord(myOpportunityContactRole)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n\n }).then(updatedAccount => {\n\n //Update the lead record\n $record.values.Status = 'Converted'\n $record.values.IsConverted = 'Yes'\n $record.values.ConvertedAccountId = mySavedAccount.recordID\n $record.values.ConvertedContactId = mySavedAccount.recordID\n $record.values.ConvertedDate = mySavedAccount.createdAt\n\n return Compose.saveRecord($record)\n\n }).then(leadUser => {\n\n return System.findUserByID($record.values.OwnerId).then(user => {\n\n // Notifies the owner that a new account was created and assigned to him\n Compose.sendRecordToMail(\n user.email,\n 'Lead ' + $record.values.FirstName + ' ' + $record.values.LastName + ' from ' + $record.values.Company + ' has been converted',\n {\n header: '

The following lead has been converted:

'\n },\n mySavedAccount\n )\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).then(({ mySavedAccount }) => {\n\n // Notify current user\n ComposeUI.success(`The lead has been converted.`)\n\n\n }).then(({ mySavedAccount }) => {\n\n // Go to the record\n ComposeUI.gotoRecordEditor(mySavedAccount)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Lead\n resource: compose:record\n QuoteSendQuoteToCustomEmail:\n source: |-\n // Get the to address\n let to = prompt(\"Please enter an email to send this quote to:\")\n if (to === null || to === \"\") {\n ComposeUI.warning(`Please enter an email to send this quote to .`)\n return\n }\n\n let lineitems = ''\n Compose.findRecords(`QuoteId = ${$record.recordID}`, 'QuoteLineItem')\n\n .then(({ set, filter }) => {\n\n set.forEach(lineitem => {\n\n lineitems = lineitems + \"Price: \" + lineitem.values.UnitPrice + \"
\"\n lineitems = lineitems + \"Quantity: \" + lineitem.values.Quantity + \"
\"\n lineitems = lineitems + \"Subtotal: \" + lineitem.values.Subtotal + \"
\"\n lineitems = lineitems + \"Discount: \" + lineitem.values.Discount + \"
\"\n lineitems = lineitems + \"Total Price: \" + lineitem.values.TotalPrice + \"
\"\n lineitems = lineitems + \"-------------------------
\"\n })\n return lineitems\n }).then(lineitems => {\n\n\n // Get email body\n let html = \"

Details of Quote: \" + $record.values.QuoteNumber + \" - \" + $record.values.Name + \"

\"\n html = html + \"
\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"
\"\n html = html + \"Quote Information
\"\n html = html + \"
\"\n html = html + \"Quote Number: \" + $record.values.QuoteNumber + \"
\"\n html = html + \"Quote Name: \" + $record.values.Name + \"
\"\n html = html + \"Expiration Date: \" + $record.values.ExpirationDate + \"
\"\n html = html + \"Description: \" + $record.values.Description\n html = html + \"
\"\n html = html + \"Primary contact data
\"\n html = html + \"
\"\n html = html + \"Contact Name: \" + $record.values.ContactId + \"
\"\n html = html + \"Email: \" + $record.values.Email + \"
\"\n html = html + \"Phone: \" + $record.values.Phone\n html = html + \"
\"\n html = html + \"Totals
\"\n html = html + \"
\"\n html = html + \"Subtotal: \" + $record.values.Subtotal + \"
\"\n html = html + \"Additional Discount: \" + $record.values.Discount + \"
\"\n html = html + \"Shipping and Handling: \" + $record.values.ShippingHandling + \"
\"\n html = html + \"Total Price: \" + $record.values.TotalPrice + \"
\"\n html = html + \"Tax: \" + $record.values.Tax + \"
\"\n html = html + \"Grand Total: \" + $record.values.GrandTotal\n html = html + \"
\"\n html = html + \"Products
\"\n html = html + \"
\"\n html = html + lineitems\n html = html + \"
\"\n html = html + \"Bill To
\"\n html = html + \"
\"\n html = html + \"Bill to Name: \" + $record.values.BillingName + \"
\"\n html = html + \"Bill to Street: \" + $record.values.BillingStreet + \"
\"\n html = html + \"Bill to City: \" + $record.values.BillingCity + \"
\"\n html = html + \"Bill to State: \" + $record.values.BillingState + \"
\"\n html = html + \"Bill to Postal Code: \" + $record.values.BillingPostalCode + \"
\"\n html = html + \"Bill to Country: \" + $record.values.BillingCountry\n html = html + \"
\"\n html = html + \"Quote To
\"\n html = html + \"
\"\n html = html + \"Quote to Name: \" + $record.values.QuoteToName + \"
\"\n html = html + \"Quote to Street: \" + $record.values.QuoteToStreet + \"
\"\n html = html + \"Quote to City: \" + $record.values.QuoteToCity + \"
\"\n html = html + \"Quote to State: \" + $record.values.QuoteToState + \"
\"\n html = html + \"Quote to Postal Code: \" + $record.values.QuoteToPostalCode + \"
\"\n html = html + \"Quote to Country: \" + $record.values.QuoteToCountry\n html = html + \"
\"\n html = html + \"Ship To
\"\n html = html + \"
\"\n html = html + \"Ship to Name: \" + $record.values.ShippingName + \"
\"\n html = html + \"Ship to Street: \" + $record.values.ShippingStreet + \"
\"\n html = html + \"Ship to City: \" + $record.values.ShippingCity + \"
\"\n html = html + \"Ship to State: \" + $record.values.ShippingState + \"
\"\n html = html + \"Ship to Postal Code: \" + $record.values.ShippingPostalCode + \"
\"\n html = html + \"Ship to Country: \" + $record.values.ShippingCountry\n html = html + \"
\"\n\n // Send the email\n return Compose.sendMail(to, `Corteza - Quote: ${$record.values.QuoteNumber} - ${$record.values.Name}`, { html: html }).then(() => {\n ComposeUI.success(`The quote has been sent via email.`)\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Quote\n resource: compose:record\n QuoteSendQuoteToPrimaryContact:\n source: |-\n // Get the to address\n let to = $record.values.Email\n if (!to) {\n ComposeUI.warning(`There is no email linked to the quote. Please fill in an email address in the \"Primary contact data\" block.`)\n return\n }\n\n let lineitems = ''\n Compose.findRecords(`QuoteId = ${$record.recordID}`, 'QuoteLineItem')\n\n .then(({ set, filter }) => {\n\n set.forEach(lineitem => {\n\n lineitems = lineitems + \"Price: \" + lineitem.values.UnitPrice + \"
\"\n lineitems = lineitems + \"Quantity: \" + lineitem.values.Quantity + \"
\"\n lineitems = lineitems + \"Subtotal: \" + lineitem.values.Subtotal + \"
\"\n lineitems = lineitems + \"Discount: \" + lineitem.values.Discount + \"
\"\n lineitems = lineitems + \"Total Price: \" + lineitem.values.TotalPrice + \"
\"\n lineitems = lineitems + \"-------------------------
\"\n })\n return lineitems\n }).then(lineitems => {\n\n\n // Get email body\n let html = \"

Details of Quote: \" + $record.values.QuoteNumber + \" - \" + $record.values.Name + \"

\"\n html = html + \"
\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"
\"\n html = html + \"Quote Information
\"\n html = html + \"
\"\n html = html + \"Quote Number: \" + $record.values.QuoteNumber + \"
\"\n html = html + \"Quote Name: \" + $record.values.Name + \"
\"\n html = html + \"Expiration Date: \" + $record.values.ExpirationDate + \"
\"\n html = html + \"Description: \" + $record.values.Description\n html = html + \"
\"\n html = html + \"Primary contact data
\"\n html = html + \"
\"\n html = html + \"Contact Name: \" + $record.values.ContactId + \"
\"\n html = html + \"Email: \" + $record.values.Email + \"
\"\n html = html + \"Phone: \" + $record.values.Phone\n html = html + \"
\"\n html = html + \"Totals
\"\n html = html + \"
\"\n html = html + \"Subtotal: \" + $record.values.Subtotal + \"
\"\n html = html + \"Additional Discount: \" + $record.values.Discount + \"
\"\n html = html + \"Shipping and Handling: \" + $record.values.ShippingHandling + \"
\"\n html = html + \"Total Price: \" + $record.values.TotalPrice + \"
\"\n html = html + \"Tax: \" + $record.values.Tax + \"
\"\n html = html + \"Grand Total: \" + $record.values.GrandTotal\n html = html + \"
\"\n html = html + \"Products
\"\n html = html + \"
\"\n html = html + lineitems\n html = html + \"
\"\n html = html + \"Bill To
\"\n html = html + \"
\"\n html = html + \"Bill to Name: \" + $record.values.BillingName + \"
\"\n html = html + \"Bill to Street: \" + $record.values.BillingStreet + \"
\"\n html = html + \"Bill to City: \" + $record.values.BillingCity + \"
\"\n html = html + \"Bill to State: \" + $record.values.BillingState + \"
\"\n html = html + \"Bill to Postal Code: \" + $record.values.BillingPostalCode + \"
\"\n html = html + \"Bill to Country: \" + $record.values.BillingCountry\n html = html + \"
\"\n html = html + \"Quote To
\"\n html = html + \"
\"\n html = html + \"Quote to Name: \" + $record.values.QuoteToName + \"
\"\n html = html + \"Quote to Street: \" + $record.values.QuoteToStreet + \"
\"\n html = html + \"Quote to City: \" + $record.values.QuoteToCity + \"
\"\n html = html + \"Quote to State: \" + $record.values.QuoteToState + \"
\"\n html = html + \"Quote to Postal Code: \" + $record.values.QuoteToPostalCode + \"
\"\n html = html + \"Quote to Country: \" + $record.values.QuoteToCountry\n html = html + \"
\"\n html = html + \"Ship To
\"\n html = html + \"
\"\n html = html + \"Ship to Name: \" + $record.values.ShippingName + \"
\"\n html = html + \"Ship to Street: \" + $record.values.ShippingStreet + \"
\"\n html = html + \"Ship to City: \" + $record.values.ShippingCity + \"
\"\n html = html + \"Ship to State: \" + $record.values.ShippingState + \"
\"\n html = html + \"Ship to Postal Code: \" + $record.values.ShippingPostalCode + \"
\"\n html = html + \"Ship to Country: \" + $record.values.ShippingCountry\n html = html + \"
\"\n\n // Send the email\n return Compose.sendMail(to, `Corteza - Quote: ${$record.values.QuoteNumber} - ${$record.values.Name}`, { html: html }).then(() => {\n ComposeUI.success(`The quote has been sent via email.`)\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Quote\n resource: compose:record\n QuoteSubmitQuoteForApproval:\n source: |-\n // Check if it can be reviewed\n if ($record.values.Status !== 'Draft' && $record.values.Status !== 'Needs Review') {\n crust.notify.ui.alert.warning('A quote needs to have the status Draft or Needs Review in order to be sent for approval')\n return true\n }\n\n // Set the status\n $record.values.Status = 'In Review'\n\n // Saves the quote and inform\n return Compose.saveRecord($record)\n .then(mySavedRecord => {\n\n // Get the email of the owner\n return System.findUserByID($record.createdBy).then(user => {\n\n // Send the mail\n return Compose.sendMail(\n user.email, //Change this to the email address of the person that needs to approve the quotes\n `Quote \"${$record.values.Name}\" needs approval`,\n { html: `The following quote needs approval:

${$record.values.Name}` }\n )\n }).then(() => {\n\n // Notify current user\n ComposeUI.success(`The quote has been sent for approval.`)\n\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Quote\n resource: compose:record\n OpportunityGenerateNewQuote:\n source: |-\n // Check if there is a related account, to map the fields of the account\n if (!$record.values.AccountId) {\n\n // Exit when there is no account related to the opportunity.\n ComposeUI.warning('Please link the opportunity to an account before generating a quote')\n return\n }\n\n let quoteContactId\n let quoteEmail\n let quotePhone\n let quoteFax\n let quoteAccountId\n let quoteBillingStreet\n let quoteBillingCity\n let quoteBillingState\n let quoteBillingPostalCode\n let quoteBillingCountry\n let quoteBillingName\n let quoteToStreet\n let quoteToCity\n let quoteToState\n let quoteToPostalCode\n let quoteToCountry\n let quoteToName\n let quoteShippingStreet\n let quoteShippingCity\n let quoteShippingState\n let quoteShippingPostalCode\n let quoteShippingCountry\n let quoteShippingName\n let quoteExpirationDate\n let quoteNumber\n\n // Get the primary contact for the quote\n return Compose.findRecords(`OpportunityId = ${$record.recordID}`, 'OpportunityContactRole')\n\n .then(({ set, filter }) => {\n\n let primary_contact\n\n if (set.length === 1) {\n\n // Get the contact\n primary_contact = set[0]\n\n } else {\n\n // Loop through the contacts of the account, to save the primary contact\n set.forEach(r => {\n\n // Check if it's the primary contact\n let contactIsPrimary = r.values.IsPrimary\n if (contactIsPrimary === '1') {\n\n // Add the contact\n primary_contact = r\n }\n })\n }\n return primary_contact\n\n }).then(primary_contact => {\n\n // If we have the primary contact, continue to add it to the quote. Else, skip this block\n if (primary_contact) {\n\n // Get the contact data\n return Compose.findRecordByID(primary_contact.values.ContactId, 'Contact').then(contact => {\n\n quoteContactId = contact.recordID\n quoteEmail = contact.values.Email\n quotePhone = contact.values.Phone\n quoteFax = contact.values.Fax\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }\n\n }).then(mySavedQuote => {\n\n // Get the related account\n return Compose.findRecordByID($record.values.AccountId, 'Account').then(account => {\n\n quoteAccountId = account.recordID,\n quoteBillingStreet = account.values.BillingStreet,\n quoteBillingCity = account.values.BillingCity,\n quoteBillingState = account.values.BillingState,\n quoteBillingPostalCode = account.values.BillingPostalCode,\n quoteBillingCountry = account.values.BillingCountry,\n quoteBillingName = account.values.AccountName,\n quoteToStreet = account.values.BillingStreet,\n quoteToCity = account.values.BillingCity,\n quoteToState = account.values.BillingState,\n quoteToPostalCode = account.values.BillingPostalCode,\n quoteToCountry = account.values.BillingCountry,\n quoteToName = account.values.AccountName,\n quoteShippingStreet = account.values.BillingStreet,\n quoteShippingCity = account.values.BillingCity,\n quoteShippingState = account.values.BillingState,\n quoteShippingPostalCode = account.values.BillingPostalCode,\n quoteShippingCountry = account.values.BillingCountry,\n quoteShippingName = account.values.AccountName\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).then(mySavedQuote => {\n\n // Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n // Get the expiration date\n let quoteExpirationDays = settings.values.QuoteExpirationDays\n\n // Calculate the expiration date\n let m = new Date()\n m.setDate(m.getDate() + parseInt(quoteExpirationDays, 10))\n let expirationDate = m.getUTCFullYear() + \"/\" + (m.getUTCMonth() + 1) + \"/\" + m.getUTCDate() + \" \" + m.getUTCHours() + \":\" + m.getUTCMinutes() + \":\" + m.getUTCSeconds()\n\n // Save the date\n quoteExpirationDate = expirationDate\n\n // Map the quote number\n let nextQuoteNumber = settings.values.QuoteNextNumber\n if (typeof nextQuoteNumber == \"undefined\" || nextQuoteNumber === '' || isNaN(nextQuoteNumber)) {\n nextQuoteNumber = 0\n }\n quoteNumber = nextQuoteNumber\n let nextQuoteNumberUpdated = parseInt(nextQuoteNumber, 10) + 1\n\n // Update the config\n settings.values.QuoteNextNumber = nextQuoteNumberUpdated\n return Compose.saveRecord(settings).then(mySavedSettings => {\n\n console.log('Record saved, ID', mySavedSettings.recordID)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).then(mySavedQuote => {\n\n // Create a new quote record for the opportunity\n return Compose.makeRecord({\n 'ShippingHandling': 0,\n 'Status': 'Draft',\n 'Discount': 0,\n 'Tax': 0,\n 'OpportunityId': $record.recordID,\n 'GrandTotal': $record.values.Amount,\n 'PricebookId': $record.values.PricebookId,\n 'Name': $record.values.Name,\n 'Subtotal': $record.values.Amount,\n 'TotalPrice': $record.values.Amount,\n 'ContactId': quoteContactId,\n 'Email': quoteEmail,\n 'Phone': quotePhone,\n 'Fax': quoteFax,\n 'AccountId': quoteAccountId,\n 'BillingStreet': quoteBillingStreet,\n 'BillingCity': quoteBillingCity,\n 'BillingState': quoteBillingState,\n 'BillingPostalCode': quoteBillingPostalCode,\n 'BillingCountry': quoteBillingCountry,\n 'BillingName': quoteBillingName,\n 'QuoteToStreet': quoteToStreet,\n 'QuoteToCity': quoteToCity,\n 'QuoteToState': quoteToState,\n 'QuoteToPostalCode': quoteToPostalCode,\n 'QuoteToCountry': quoteToCountry,\n 'QuoteToName': quoteToName,\n 'ShippingStreet': quoteShippingStreet,\n 'ShippingCity': quoteShippingCity,\n 'ShippingState': quoteShippingState,\n 'ShippingPostalCode': quoteShippingPostalCode,\n 'ShippingCountry': quoteShippingCountry,\n 'ShippingName': quoteShippingName,\n 'ExpirationDate': quoteExpirationDate,\n 'QuoteNumber': quoteNumber\n }, 'Quote')\n\n .then(myQuote => {\n\n return Compose.saveRecord(myQuote)\n\n .then(mySavedQuote => {\n\n // Get the list of products from the opportunity to the quote\n return Compose.findRecords(`OpportunityId = ${$record.recordID}`, 'OpportunityLineItem')\n\n .then(({ set, filter }) => {\n\n // Loop through the lineitems related to the opportunity\n set.forEach(r => {\n\n // Create a new contact linked to the opportunity\n return Compose.makeRecord({\n 'Discount': r.values.Discount,\n 'Description': r.values.Description,\n 'ListPrice': r.values.ListPrice,\n 'PricebookEntryId': r.values.PricebookEntryId,\n 'ProductId': r.values.ProductId,\n 'ProductCode': r.values.ProductCode,\n 'Quantity': r.values.Quantity,\n 'UnitPrice': r.values.UnitPrice,\n 'Subtotal': r.values.Subtotal,\n 'TotalPrice': r.values.TotalPrice,\n 'QuoteId': mySavedQuote.recordID\n }, 'QuoteLineItem')\n\n .then(myQuoteLineItem => {\n\n return Compose.saveRecord(myQuoteLineItem)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n })\n })\n\n }).then(() => {\n\n // Notify current user\n ComposeUI.success(`The new quote has been created.`)\n\n\n }).then(() => {\n\n // Go to the record\n ComposeUI.gotoRecordEditor(mySavedQuote)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Opportunity\n resource: compose:record\n QuoteUpdateTotalPrice:\n source: |-\n // Get the subtotal\n let subtotal = parseFloat($record.values.Subtotal)\n\n // Apply additional quote discount\n let discount = $record.values.Discount\n if (!discount || discount === '' || isNaN(discount)) {\n discount = 0\n }\n let totalPrice = subtotal - parseFloat(discount)\n\n // Calculate if it's not below 0\n if (totalPrice < 0) {\n totalPrice = 0\n }\n\n // Apply shipping\n let shippingHandling = $record.values.ShippingHandling\n if (!shippingHandling || shippingHandling === '' || isNaN(shippingHandling)) {\n shippingHandling = 0\n }\n totalPrice = totalPrice + parseFloat(shippingHandling)\n\n // Add totalPrice to the record\n $record.values.TotalPrice = totalPrice\n\n // Apply taxes\n let tax = $record.values.Tax\n if (!shippingHandling || shippingHandling === '' || isNaN(shippingHandling)) {\n // No tax, so don't do anything\n $record.values.GrandTotal = totalPrice\n } else {\n if (tax > 0) {\n // Apply tax\n let taxpercent = parseFloat(tax / 100);\n $record.values.GrandTotal = totalPrice * (1 + taxpercent)\n }\n }\n async: false\n runInUA: false\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: beforeUpdate\n module: Quote\n resource: compose:record\n OpportunityApplyPriceBook:\n source: |-\n // Get the current price book\n let pricebookId = $record.values.PricebookId\n\n // Check if there is a price book. If there isn't one, find the standard one\n if (!pricebookId) {\n\n //If there is no price book selected, get the default price book.\n return Compose.findRecords('IsActive = 1', 'Pricebook')\n\n .then(({ set, filter }) => {\n\n if (set.length === 0) {\n\n // return that there are no Price books in the CRM\n ComposeUI.warning(`There are no active price books configured in the CRM. Please insert an active price book in the Price book module.`)\n\n } else {\n\n // Loop through the price books, to find the standard one\n set.forEach(r => {\n\n //Check if the price book is the standard one\n if (r.values.IsStandard === '1') {\n\n //Get the price book id\n pricebookId = r.recordID\n }\n })\n\n if (pricebookId) {\n\n //Save the price book in the opportunity\n $record.values.PricebookId = pricebookId\n\n // Save the price book in the opportunity\n return Compose.saveRecord($record)\n }\n }\n\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }\n\n // Check if a price book is selected or if a standard price book has been found. If not, exit.\n if (!pricebookId) {\n ComposeUI.warning(`Please select a Price book for this opportunity first.`)\n return\n }\n\n //Set the total amount of the opportunity\n let amount = 0\n\n // Find all opportunity lineitems\n return Compose.findRecords(`OpportunityId = ${$record.recordID}`, 'OpportunityLineItem')\n\n .then(({ set, filter }) => {\n\n set.forEach(lineitem => {\n\n //Set the default values\n let quantity = lineitem.values.Quantity\n let discount = lineitem.values.Discount\n let listprice = 0\n let unitprice = 0\n let subtotal = 0\n let totalprice = 0\n\n // Get the product\n return Compose.findRecordByID(lineitem.values.ProductId, 'Product').then(product => {\n\n // Set the product name and code\n lineitem.values.Name = product.values.Name\n lineitem.values.ProductCode = product.values.ProductCode\n\n }).then(product => {\n\n // Get the right price from the selected price book\n return Compose.findRecords(`PricebookId = ${pricebookId} AND ProductId = ${lineitem.values.ProductId}`, 'PricebookEntry')\n\n .then(({ set, filter }) => {\n\n if (set.length > 0) {\n\n let pricebookEntry = set[0]\n\n // Get the list price\n listprice = pricebookEntry.values.UnitPrice\n\n // Update unitprice only when the value is empty\n unitprice = lineitem.values.UnitPrice\n if (!unitprice || unitprice === '' || isNaN(unitprice)) {\n unitprice = listprice\n }\n\n // Calculate the totals\n if (!quantity || quantity === '' || isNaN(quantity)) {\n quantity = 0\n }\n subtotal = unitprice * quantity\n\n // Calculate the total\n if (!discount || discount === '' || isNaN(discount)) {\n totalprice = subtotal\n } else {\n totalprice = subtotal - discount\n }\n\n // Update it in the listitem record\n lineitem.values.ListPrice = listprice\n lineitem.values.UnitPrice = unitprice\n lineitem.values.Subtotal = subtotal\n lineitem.values.TotalPrice = totalprice\n\n //Add the total price to the amount of the opportunity\n amount = amount + totalprice\n\n // Save the lineitem\n return Compose.saveRecord(lineitem)\n }\n }).then(mySolution => {\n\n //Save the opportunity record\n $record.values.Amount = amount\n return Compose.saveRecord($record)\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Opportunity\n resource: compose:record\nPK\x07\x08>\x16\x18\x81\xf1\x05\x01\x00\xf1\x05\x01\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00 \x001400_pages.yamlUT\x05\x00\x01\x80Cm8namespace: crm\npages:\n - handle: Home\n title: Home\n blocks:\n - title: New Leads\n options:\n fields:\n - name: FirstName\n - name: LastName\n - name: Email\n - name: LeadSource\n - name: Status\n module: Lead\n page: RecordPageForModuleLead\n perPage: 5\n prefilter: Status = 'New'\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 14, 6, 9]\n - title: Leads by Type\n options:\n chart: LeadsByType\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Chart\n xywh: [9, 0, 3, 7]\n - title: Open Opportunities\n options:\n fields:\n - name: Name\n - name: AccountId\n - name: Amount\n - name: StageName\n - name: NextStep\n module: Opportunity\n page: RecordPageForModuleOpportunity\n perPage: 3\n prefilter: StageName != 'Closed Won' AND StageName != 'Closed Lost'\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [6, 14, 6, 9]\n - title: Leads by Country\n options:\n chart: LeadsByCountry\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Chart\n xywh: [6, 0, 3, 7]\n - title: Leads per day\n options:\n chart: LeadsPerDay\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Chart\n xywh: [6, 7, 3, 7]\n - title: My Calendar\n options:\n feeds:\n - endField: EndDateTime\n module: Event\n startField: ActivityDate\n titleField: Subject\n - endField: null\n module: Task\n startField: ActivityDate\n titleField: Subject\n header:\n views:\n - agendaWeek\n - agendaMonth\n - agendaDay\n - month\n - listMonth\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Calendar\n xywh: [0, 0, 6, 14]\n - title: Opportunities\n options:\n chart: OpportunitiesByValue\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Chart\n xywh: [9, 7, 3, 7]\n visible: \n - handle: Leads\n title: Leads\n blocks:\n - title: List of leads\n options:\n fields:\n - name: FirstName\n - name: LastName\n - name: Email\n - name: Rating\n - name: Company\n - name: Country\n - name: Status\n - name: OwnerId\n module: Lead\n page: RecordPageForModuleLead\n perPage: 20\n prefilter: \"\"\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 0, 9, 21]\n - title: Leads by type\n options:\n chart: LeadsByType\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Chart\n xywh: [9, 0, 3, 7]\n - title: Leads by country\n options:\n chart: LeadsByCountry\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Chart\n xywh: [9, 7, 3, 7]\n - title: Leads by source\n options:\n chart: LeadsBySource\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Chart\n xywh: [9, 14, 3, 7]\n pages:\n - handle: RecordPageForModuleLead\n module: Lead\n title: Record page for module \"Lead\"\n blocks:\n - title: Personal Data\n options:\n fields:\n - name: FirstName\n - name: LastName\n - name: Salutation\n - name: Title\n - name: Phone\n - name: MobilePhone\n - name: Email\n - name: Website\n - name: Twitter\n - name: LinkedIn\n - name: Facebook\n kind: Record\n xywh: [0, 0, 3, 15]\n - title: Twitter feed\n options:\n fields: []\n profileSourceField: Twitter\n kind: SocialFeed\n xywh: [9, 0, 3, 31]\n - title: Company Data\n options:\n fields:\n - name: Company\n - name: Industry\n - name: AnnualRevenue\n - name: NumberOfEmployees\n - name: NumberOfEmployeesRange\n - name: Country\n - name: City\n - name: Street\n - name: State\n - name: PostalCode\n kind: Record\n xywh: [3, 0, 3, 15]\n - title: Other Information\n options:\n fields:\n - name: Rating\n - name: Status\n - name: LeadSource\n - name: OwnerId\n - name: Description\n - name: ConvertedAccountId\n - name: ConvertedContactId\n - name: ConvertedOpportunityId\n - name: ConvertedDate\n kind: Record\n xywh: [6, 0, 3, 15]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: LeadId = ${recordID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 15, 6, 8]\n - title: Events\n options:\n fields:\n - name: Type\n - name: Subject\n - name: ActivityDate\n module: Event\n page: RecordPageForModuleEvent\n perPage: 5\n prefilter: LeadId = ${recordID}\n presort: ActivityDate DESC\n kind: RecordList\n xywh: [0, 23, 4, 8]\n - title: Tasks\n options:\n fields:\n - name: Type\n - name: Subject\n - name: Status\n - name: ActivityDate\n module: Task\n page: RecordPageForModuleTask\n perPage: 5\n prefilter: LeadId = ${recordID}\n presort: ActivityDate DESC\n kind: RecordList\n xywh: [4, 23, 5, 8]\n - title: Lead Actions\n options:\n buttons:\n - label: Convert this Lead in to an Account\n script: LeadConvertLeadIntoAccount\n variant: primary\n - label: 'Lead: Convert a lead into an account and opportunity'\n script: LeadConvertLeadToAccountAndOpportunity\n variant: primary\n kind: Automation\n xywh: [6, 15, 3, 8]\n visible: true\n - handle: AllNewLeads\n title: All New Leads\n blocks:\n - title: New Leads\n options:\n fields:\n - name: FirstName\n - name: LastName\n - name: Email\n - name: Rating\n - name: Company\n - name: Country\n - name: LeadSource\n - name: Status\n - name: OwnerId\n module: Lead\n page: RecordPageForModuleLead\n perPage: 20\n prefilter: Status = 'New' OR Status = 'Assigned'\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n visible: true\n - handle: MyLeads\n title: My Leads\n blocks:\n - title: My Leads\n options:\n fields:\n - name: FirstName\n - name: LastName\n - name: Email\n - name: Rating\n - name: Company\n - name: Country\n - name: LeadSource\n - name: Status\n - name: OwnerId\n module: Lead\n page: RecordPageForModuleLead\n perPage: 20\n prefilter: OwnerId = ${userID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 21]\n visible: true\n visible: true\n - handle: Accounts\n title: Accounts\n blocks:\n - title: All accounts\n options:\n fields:\n - name: AccountName\n - name: Type\n - name: Rating\n - name: Industry\n - name: AccountSource\n - name: OwnerId\n - name: createdAt\n module: Account\n page: RecordPageForModuleAccount\n perPage: 20\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 0, 12, 19]\n pages:\n - handle: RecordPageForModuleAccount\n module: Account\n title: Record page for module \"Account\"\n blocks:\n - title: Account Detail\n options:\n fields:\n - name: AccountName\n - name: Type\n - name: Industry\n - name: NumberOfEmployees\n - name: AnnualRevenue\n - name: Twitter\n - name: LinkedIn\n - name: Facebook\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 0, 3, 12]\n - title: Account Address\n options:\n fields:\n - name: BillingStreet\n - name: BillingCity\n - name: BillingState\n - name: BillingPostalCode\n - name: BillingCountry\n - name: Phone\n - name: Website\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [3, 0, 3, 12]\n - title: Other Information\n options:\n fields:\n - name: Rating\n - name: ParentId\n - name: AccountSource\n - name: OwnerId\n - name: Description\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [6, 0, 3, 12]\n - title: Company Twitter Feed\n options:\n fields: []\n profileSourceField: Twitter\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: SocialFeed\n xywh: [9, 0, 3, 20]\n - title: Opportunities\n options:\n fields:\n - name: Name\n - name: StageName\n - name: Amount\n - name: CloseDate\n hideAddButton: true\n module: Opportunity\n page: RecordPageForModuleOpportunity\n perPage: 5\n prefilter: AccountId = ${recordID}\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 12, 6, 8]\n - title: Contacts\n options:\n fields:\n - name: FirstName\n - name: LastName\n - name: Title\n hidePaging: true\n module: Contact\n page: RecordPageForModuleContact\n perPage: 5\n prefilter: AccountId = ${recordID}\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 20, 4, 8]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: AccountId = ${recordID}\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 28, 4, 8]\n - title: Cases\n options:\n fields:\n - name: CaseNumber\n - name: Subject\n - name: Status\n hideAddButton: true\n module: Case\n page: RecordPageForModuleCase\n perPage: 5\n prefilter: AccountId = ${recordID}\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [8, 20, 4, 8]\n - title: Events\n options:\n fields:\n - name: Type\n - name: Subject\n - name: ActivityDate\n module: Event\n page: RecordPageForModuleEvent\n perPage: 5\n prefilter: AccountId = ${recordID}\n presort: ActivityDate DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [4, 28, 4, 8]\n - title: Tasks\n options:\n fields:\n - name: Type\n - name: Subject\n - name: Status\n - name: ActivityDate\n module: Task\n page: RecordPageForModuleTask\n perPage: 5\n prefilter: AccountId = ${recordID}\n presort: ActivityDate DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [8, 28, 4, 8]\n - title: Contracts\n options:\n fields:\n - name: Name\n - name: StartDate\n - name: EndDate\n - name: Status\n hideAddButton: true\n module: Contract\n page: RecordPageForModuleContract\n perPage: 5\n prefilter: AccountId = ${recordID}\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [4, 20, 4, 8]\n - title: Account Actions\n options:\n buttons:\n - label: Generate a new Opportunity for this Account\n script: AccountCreateNewOpportunity\n variant: primary\n - label: Generate a new Contract for this Account\n script: AccountCreateNewContract\n variant: primary\n - label: Generate a new Case for this Account\n script: AccountCreateNewCase\n variant: primary\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Automation\n xywh: [6, 12, 3, 8]\n pages:\n - handle: RecordPageForModuleAccountContactRole\n module: AccountContactRole\n title: Record page for module \"AccountContactRole\"\n blocks:\n - title: Account Contact Role Details\n options:\n fields:\n - name: AccountId\n - name: ContactId\n - name: Role\n - name: IsPrimary\n kind: Record\n xywh: [0, 0, 5, 15]\n visible: false\n visible: true\n - handle: MyAccounts\n title: My Accounts\n blocks:\n - title: My Accounts\n options: \n fields:\n - name: AccountName\n - name: Type\n - name: Rating\n - name: Industry\n - name: AccountSource\n - name: OwnerId\n - name: createdAt\n module: Account\n page: RecordPageForModuleAccount\n perPage: 20\n prefilter: OwnerId = ${userID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 21]\n visible: true\n visible: true\n - handle: Opportunities\n title: Opportunities\n blocks:\n - title: List of Opportunities\n options:\n fields:\n - name: Name\n - name: Amount\n - name: AccountId\n - name: StageName\n - name: CloseDate\n - name: OwnerId\n - name: createdAt\n module: Opportunity\n page: RecordPageForModuleOpportunity\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleOpportunity\n module: Opportunity\n title: Record page for module \"Opportunity\"\n blocks:\n - title: Opportunity Detail\n options:\n fields:\n - name: Name\n - name: AccountId\n - name: Type\n - name: CloseDate\n - name: Probability\n - name: PricebookId\n - name: Amount\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 0, 4, 11]\n - title: Additional Information\n options:\n fields:\n - name: OwnerId\n - name: NextStep\n - name: LeadSource\n - name: CampaignId\n - name: ForecastCategory\n - name: Description\n - name: createdAt\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [8, 0, 4, 11]\n - title: Contact Roles\n options:\n fields:\n - name: ContactId\n - name: IsPrimary\n - name: Role\n module: OpportunityContactRole\n page: RecordPageForModuleOpportunityContactRole\n perPage: 5\n prefilter: OpportunityId = ${recordID}\n presort: IsPrimary DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [6, 19, 6, 8]\n - title: Opportunity Qualification\n options:\n fields:\n - name: StageName\n - name: Budget\n - name: Authority\n - name: Need\n - name: Timeline\n - name: Competition\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [4, 0, 4, 11]\n - title: Products\n options:\n fields:\n - name: ProductId\n - name: ProductCode\n - name: ListPrice\n - name: UnitPrice\n - name: Quantity\n - name: Subtotal\n - name: Discount\n - name: TotalPrice\n module: OpportunityLineItem\n page: RecordPageForModuleOpportunityLineItem\n perPage: 5\n prefilter: OpportunityId = ${recordID}\n presort: ProductId ASC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 11, 8, 8]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: OpportunityId = ${recordID}\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 27, 4, 8]\n - title: Events\n options:\n fields:\n - name: Type\n - name: Subject\n - name: ActivityDate\n module: Event\n page: RecordPageForModuleEvent\n perPage: 5\n prefilter: OpportunityId = ${recordID}\n presort: ActivityDate DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [4, 27, 4, 8]\n - title: Tasks\n options:\n fields:\n - name: Type\n - name: Subject\n - name: Status\n - name: ActivityDate\n module: Task\n page: RecordPageForModuleTask\n perPage: 5\n prefilter: OpportunityId = ${recordID}\n presort: ActivityDate DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [8, 27, 4, 8]\n - title: Quotes\n options:\n fields:\n - name: QuoteNumber\n - name: Name\n - name: ExpirationDate\n - name: Subtotal\n - name: TotalPrice\n hideAddButton: true\n module: Quote\n page: RecordPageForModuleQuote\n perPage: 5\n prefilter: OpportunityId = ${recordID}\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 19, 6, 8]\n - title: Opportunity Actions\n options:\n buttons:\n - label: Update prices of Products by applying the selected Price Book\n and inserted discounts\n script: OpportunityApplyPriceBook\n variant: primary\n - label: Generate a new Quote for this Opportunity\n script: OpportunityGenerateNewQuote\n variant: primary\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Automation\n xywh: [8, 11, 4, 8]\n pages:\n - handle: RecordPageForModuleOpportunityLineItem\n module: OpportunityLineItem\n title: Record page for module \"OpportunityLineItem\"\n blocks:\n - title: Opportunity Line Item Details\n options:\n fields:\n - name: OpportunityId\n - name: ProductId\n - name: Description\n - name: UnitPrice\n - name: Quantity\n - name: Discount\n kind: Record\n xywh: [0, 0, 4, 13]\n - title: Automatically inserted values\n options:\n fields:\n - name: ProductCode\n - name: ListPrice\n - name: Subtotal\n - name: TotalPrice\n kind: Record\n xywh: [4, 0, 4, 13]\n visible: false\n - handle: RecordPageForModuleOpportunityCompetitor\n module: OpportunityCompetitor\n title: Record page for module \"OpportunityCompetitor\"\n blocks:\n - title: Opportunity Competitor Details\n options:\n fields:\n - name: OpportunityId\n - name: CompetitorName\n - name: Strengths\n - name: Weaknesses\n kind: Record\n xywh: [0, 0, 5, 17]\n visible: false\n - handle: RecordPageForModuleOpportunityContactRole\n module: OpportunityContactRole\n title: Record page for module \"OpportunityContactRole\"\n blocks:\n - title: Opportunity Contact Role Details\n options:\n fields:\n - name: OpportunityId\n - name: ContactId\n - name: Role\n - name: IsPrimary\n kind: Record\n xywh: [0, 0, 4, 16]\n pages:\n - handle: RecordPageForModulePricebookEntry\n module: PricebookEntry\n title: Record page for module \"PricebookEntry\"\n blocks:\n - title: Details\n options:\n fields:\n - name: PricebookId\n - name: ProductId\n - name: UnitPrice\n kind: Record\n xywh: [0, 0, 4, 15]\n visible: false\n visible: false\n visible: false\n - handle: MyOpportunities\n title: My Opportunities\n blocks:\n - title: My Opportunities\n options:\n fields:\n - name: Name\n - name: Amount\n - name: AccountId\n - name: StageName\n - name: CloseDate\n - name: OwnerId\n - name: createdAt\n module: Opportunity\n page: RecordPageForModuleOpportunity\n perPage: 20\n prefilter: OwnerId = ${userID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n visible: true\n visible: true\n - handle: Contacts\n title: Contacts\n blocks:\n - title: List of Contacts\n options:\n fields:\n - name: FirstName\n - name: LastName\n - name: AccountId\n - name: Phone\n - name: Email\n - name: OwnerId\n module: Contact\n page: RecordPageForModuleContact\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleContact\n module: Contact\n title: Record page for module \"Contact\"\n blocks:\n - title: Personal Data\n options:\n fields:\n - name: FirstName\n - name: LastName\n - name: Salutation\n - name: Title\n - name: Phone\n - name: Email\n - name: Twitter\n - name: Facebook\n - name: LinkedIn\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 0, 3, 13]\n - title: Contact Address\n options:\n fields:\n - name: AccountId\n - name: IsPrimary\n - name: MailingStreet\n - name: MailingCity\n - name: MailingState\n - name: MailingPostalCode\n - name: MailingCountry\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [3, 0, 3, 13]\n - title: Other Information\n options:\n fields:\n - name: OwnerId\n - name: DoNotCall\n - name: HasOptedOutOfEmail\n - name: ContactSource\n - name: Description\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [6, 0, 3, 13]\n - title: Contact Twitter Feed\n options:\n fields: []\n profileSourceField: Twitter\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: SocialFeed\n xywh: [9, 0, 3, 20]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: LastModifiedDate\n - name: CreatedById\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: ContactId = ${recordID}\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 21, 4, 8]\n - title: Events\n options:\n fields:\n - name: Type\n - name: Subject\n - name: ActivityDate\n module: Event\n page: RecordPageForModuleEvent\n perPage: 5\n prefilter: ContactId = ${recordID}\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [4, 21, 4, 8]\n - title: Tasks\n options:\n fields:\n - name: Type\n - name: Subject\n - name: Status\n - name: ActivityDate\n module: Task\n page: RecordPageForModuleTask\n perPage: 5\n prefilter: ContactId = ${recordID}\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [8, 21, 4, 8]\n - title: Cases related with this Contact\n options:\n fields:\n - name: CaseNumber\n - name: Status\n - name: Subject\n - name: createdAt\n hideAddButton: true\n module: Case\n page: RecordPageForModuleCase\n perPage: 5\n prefilter: ContactId = ${recordID}\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 13, 6, 8]\n - title: Contact Actions\n options:\n buttons:\n - label: Create a new Case for this Contact\n script: ContactCreateNewCase\n variant: primary\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Automation\n xywh: [6, 13, 3, 8]\n visible: false\n visible: true\n - handle: Quotes\n title: Quotes\n blocks:\n - title: List of Quotes\n options:\n fields:\n - name: QuoteNumber\n - name: Name\n - name: OpportunityId\n - name: Discount\n - name: TotalPrice\n - name: Tax\n - name: GrandTotal\n - name: createdAt\n - name: ExpirationDate\n module: Quote\n page: RecordPageForModuleQuote\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleQuote\n module: Quote\n title: Record page for module \"Quote\"\n blocks:\n - title: Quote Information\n options:\n fields:\n - name: QuoteNumber\n - name: Name\n - name: OpportunityId\n - name: ExpirationDate\n - name: Status\n - name: Description\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 0, 4, 12]\n - title: Totals\n options:\n fields:\n - name: PricebookId\n - name: Subtotal\n - name: Discount\n - name: ShippingHandling\n - name: TotalPrice\n - name: Tax\n - name: GrandTotal\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [8, 0, 4, 12]\n - title: Primary contact data\n options:\n fields:\n - name: AccountId\n - name: ContactId\n - name: Email\n - name: Phone\n - name: createdBy\n - name: createdAt\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [4, 0, 4, 12]\n - title: Bill To\n options:\n fields:\n - name: BillingName\n - name: BillingStreet\n - name: BillingCity\n - name: BillingState\n - name: BillingPostalCode\n - name: BillingCountry\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 20, 4, 9]\n - title: Quote To\n options:\n fields:\n - name: QuoteToName\n - name: QuoteToStreet\n - name: QuoteToCity\n - name: QuoteToState\n - name: QuoteToPostalCode\n - name: QuoteToCountry\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [4, 20, 4, 9]\n - title: Ship To\n options:\n fields:\n - name: ShippingName\n - name: ShippingStreet\n - name: ShippingCity\n - name: ShippingState\n - name: ShippingPostalCode\n - name: ShippingCountry\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [8, 20, 4, 9]\n - title: Quote Line Items\n options:\n fields:\n - name: ProductId\n - name: UnitPrice\n - name: Quantity\n - name: Subtotal\n - name: Discount\n - name: TotalPrice\n - name: ListPrice\n module: QuoteLineItem\n page: RecordPageForModuleQuoteLineItem\n perPage: 5\n prefilter: QuoteId = ${recordID}\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 12, 8, 8]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: QuoteId = ${recordID}\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 29, 4, 8]\n - title: Events\n options:\n fields:\n - name: Type\n - name: Subject\n - name: ActivityDate\n module: Event\n page: RecordPageForModuleEvent\n perPage: 5\n prefilter: QuoteId = ${recordID}\n presort: ActivityDate DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [4, 29, 4, 8]\n - title: Tasks\n options:\n fields:\n - name: Type\n - name: Subject\n - name: Status\n - name: ActivityDate\n module: Task\n page: RecordPageForModuleTask\n perPage: 5\n prefilter: QuoteId = ${recordID}\n presort: ActivityDate DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [8, 29, 4, 8]\n - title: Quote Actions\n options:\n buttons:\n - label: Submit this Quote for approval\n script: QuoteSubmitQuoteForApproval\n variant: primary\n - label: Approve this Quote\n script: QuoteApproveQuote\n variant: primary\n - label: Send this Quote via email to the primary contact\n script: QuoteSendQuoteToPrimaryContact\n variant: primary\n - label: Send this Quote to a custom email\n script: QuoteSendQuoteToCustomEmail\n variant: primary\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Automation\n xywh: [8, 12, 4, 8]\n pages:\n - handle: RecordPageForModuleQuoteLineItem\n module: QuoteLineItem\n title: Record page for module \"QuoteLineItem\"\n blocks:\n - title: Quote Line Item Information\n options:\n fields:\n - name: QuoteId\n - name: LineItemNumber\n - name: LineItemDescription\n - name: ProductId\n - name: ListPrice\n - name: UnitPrice\n - name: Quantity\n - name: Subtotal\n - name: Discount\n - name: TotalPrice\n kind: Record\n xywh: [0, 0, 4, 19]\n visible: false\n visible: false\n visible: true\n - handle: Products\n title: Products\n blocks:\n - title: List of Products\n options:\n fields:\n - name: Name\n - name: ProductCode\n - name: Description\n - name: Family\n module: Product\n page: RecordPageForModuleProduct\n perPage: 20\n presort: Name ASC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleProduct\n module: Product\n title: Record page for module \"Product\"\n blocks:\n - title: Product Details\n options:\n fields:\n - name: Name\n - name: ProductCode\n - name: Family\n - name: Description\n - name: IsActive\n kind: Record\n xywh: [0, 0, 6, 10]\n - title: Appears in the following Price Books\n options:\n fields:\n - name: PricebookId\n - name: UnitPrice\n hideAddButton: true\n module: PricebookEntry\n page: RecordPageForModulePricebookEntry\n perPage: 5\n prefilter: ProductId = ${recordID}\n kind: RecordList\n xywh: [6, 0, 6, 10]\n - title: Related Cases\n options:\n fields:\n - name: CaseNumber\n - name: Subject\n - name: Status\n hideAddButton: true\n module: Case\n page: RecordPageForModuleCase\n perPage: 5\n prefilter: ProductId = ${recordID}\n presort: CaseNumber DESC\n kind: RecordList\n xywh: [0, 10, 6, 8]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: ProductId = ${recordID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [6, 10, 6, 8]\n visible: false\n - handle: PriceBook\n title: Price book\n blocks:\n - title: Price books\n options:\n fields:\n - name: Name\n - name: Description\n - name: IsStandard\n - name: IsActive\n module: Pricebook\n page: RecordPageForModulePricebook\n perPage: 20\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleCaseContactRole\n module: CaseContactRole\n title: Record page for module \"CaseContactRole\"\n blocks:\n - title: Case Contact Role Details\n options:\n fields:\n - name: CasesId\n - name: ContactId\n - name: Role\n - name: IsPrimary\n kind: Record\n xywh: [0, 0, 5, 16]\n visible: false\n - handle: RecordPageForModulePricebook\n module: Pricebook\n title: Record page for module \"Pricebook\"\n blocks:\n - title: Price Book Details\n options:\n fields:\n - name: Name\n - name: Description\n - name: IsStandard\n - name: IsActive\n kind: Record\n xywh: [0, 0, 6, 14]\n - title: Price Book Entries\n options:\n fields:\n - name: ProductId\n - name: UnitPrice\n module: PricebookEntry\n page: RecordPageForModulePricebookEntry\n perPage: 12\n prefilter: PricebookId = ${recordID}\n kind: RecordList\n xywh: [6, 0, 6, 14]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: PricebookId = ${recordID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 14, 12, 8]\n visible: false\n visible: true\n visible: true\n - handle: Contracts\n title: Contracts\n blocks:\n - title: List of Contracts\n options:\n fields:\n - name: ContractNumber\n - name: AccountId\n - name: Status\n - name: StartDate\n - name: EndDate\n - name: ContractTerm\n module: Contract\n page: RecordPageForModuleContract\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleContract\n module: Contract\n title: Record page for module \"Contract\"\n blocks:\n - title: Contract Details\n options:\n fields:\n - name: AccountId\n - name: ContractNumber\n - name: Status\n - name: StartDate\n - name: EndDate\n - name: ContractTerm\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 0, 4, 12]\n - title: Contract Billing Address\n options:\n fields:\n - name: BillingStreet\n - name: BillingCity\n - name: BillingState\n - name: BillingPostalCode\n - name: BillingCountry\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 12, 4, 9]\n - title: Contract Description and Special Terms\n options:\n fields:\n - name: OwnerId\n - name: Description\n - name: SpecialTerms\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [4, 0, 4, 12]\n - title: Contract Files\n options:\n fields:\n - name: File1\n - name: File2\n - name: File3\n - name: File4\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [8, 0, 4, 12]\n - title: Contract Shipping Address\n options:\n fields:\n - name: ShippingStreet\n - name: ShippingCity\n - name: ShippingState\n - name: ShippingPostalCode\n - name: ShippingCountry\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [4, 12, 4, 9]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: ContractId = ${recordID}\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 21, 4, 8]\n - title: Events\n options:\n fields:\n - name: Type\n - name: Subject\n - name: ActivityDate\n module: Event\n page: RecordPageForModuleEvent\n perPage: 5\n prefilter: ContractId = ${recordID}\n presort: ActivityDate DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [4, 21, 4, 8]\n - title: Tasks\n options:\n fields:\n - name: Type\n - name: Subject\n - name: Status\n - name: ActivityDate\n module: Task\n page: RecordPageForModuleTask\n perPage: 5\n prefilter: ContractId = ${recordID}\n presort: ActivityDate DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [8, 21, 4, 8]\n pages:\n - handle: RecordPageForModuleContractLineItem\n module: ContractLineItem\n title: Record page for module \"ContractLineItem\"\n blocks:\n - title: Contract Line Item Details\n options:\n fields:\n - name: LineItemNumber\n - name: Description\n - name: StartDate\n - name: EndDate\n - name: Status\n kind: Record\n xywh: [0, 0, 4, 11]\n - title: Contract Line Item Pricing\n options:\n fields:\n - name: UnitPrice\n - name: Quantity\n - name: Subtotal\n - name: Discount\n - name: TotalPrice\n kind: Record\n xywh: [4, 0, 4, 11]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: ContractLineItemId = ${recordID}\n kind: RecordList\n xywh: [8, 0, 4, 11]\n visible: false\n - handle: RecordPageForModuleEntitlement\n module: Entitlement\n title: Record page for module \"Entitlement\"\n blocks:\n - title: Entitlement Details\n options:\n fields:\n - name: Name\n - name: Entitlement Process\n - name: CasesPerEntitlement\n - name: Type\n - name: RemainingCases\n - name: IsPerIncident\n - name: StartDate\n - name: EndDate\n - name: Status\n kind: Record\n xywh: [0, 0, 4, 13]\n - title: Other Information\n options:\n fields:\n - name: AccountId\n - name: ContractLineItemId\n - name: CreatedById\n - name: CreatedDate\n - name: LastModifiedById\n - name: LastModifiedDate\n kind: Record\n xywh: [4, 0, 4, 13]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: EntitlementId = ${recordID}\n kind: RecordList\n xywh: [6, 13, 6, 7]\n - title: Entitlement Templates\n options:\n fields:\n - name: Name\n - name: Type\n - name: CasesPerEntitlement\n - name: IsPerIncident\n - name: Term\n module: EntitlementTemplate\n page: RecordPageForModuleEntitlementTemplate\n perPage: 5\n prefilter: EntitlementId = ${recordID}\n kind: RecordList\n xywh: [0, 13, 6, 7]\n - title: Entitlement Contacts\n options:\n fields:\n - name: ContactId\n - name: Name\n module: EntitlementContact\n page: RecordPageForModuleEntitlementContact\n perPage: 8\n prefilter: EntitlementId = ${recordID}\n kind: RecordList\n xywh: [8, 0, 4, 13]\n pages:\n - handle: RecordPageForModuleEntitlementTemplate\n module: EntitlementTemplate\n title: Record page for module \"EntitlementTemplate\"\n blocks:\n - title: Entitlement Template Details\n options:\n fields:\n - name: Name\n - name: Type\n - name: CasesPerEntitlement\n - name: IsPerIncident\n - name: Term\n - name: BusinessHours\n kind: Record\n xywh: [0, 0, 4, 14]\n visible: false\n - handle: RecordPageForModuleEntitlementContact\n module: EntitlementContact\n title: Record page for module \"EntitlementContact\"\n blocks:\n - title: Entitlement Contact Details\n options:\n fields:\n - name: EntitlementId\n - name: ContactId\n - name: Name\n kind: Record\n xywh: [0, 0, 4, 14]\n visible: false\n visible: false\n - handle: RecordPageForModuleContractContactRole\n module: ContractContactRole\n title: Record page for module \"ContractContactRole\"\n blocks:\n - title: Contract Contact Role Details\n options:\n fields:\n - name: ContractId\n - name: ContactId\n - name: Role\n - name: IsPrimary\n kind: Record\n xywh: [0, 0, 4, 16]\n visible: false\n visible: false\n visible: true\n - handle: Cases\n title: Cases\n blocks:\n - title: List of Cases\n options:\n fields:\n - name: CaseNumber\n - name: Subject\n - name: Status\n - name: CreatedDate\n - name: OwnerId\n - name: createdAt\n module: Case\n page: RecordPageForModuleCase\n perPage: 20\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleCase\n module: Case\n title: Record page for module \"Case\"\n blocks:\n - title: Case Main Information\n options:\n fields:\n - name: CaseNumber\n - name: Subject\n - name: AccountId\n - name: ContactId\n - name: SuppliedName\n - name: SuppliedEmail\n - name: SuppliedPhone\n kind: Record\n xywh: [0, 0, 3, 14]\n - title: Case Details\n options:\n fields:\n - name: Type\n - name: Description\n - name: File\n - name: Origin\n - name: ProductId\n kind: Record\n xywh: [3, 0, 3, 14]\n - title: Case Status\n options:\n fields:\n - name: Status\n - name: OwnerId\n - name: CreatedDate\n - name: Priority\n - name: IsEscalated\n - name: IsClosed\n - name: ClosedDate\n - name: Reason\n kind: Record\n xywh: [9, 0, 3, 14]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: CaseId = ${recordID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 22, 4, 8]\n - title: Events\n options:\n fields:\n - name: Type\n - name: Subject\n - name: ActivityDate\n module: Event\n page: RecordPageForModuleEvent\n perPage: 5\n prefilter: CaseId = ${recordID}\n presort: ActivityDate DESC\n kind: RecordList\n xywh: [4, 22, 5, 8]\n - title: Tasks\n options:\n fields:\n - name: Type\n - name: Subject\n - name: Status\n - name: ActivityDate\n module: Task\n page: RecordPageForModuleTask\n perPage: 5\n prefilter: CaseId = ${recordID}\n presort: ActivityDate DESC\n kind: RecordList\n xywh: [9, 22, 3, 8]\n - title: Case Updates\n options:\n fields:\n - name: Type\n - name: Description\n - name: File\n - name: createdBy\n - name: createdAt\n module: CaseUpdate\n page: RecordPageForModuleCaseUpdate\n perPage: 5\n prefilter: CaseId = ${recordID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 14, 9, 8]\n - title: Case Actions\n options:\n buttons:\n - label: Set Case status to Working\n script: CaseSetStatusToWorking\n variant: primary\n - label: Set Case status to Closed\n script: CaseSetStatusToClosed\n variant: primary\n - label: Inform the contact via email of the Case's solution\n script: CaseInformContactOfSolution\n variant: primary\n kind: Automation\n xywh: [9, 14, 3, 8]\n - title: Case Solution\n options:\n fields:\n - name: SolutionName\n - name: SolutionNote\n - name: SolutionFile\n - name: SolutionId\n - name: SubmitAsSolution\n kind: Record\n xywh: [6, 0, 3, 14]\n pages:\n - handle: RecordPageForModuleCaseUpdate\n module: CaseUpdate\n title: Record page for module \"CaseUpdate\"\n blocks:\n - title: Case Update\n options:\n fields:\n - name: CaseId\n - name: Description\n - name: Type\n - name: File\n - name: IsSolution\n - name: createdBy\n - name: createdAt\n kind: Record\n xywh: [0, 0, 4, 20]\n visible: false\n - handle: RecordPageForModuleCaseMilestone\n module: CaseMilestone\n title: Record page for module \"CaseMilestone\"\n blocks:\n - title: Case Milestone Details\n options:\n fields:\n - name: CaseId\n - name: TargetDate\n - name: TargetResponseInDays\n - name: TargetResponseInHrs\n - name: TargetResponseInMins\n - name: StartDate\n - name: CompletionDate\n - name: IsViolated\n - name: IsCompleted\n kind: Record\n xywh: [0, 0, 5, 19]\n pages:\n - handle: RecordPageForModuleMilestoneType\n module: MilestoneType\n title: Record page for module \"MilestoneType\"\n blocks:\n - title: Case Milestone Type Details\n options:\n fields:\n - name: Name\n - name: Description\n - name: RecurrenceType\n kind: Record\n xywh: [0, 0, 4, 15]\n visible: false\n visible: false\n visible: false\n - handle: Solutions\n title: Solutions\n blocks:\n - title: List of Solutions\n options:\n fields:\n - name: SolutionNumber\n - name: SolutionName\n - name: SolutionNote\n - name: CaseId\n - name: ProductId\n module: Solution\n page: RecordPageForModuleSolution\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleSolution\n module: Solution\n title: Record page for module \"Solution\"\n blocks:\n - title: Solution Details\n options:\n fields:\n - name: SolutionNumber\n - name: SolutionName\n - name: SolutionNote\n - name: File\n - name: CaseId\n - name: ProductId\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 0, 5, 17]\n visible: false\n visible: true\n visible: true\n - handle: Campaigns\n title: Campaigns\n blocks:\n - title: List of Campaigns\n options:\n fields:\n - name: Name\n - name: ParentId\n - name: Type\n - name: Status\n - name: StartDate\n - name: EndDate\n module: Campaigns\n page: RecordPageForModuleCampaign\n perPage: 20\n prefilter: \"\"\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleCampaign\n module: Campaigns\n title: Record page for module \"Campaign\"\n blocks:\n - title: Campaign Details\n options:\n fields:\n - name: Name\n - name: IsActive\n - name: ParentId\n - name: Type\n - name: OwnerId\n - name: Status\n - name: StartDate\n - name: EndDate\n kind: Record\n xywh: [0, 0, 4, 13]\n - title: Campaign Planning\n options:\n fields:\n - name: BudgetedCost\n - name: ActualCost\n - name: ExpectedRevenue\n - name: CreatedById\n - name: CreatedDate\n - name: Description\n kind: Record\n xywh: [4, 0, 4, 13]\n - title: Campaign Statistics\n options:\n fields:\n - name: NumberOfLeads\n - name: NumberOfConvertedLeads\n - name: NumberOfContacts\n - name: NumberOfOpportunities\n - name: NumberOfWonOpportunities\n - name: AmountAllOpportunities\n - name: AmountWonOpportunities\n kind: Record\n xywh: [8, 0, 4, 13]\n - title: Campaign Members\n options:\n fields:\n - name: LeadId\n - name: ContactId\n - name: Status\n module: CampaignMember\n page: RecordPageForModuleCampaignMember\n perPage: 5\n prefilter: CampaignId = ${recordID}\n kind: RecordList\n xywh: [0, 13, 8, 8]\n - title: Generated Opportunities\n options:\n fields:\n - name: Name\n - name: StageName\n - name: Amount\n - name: CloseDate\n module: Opportunity\n page: RecordPageForModuleOpportunity\n perPage: 5\n prefilter: CampaignId = ${recordID}\n kind: RecordList\n xywh: [0, 21, 8, 8]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: CampaignId = ${recordID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [8, 21, 4, 8]\n pages:\n - handle: RecordPageForModuleCampaignMember\n module: CampaignMember\n title: Record page for module \"CampaignMember\"\n blocks:\n - title: Campaign Member Details\n options:\n fields:\n - name: CampaignId\n - name: LeadId\n - name: ContactId\n - name: HasResponded\n - name: FirstRespondedDate\n - name: Status\n kind: Record\n xywh: [0, 0, 5, 13]\n visible: false\n visible: false\n visible: true\n - handle: Tasks\n title: Tasks\n blocks:\n - title: List of Tasks\n options:\n fields:\n - name: Subject\n - name: Status\n - name: LeadId\n - name: AccountId\n - name: ContactId\n - name: OpportunityId\n - name: QuoteId\n - name: ContractId\n - name: CaseId\n - name: ActivityDate\n module: Task\n page: RecordPageForModuleTask\n perPage: 20\n prefilter: \"\"\n presort: ActivityDate DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleTask\n module: Task\n title: Record page for module \"Task\"\n blocks:\n - title: Task Details\n options:\n fields:\n - name: Subject\n - name: Description\n - name: Type\n kind: Record\n xywh: [0, 0, 4, 20]\n - title: Related To\n options:\n fields:\n - name: LeadId\n - name: AccountId\n - name: ContactId\n - name: OpportunityId\n - name: QuoteId\n - name: ContractId\n kind: Record\n xywh: [8, 0, 4, 20]\n - title: Task Status\n options:\n fields:\n - name: Status\n - name: ActivityDate\n - name: Priority\n - name: createdBy\n - name: createdAt\n kind: Record\n xywh: [4, 0, 4, 20]\n visible: false\n visible: true\n - handle: Events\n title: Events\n blocks:\n - title: List of Events\n options:\n fields:\n - name: WhoId\n - name: Subject\n - name: ActivityDate\n - name: StartDateTime\n - name: EndDateTime\n - name: LeadId\n - name: AccountId\n - name: OpportunityId\n - name: createdBy\n module: Event\n page: RecordPageForModuleEvent\n perPage: 20\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleEvent\n module: Event\n title: Record page for module \"Event\"\n blocks:\n - title: Event Data\n options:\n fields:\n - name: Subject\n - name: Description\n - name: Location\n - name: createdAt\n - name: createdBy\n kind: Record\n xywh: [0, 0, 4, 20]\n - title: Related Objects\n options:\n fields:\n - name: LeadId\n - name: AccountId\n - name: ContactId\n - name: OpportunityId\n - name: QuoteId\n - name: ContractId\n - name: CaseId\n kind: Record\n xywh: [8, 0, 4, 20]\n - title: Event Date and Time\n options:\n fields:\n - name: ActivityDate\n - name: DurationInMinutes\n - name: EndDateTime\n - name: IsAllDayEvent\n kind: Record\n xywh: [4, 0, 4, 20]\n visible: false\n visible: true\n - handle: Notes\n title: Notes\n blocks:\n - title: List of Notes\n options:\n fields:\n - name: Title\n - name: LeadId\n - name: AccountId\n - name: ContactId\n - name: OpportunityId\n - name: QuoteId\n - name: ContractId\n - name: CaseId\n - name: createdAt\n - name: createdBy\n module: Note\n page: RecordPageForModuleNote\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleNote\n module: Note\n title: Record page for module \"Note\"\n blocks:\n - title: Note\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n - name: createdBy\n kind: Record\n xywh: [0, 0, 4, 20]\n - title: Files\n options:\n fields:\n - name: FileAdd1\n - name: FileAdd2\n - name: FileAdd3\n - name: FileAdd4\n kind: Record\n xywh: [4, 0, 4, 20]\n - title: Related Objects\n options:\n fields:\n - name: LeadId\n - name: AccountId\n - name: ContactId\n - name: OpportunityId\n - name: QuoteId\n - name: ContractId\n - name: CaseId\n kind: Record\n xywh: [8, 0, 4, 20]\n visible: false\n visible: true\n - handle: Dashboards\n title: Dashboards\n blocks:\n - title: Content\n options:\n body:

Each page in Corteza can be a dashboard. You can add text blocks,\n record lists or charts to make a Sales Activities Dashboard, an executive\n dashboard, or any other dashboard you may need, and set the access\n permissions to define who can view or edit the dashboard.

\n kind: Content\n xywh: [0, 0, 5, 16]\n - title: Leads per day\n options:\n chart: LeadsPerDay\n kind: Chart\n xywh: [5, 0, 3, 16]\n pages:\n - handle: Settings\n title: Settings\n description: A list of default values which are called upon in automation\n processes.\n blocks:\n - title: Settings\n options:\n fields:\n - name: createdAt\n - name: updatedAt\n hidePaging: true\n module: Settings\n page: RecordPageForModuleSettings\n perPage: 1\n kind: RecordList\n xywh: [0, 0, 12, 7]\n pages:\n - handle: RecordPageForModuleSettings\n module: Settings\n title: Record page for module \"Settings\"\n blocks:\n - title: Quote Settings\n options:\n fields:\n - name: QuoteNextNumber\n - name: QuoteExpirationDays\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [3, 0, 3, 12]\n - title: Opportunity Settings\n options:\n fields:\n - name: OpportunityCloseDateDays\n - name: OpportunityProbability\n - name: OpportunityForecaseCategory\n - name: OpportunityStagename\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 0, 3, 12]\n - title: Contract Settings\n options:\n fields:\n - name: ContractNextNumber\n - name: ContractDefaultTime\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [6, 0, 3, 12]\n - title: Case Settings\n options:\n fields:\n - name: CaseNextNumber\n - name: SolutionNextNumber\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [9, 0, 3, 12]\n visible: false\n visible: true\n visible: true\n - handle: UnpublishedModules\n title: Unpublished modules\n pages:\n - handle: Questions\n title: Questions\n visible: false\n blocks:\n - title: List of Questions\n options:\n fields:\n - name: Title\n - name: CreatedDate\n - name: NumReplies\n module: Question\n page: RecordPageForModuleQuestion\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleQuestion\n module: Question\n title: Record page for module \"Question\"\n blocks:\n - title: Question Details\n options:\n fields:\n - name: Title\n - name: Body\n - name: NumReplies\n - name: BestReplyId\n - name: UpVotes\n - name: VoteScore\n kind: Record\n xywh: [0, 0, 4, 13]\n - title: Replies\n options:\n fields:\n - name: Body\n - name: Name\n - name: UpVotes\n - name: DownVotes\n - name: VoteTotal\n module: Reply\n page: RecordPageForModuleReply\n perPage: 5\n prefilter: QuestionId = ${recordID}\n kind: RecordList\n xywh: [0, 13, 12, 7]\n - title: Votes\n options:\n fields:\n - name: Score\n module: Vote\n page: RecordPageForModuleVote\n perPage: 8\n prefilter: QuestionId = ${recordID}\n kind: RecordList\n xywh: [4, 0, 8, 13]\n pages:\n - handle: RecordPageForModuleVote\n module: Vote\n title: Record page for module \"Vote\"\n blocks:\n - title: Vote Score\n options:\n fields:\n - name: Score\n - name: CreatedById\n - name: CreatedDate\n kind: Record\n xywh: [0, 0, 4, 13]\n - title: Related Object\n options:\n fields:\n - name: IdeaId\n - name: ReplyId\n - name: QuestionId\n kind: Record\n xywh: [4, 0, 4, 13]\n visible: false\n - handle: RecordPageForModuleReply\n module: Reply\n title: Record page for module \"Reply\"\n blocks:\n - title: Reply Details\n options:\n fields:\n - name: QuestionId\n - name: IdeaId\n - name: Body\n - name: Name\n - name: UpVotes\n - name: DownVotes\n - name: VoteTotal\n kind: Record\n xywh: [0, 0, 6, 20]\n - title: Votes\n options:\n fields:\n - name: Score\n - name: CreatedById\n - name: CreatedDate\n module: Vote\n page: RecordPageForModuleVote\n perPage: 20\n prefilter: ReplyId = ${recordID}\n kind: RecordList\n xywh: [6, 0, 6, 20]\n visible: false\n visible: false\n - handle: Ideas\n title: Ideas\n blocks:\n - title: List of Ideas\n options:\n fields:\n - name: Title\n - name: Categories\n - name: ParentIdeaId\n - name: VoteScore\n - name: Status\n module: Idea\n page: RecordPageForModuleIdea\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleIdea\n module: Idea\n title: Record page for module \"Idea\"\n blocks:\n - title: Idea Details\n options:\n fields:\n - name: Title\n - name: Body\n - name: Categories\n - name: ParentIdeaId\n - name: CreatorName\n - name: Status\n - name: VoteScore\n - name: VoteTotal\n kind: Record\n xywh: [0, 0, 4, 20]\n - title: Votes\n options:\n fields:\n - name: Score\n - name: CreatedById\n - name: CreatedDate\n module: Vote\n page: RecordPageForModuleVote\n perPage: 20\n prefilter: IdeaId = ${recordID}\n kind: RecordList\n xywh: [8, 0, 4, 20]\n - title: Replies\n options:\n fields:\n - name: Body\n - name: Name\n - name: UpVotes\n - name: DownVotes\n - name: VoteTotal\n module: Reply\n page: RecordPageForModuleReply\n perPage: 20\n prefilter: IdeaId = ${recordID}\n kind: RecordList\n xywh: [4, 0, 4, 20]\n visible: false\n visible: false\n - handle: Emails\n title: Emails\n blocks:\n - title: List of Email Templates\n options:\n fields:\n - name: Name\n - name: IsActive\n - name: createdBy\n module: EmailTemplate\n page: RecordPageForModuleEmailTemplate\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleEmailTemplate\n module: EmailTemplate\n title: Record page for module \"EmailTemplate\"\n blocks:\n - title: Email Template Details\n options:\n fields:\n - name: Name\n - name: Subject\n - name: Description\n - name: Body\n - name: IsActive\n kind: Record\n xywh: [0, 0, 6, 19]\n visible: false\n visible: false\n visible: false\nPK\x07\x08\xa7\xd8\xefxm \x01\x00m \x01\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00 \x001500_record_settings.yamlUT\x05\x00\x01\x80Cm8namespace: crm\nrecords:\n Settings:\n - values:\n QuoteExpirationDays: \"30\"\n QuoteNextNumber: \"1\"\n OpportunityCloseDateDays: \"30\"\n OpportunityProbability: \"10\"\n OpportunityForecaseCategory: \"Pipeline\"\n OpportunityStagename: \"Qualification\"\n ContractNextNumber: \"1\"\n ContractDefaultTime: \"12\"\n CaseNextNumber: \"1\"\n SolutionNextNumber: \"1\"\nPK\x07\x08+t\xf5;\x83\x01\x00\x00\x83\x01\x00\x00PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xe2u&+\xaf\x02\x00\x00\xaf\x02\x00\x00\x18\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x00\x00\x00\x000000_access_control.yamlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xe8\x0c\x08\xf3\x88\x00\x00\x00\x88\x00\x00\x00\x13\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xfe\x02\x00\x001000_namespace.yamlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(r<\x06\xf9\xc9-\x02\x00\xc9-\x02\x00\x11\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xd0\x03\x00\x001100_modules.yamlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x18\x18\xf1\xc2\xb0 \x00\x00\xb0 \x00\x00\x10\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xe11\x02\x001200_charts.yamlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(>\x16\x18\x81\xf1\x05\x01\x00\xf1\x05\x01\x00\x11\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xd8;\x02\x001300_scripts.yamlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xa7\xd8\xefxm \x01\x00m \x01\x00\x0f\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x11B\x03\x001400_pages.yamlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(+t\xf5;\x83\x01\x00\x00\x83\x01\x00\x00\x19\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xc4b\x04\x001500_record_settings.yamlUT\x05\x00\x01\x80Cm8PK\x05\x06\x00\x00\x00\x00\x07\x00\x07\x00\x06\x02\x00\x00\x97d\x04\x00\x00\x00" +var Asset = "PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00 \x000000_access_control.yamlUT\x05\x00\x01\x80Cm8allow:\n everyone:\n compose:\n - access\n\n admins:\n compose:\n - access\n - grant\n - namespace.create\n\n compose:namespace:\n - read\n - update\n - delete\n - manage\n - page.create\n - module.create\n - chart.create\n - automation-script.create\n\n compose:module:\n - read\n - update\n - delete\n - record.create\n - record.read\n - record.update\n - record.delete\n - automation-trigger.manage\n\n compose:chart:\n - read\n - update\n - delete\n\n compose:page:\n - read\n - update\n - delete\n\n compose:automation-script:\n - read\n - update\n - delete\nPK\x07\x08\xe2u&+\xaf\x02\x00\x00\xaf\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00 \x001000_namespace.yamlUT\x05\x00\x01\x80Cm8namespaces:\n crm:\n name: CRM\n allow:\n everyone:\n - module.create\n - read\n deny:\n everyone:\n - delete\nPK\x07\x08\xe8\x0c\x08\xf3\x88\x00\x00\x00\x88\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00 \x001100_modules.yamlUT\x05\x00\x01\x80Cm8namespace: crm\nmodules:\n Account:\n name: Account\n fields:\n AccountName:\n label: Account Name\n kind: String\n required: true\n AccountSource:\n label: Account Source\n kind: Select\n options:\n options:\n - Customer Referral\n - Direct\n - Employee Referral\n - Event\n - Existing Customer\n - Inbound Call\n - Outbound List\n - Partner Referral\n - Seminar\n - Social Media\n - Webinar\n - Website (Organic)\n - Website (PPC)\n - Word of Mouth\n - Other\n selectType: default\n AnnualRevenue:\n label: Annual Revenue\n kind: Select\n options:\n options:\n - Less Than 500,000\n - 500,000 To 1 Million\n - 1 To 2.5 Million\n - 2.5 To 5 Million\n - 5 To 10 Million\n - 10 To 20 Million\n - 20 To 50 Million\n - 50 To 100 Million\n - 100 To 500 Million\n selectType: default\n BillingCity:\n label: Billing City\n kind: String\n BillingCountry:\n label: Billing Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n selectType: default\n BillingPostalCode:\n label: Billing Postal Code\n kind: String\n BillingState:\n label: Billing State\n kind: String\n BillingStreet:\n label: Billing Street\n kind: String\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n Facebook:\n label: Facebook\n kind: String\n Fax:\n label: Fax\n kind: String\n Industry:\n label: Industry\n kind: Select\n options:\n options:\n - \"\"\n - Agriculture\n - Apparel\n - Banking\n - Biotechnology\n - Chemicals\n - Communications\n - Construction\n - Consulting\n - Education\n - Electronics\n - Energy\n - Engineering\n - Entertainment\n - Environmental\n - Finance\n - Food & Beverage\n - Government\n - Healthcare\n - Hospitality\n - Insurance\n - Machinery\n - Manufacturing\n - Media\n - Not For Profit\n - Other\n - Recreation\n - Retail\n - Shipping\n - Technology\n - Telecommunications\n - Transportation\n - Utilities\n selectType: default\n LastViewedDate:\n label: Last Viewed Date\n kind: DateTime\n LinkedIn:\n label: LinkedIn\n kind: String\n NumberOfEmployees:\n label: Employees\n kind: Number\n options:\n format: 0\n precision: 0\n OwnerId:\n label: Account Owner\n kind: User\n options:\n presetWithAuthenticated: false\n selectType: default\n Ownership:\n label: Ownership\n kind: Select\n options:\n options:\n - Public\n - Private\n selectType: default\n ParentId:\n label: Parent Account\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n selectType: default\n Phone:\n label: Phone\n kind: String\n Rating:\n label: Rating\n kind: Select\n options:\n options:\n - \xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x85\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x86\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\n selectType: default\n ShippingCity:\n label: Shipping City\n kind: String\n ShippingCountry:\n label: Shipping Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n selectType: default\n ShippingPostalCode:\n label: Shipping Postal Code\n kind: String\n ShippingState:\n label: Shipping State\n kind: String\n ShippingStreet:\n label: Shipping Street\n kind: String\n Sic:\n label: SIC Code\n kind: String\n SicDesc:\n label: SIC Description\n kind: String\n Twitter:\n label: Twitter\n kind: String\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Channel Partner / Reseller\n - Customer - Channel\n - Customer - Direct\n - Installation Partner\n - Pending\n - Prospect\n - Technology Partner\n - Other\n selectType: default\n Website:\n label: Website\n kind: String\n AccountContactRole:\n name: AccountContactRole\n fields:\n AccountId:\n label: Account\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n ContactId:\n label: Contact\n kind: Record\n options:\n labelField: MasterRecordId\n module: Contact\n queryFields:\n - AccountId\n - MasterRecordId\n IsPrimary:\n label: Primary\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Role:\n label: Role\n kind: Select\n options:\n options:\n - Business User\n - Decision Maker\n - Economic Buyer\n - Economic Decision Maker\n - Evaluator\n - Executive Sponsor\n - Gatekeeper\n - Influencer\n - Project Manager\n - Technical Buyer\n - Other\n CampaignMember:\n name: CampaignMember\n fields:\n CampaignId:\n label: Campaign\n kind: Record\n options:\n labelField: Name\n module: Campaigns\n queryFields:\n - Name\n ContactId:\n label: Contact\n kind: Record\n options:\n labelField: Email\n module: Contact\n queryFields:\n - AccountId\n - Email\n - FirstName\n - LastName\n FirstRespondedDate:\n label: First Responded Date\n kind: DateTime\n HasResponded:\n label: Responded\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LeadId:\n label: Lead\n kind: Record\n options:\n labelField: Email\n module: Lead\n queryFields:\n - Email\n - FirstName\n - LastName\n Status:\n label: Status\n kind: Select\n options:\n options:\n - Attended\n - Registered\n - Responded\n - Viewed a Demo\n - Visited Booth\n - Viewed a Webinar\n Campaigns:\n name: Campaigns\n fields:\n ActualCost:\n label: Actual Cost\n kind: Number\n options:\n format: 0\n precision: 0\n AmountAllOpportunities:\n label: Value Opportunities in Campaign\n kind: Number\n options:\n format: 0\n precision: 0\n AmountWonOpportunities:\n label: Value Won Opportunities in Campaign\n kind: Number\n options:\n format: 0\n precision: 0\n BudgetedCost:\n label: Budgeted Cost\n kind: Number\n options:\n format: 0\n precision: 0\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n EndDate:\n label: End Date\n kind: DateTime\n options:\n onlyDate: true\n ExpectedResponse:\n label: Expected Response (%)\n kind: Number\n options:\n format: 0\n precision: 0\n ExpectedRevenue:\n label: Expected Revenue\n kind: Number\n options:\n format: 0\n precision: 0\n IsActive:\n label: Active\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LastActivityDate:\n label: Last Activity\n kind: DateTime\n LastModifiedById:\n label: Last Modified By\n kind: User\n options:\n presetWithAuthenticated: false\n LastModifiedDate:\n label: Last Modified Date\n kind: DateTime\n LastViewedDate:\n label: Last Viewed Date\n kind: DateTime\n Name:\n label: Campaign Name\n kind: String\n NumberOfContacts:\n label: Contacts in Campaign\n kind: Number\n options:\n format: 0\n precision: 0\n NumberOfConvertedLeads:\n label: Converted Leads in Campaign\n kind: Number\n options:\n format: 0\n precision: 0\n NumberOfLeads:\n label: Leads in Campaign\n kind: Number\n options:\n format: 0\n precision: 0\n NumberOfOpportunities:\n label: Opportunities in Campaign\n kind: Number\n options:\n format: 0\n precision: 0\n NumberOfResponses:\n label: Responses in Campaign\n kind: Number\n options:\n format: 0\n precision: 0\n NumberOfWonOpportunities:\n label: Won Opportunities in Campaign\n kind: Number\n options:\n format: 0\n precision: 0\n NumberSent:\n label: Num Sent\n kind: Number\n options:\n format: 0\n precision: 0\n OwnerId:\n label: Campaign Owner\n kind: User\n options:\n presetWithAuthenticated: false\n ParentId:\n label: Parent Campaign\n kind: Record\n options:\n module: Campaigns\n queryFields:\n - Name\n StartDate:\n label: Start Date\n kind: DateTime\n options:\n onlyDate: true\n Status:\n label: Status\n kind: Select\n options:\n options:\n - Aborted\n - Completed\n - In Progress\n - Planned\n - Tentative\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Lead Generation - Direct Mail\n - Lead Generation - Conference\n - Lead Generation - Email Blast\n - Lead Generation - PPC\n - Lead Generation - Seminar\n - Lead Generation - Trade Show\n - Lead Generation - Webinar\n - Lead Generation - Website\n - Brand Building - Print advertisement\n - Brand Building - Radio advertisement\n - Brand Building - TV advertisement\n - Brand Building - Sponsoring\n - Brand Building - Social Media\n - Lead Generation - Contacting personal network\n Case:\n name: Case\n fields:\n AccountId:\n label: Account Name\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n CaseNumber:\n label: Case Number\n kind: Number\n options:\n format: \"0000000\"\n precision: 0\n ClosedDate:\n label: Date/Time Closed\n kind: DateTime\n ContactId:\n label: Contact Name\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n File:\n label: File\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: list\n IsClosed:\n label: Closed\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsClosedOnCreate:\n label: Closed When Created\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsEscalated:\n label: Escalated\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Origin:\n label: Case Origin\n kind: Select\n options:\n options:\n - Email\n - Messaging\n - Phone\n - Web\n - Other\n OwnerId:\n label: Case Owner\n kind: User\n options:\n presetWithAuthenticated: false\n ParentId:\n label: Parent Case\n kind: Record\n options:\n labelField: Subject\n module: Case\n queryFields:\n - AccountId\n - CaseNumber\n - Subject\n Priority:\n label: Priority\n kind: Select\n options:\n options:\n - Low\n - Medium\n - High\n ProductId:\n label: Product\n kind: Record\n options:\n labelField: Name\n module: Product\n queryFields:\n - ProductCode\n - Name\n Reason:\n label: Case Reason\n kind: Select\n options:\n options:\n - Documentation unclear\n - Software bug\n - User didn't attend training\n - Other\n SolutionFile:\n label: Solution File\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: list\n SolutionId:\n label: Solution Record\n kind: Record\n options:\n labelField: SolutionName\n module: Solution\n queryFields:\n - SolutionNote\n - SolutionNumber\n - SolutionName\n SolutionName:\n label: Solution Title\n kind: String\n SolutionNote:\n label: Solution Details\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n Status:\n label: Status\n kind: Select\n options:\n options:\n - New\n - Working\n - Escalated\n - Closed\n Subject:\n label: Subject\n kind: String\n SubmitAsSolution:\n label: Submit as Solution Record when Case is Closed\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n SuppliedCompany:\n label: Supplied Company\n kind: String\n SuppliedEmail:\n label: Supplied Email\n kind: String\n SuppliedName:\n label: Supplied Name\n kind: String\n SuppliedPhone:\n label: Supplied Phone\n kind: String\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Bug\n - Feature Request\n - Question\n - Other\n CaseContactRole:\n name: CaseContactRole\n fields:\n CaseId:\n label: Case\n kind: Record\n options:\n labelField: Subject\n module: Case\n queryFields:\n - CaseNumber\n - Subject\n ContactId:\n label: Contact\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n IsPrimary:\n label: Primary\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Role:\n label: Role\n kind: Select\n options:\n options:\n - Business User\n - Decision Maker\n - Economic Buyer\n - Economic Decision Maker\n - Evaluator\n - Executive Sponsor\n - Gatekeeper\n - Influencer\n - Project Manager\n - Technical Buyer\n - Other\n CaseMilestone:\n name: CaseMilestone\n fields:\n CaseId:\n label: Case\n kind: Record\n options:\n labelField: Subject\n module: Case\n queryFields:\n - AccountId\n - CaseNumber\n - Subject\n CompletionDate:\n label: Completion Date\n kind: DateTime\n IsCompleted:\n label: Completed\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsViolated:\n label: Violation\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n MilestoneTypeId:\n label: Milestone Type\n kind: Record\n options:\n labelField: Name\n module: MilestoneType\n queryFields:\n - Name\n StartDate:\n label: Start Date\n kind: DateTime\n TargetDate:\n label: Target Date\n kind: DateTime\n TargetResponseInDays:\n label: Target Response (Days)\n kind: Number\n options:\n format: 0\n precision: 0\n TargetResponseInHrs:\n label: Target Response (Hours)\n kind: Number\n options:\n format: 0\n precision: 0\n TargetResponseInMins:\n label: Target Response (Mins)\n kind: Number\n options:\n format: 0\n precision: 0\n CaseUpdate:\n name: CaseUpdate\n fields:\n CaseId:\n label: Case\n kind: Record\n options:\n labelField: Subject\n module: Case\n queryFields:\n - AccountId\n - CaseNumber\n - Subject\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n File:\n label: File\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: list\n IsSolution:\n label: Marked as solution\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Email\n - Call\n - Fax\n - Letter\n - Visit\n Contact:\n name: Contact\n fields:\n AccountId:\n label: Account Name\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields: []\n AssistantName:\n label: Assistant\n kind: String\n AssistantPhone:\n label: Asst. Phone\n kind: String\n Birthdate:\n label: Birthdate\n kind: DateTime\n private: true\n Department:\n label: Department\n kind: String\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n DoNotCall:\n label: Do Not Call\n kind: Bool\n options:\n falseLabel: \"False\"\n trueLabel: Do Not Call\n Email:\n label: Email\n kind: Email\n private: true\n Facebook:\n label: Facebook\n kind: Url\n private: true\n Fax:\n label: Fax\n kind: String\n private: true\n FirstName:\n label: First Name\n kind: String\n private: true\n HasOptedOutOfEmail:\n label: Email Opt Out\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n HasOptedOutOfFax:\n label: Fax Opt Out\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n HomePhone:\n label: Home Phone\n kind: String\n private: true\n IsDeleted:\n label: Deleted\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsPrimary:\n label: Primary contact for account\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LastName:\n label: Last Name\n kind: String\n private: true\n LastViewedDate:\n label: Last Viewed Date\n kind: DateTime\n LeadSource:\n label: Lead Source\n kind: Select\n options:\n options:\n - Customer Referral\n - Direct\n - Employee Referral\n - Event\n - Existing Customer\n - Inbound Call\n - Outbound List\n - Partner Referral\n - Seminar\n - Social Media\n - Webinar\n - Website (Organic)\n - Website (PPC)\n - Word of Mouth\n - Other\n LinkedIn:\n label: LinkedIn\n kind: Url\n private: true\n MailingCity:\n label: Mailing City\n kind: String\n private: true\n MailingCountry:\n label: Mailing Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n private: true\n MailingPostalCode:\n label: Mailing Postal Code\n kind: String\n private: true\n MailingState:\n label: Mailing State\n kind: String\n private: true\n MailingStreet:\n label: Mailing Street\n kind: String\n private: true\n MasterRecordId:\n label: Contact\n kind: Record\n options:\n labelField: Email\n module: Contact\n queryFields: []\n MobilePhone:\n label: Mobile\n kind: String\n private: true\n OtherCity:\n label: Other City\n kind: String\n private: true\n OtherCountry:\n label: Other Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n private: true\n OtherPhone:\n label: Other Phone\n kind: String\n private: true\n OtherPostalCode:\n label: Other Postal Code\n kind: String\n private: true\n OtherState:\n label: Other State\n kind: String\n private: true\n OtherStreet:\n label: Other Street\n kind: String\n private: true\n OwnerId:\n label: Contact Owner\n kind: User\n options:\n presetWithAuthenticated: false\n Phone:\n label: Phone\n kind: String\n private: true\n PhotoUrl:\n label: Photo URL\n kind: Url\n private: true\n RecordLabel:\n label: Record Label\n kind: String\n private: true\n ReportsToId:\n label: Reports To\n kind: Record\n options:\n labelField: Email\n module: Contact\n queryFields:\n - AccountId\n - Email\n - FirstName\n - LastName\n Salutation:\n label: Salutation\n kind: String\n private: true\n Title:\n label: Title\n kind: String\n private: true\n Twitter:\n label: Twitter\n kind: Url\n private: true\n Contract:\n name: Contract\n fields:\n AccountId:\n label: Account Name\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n ActivatedById:\n label: Activated By\n kind: Record\n options:\n labelField: Email\n module: Contact\n queryFields:\n - AccountId\n - Email\n - FirstName\n - LastName\n ActivatedDate:\n label: Activated Date\n kind: DateTime\n BillingCity:\n label: Billing City\n kind: String\n private: true\n BillingCountry:\n label: Billing Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n private: true\n BillingPostalCode:\n label: Billing Postal Code\n kind: String\n private: true\n BillingState:\n label: Billing State\n kind: String\n private: true\n BillingStreet:\n label: Billing Street\n kind: String\n private: true\n CompanySignedDate:\n label: Company Signed Date\n kind: DateTime\n CompanySignedId:\n label: Company Signed By\n kind: Record\n options:\n labelField: Email\n module: Contact\n queryFields:\n - AccountId\n - Email\n - FirstName\n - LastName\n ContractNumber:\n label: Contract Number\n kind: Number\n options:\n format: \"0000000\"\n precision: 0\n ContractTerm:\n label: Term (months)\n kind: Number\n options:\n format: 0\n precision: 0\n CustomerSignedDate:\n label: Customer Signed Date\n kind: DateTime\n CustomerSignedId:\n label: Customer Signed By\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n CustomerSignedTitle:\n label: Customer Signed Title\n kind: String\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n EndDate:\n label: End Date\n kind: DateTime\n options:\n onlyDate: true\n File1:\n label: File 1\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: list\n File2:\n label: File 2\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: list\n File3:\n label: File 3\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: list\n File4:\n label: File 4\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: list\n LastActivityDate:\n label: Last Activity\n kind: DateTime\n LastApprovedDate:\n label: Last Approved Date\n kind: DateTime\n Name:\n label: Contract Name\n kind: String\n OwnerExpirationNotice:\n label: Owner Expiration Notice\n kind: Select\n options:\n options:\n - 3 Days\n - 5 Days\n - 7 Days\n - 14 Days\n - 30 Days\n - 45 Days\n - 60 Days\n - 75 Days\n - 90 Days\n - 120 Days\n - 180 Days\n - 240 Days\n - 300 Days\n - 365 Days\n OwnerId:\n label: Contract Owner\n kind: User\n options:\n presetWithAuthenticated: false\n RecordLabel:\n label: Record Label\n kind: String\n ShippingCity:\n label: Shipping City\n kind: String\n private: true\n ShippingCountry:\n label: Shipping Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n private: true\n ShippingPostalCode:\n label: Shipping Postal Code\n kind: String\n private: true\n ShippingState:\n label: Shipping State\n kind: String\n private: true\n ShippingStreet:\n label: Shipping Street\n kind: String\n private: true\n SpecialTerms:\n label: Special Terms\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n StartDate:\n label: Start Date\n kind: DateTime\n options:\n onlyDate: true\n Status:\n label: Status\n kind: Select\n options:\n options:\n - Draft\n - Activated\n - In Approval Process\n - Inactive (Expired)\n - Inactive (Deactivated)\n ContractContactRole:\n name: ContractContactRole\n fields:\n ContactId:\n label: Contact\n kind: Record\n options:\n labelField: Email\n module: Contact\n queryFields:\n - AccountId\n - Email\n - FirstName\n - LastName\n ContractId:\n label: Contract\n kind: Record\n options:\n labelField: Name\n module: Contract\n queryFields:\n - AccountId\n - Name\n - ContractNumber\n IsPrimary:\n label: Primary\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Role:\n label: Role\n kind: Select\n options:\n options:\n - Business User\n - Decision Maker\n - Economic Buyer\n - Economic Decision Maker\n - Evaluator\n - Executive Sponsor\n - Gatekeeper\n - Influencer\n - Project Manager\n - Technical Buyer\n - Other\n ContractLineItem:\n name: ContractLineItem\n fields:\n ContractId:\n label: 'Contract '\n kind: Record\n options:\n labelField: Name\n module: Contract\n queryFields:\n - AccountId\n - Name\n - ContractNumber\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n Discount:\n label: Discount\n kind: Number\n options:\n format: 0\n precision: 0\n EndDate:\n label: End Date\n kind: DateTime\n options:\n onlyDate: true\n LineItemNumber:\n label: Line Item Number\n kind: String\n ListPrice:\n label: List Price\n kind: Number\n options:\n format: 0\n precision: \"2\"\n suffix: \xe2\x82\xac\n PricebookEntryId:\n label: Price Book Entry\n kind: Record\n options:\n labelField: Name\n module: PricebookEntry\n queryFields:\n - ProductCode\n - Name\n Quantity:\n label: Quantity\n kind: Number\n options:\n format: 0\n precision: 0\n StartDate:\n label: Start Date\n kind: DateTime\n options:\n onlyDate: true\n Status:\n label: Status\n kind: Select\n options:\n options:\n - Active\n - Expired\n - Inactive\n Subtotal:\n label: 'Subtotal '\n kind: Number\n options:\n format: 0\n precision: \"2\"\n suffix: \xe2\x82\xac\n TotalPrice:\n label: Total Price\n kind: Number\n options:\n format: 0\n precision: \"2\"\n suffix: \xe2\x82\xac\n UnitPrice:\n label: Sales Price\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n Settings:\n name: Settings\n fields:\n CaseNextNumber:\n label: Next number for a case (updates after saving a new case)\n kind: Number\n options:\n format: \"0000000\"\n precision: 0\n ContractDefaultTime:\n label: Default time for a contract (in months)\n kind: Number\n options:\n format: 0\n precision: 0\n ContractNextNumber:\n label: Next number for a contract (updates after saving a new contract)\n kind: Number\n options:\n format: \"0000000\"\n precision: 0\n OpportunityCloseDateDays:\n label: Days for an opportunity to close\n kind: Number\n options:\n format: 0\n precision: 0\n OpportunityForecaseCategory:\n label: Forecast Category\n kind: String\n OpportunityProbability:\n label: Probability\n kind: Number\n options:\n format: 0\n precision: 0\n suffix: '%'\n OpportunityStagename:\n label: Stage\n kind: String\n QuoteExpirationDays:\n label: Days for a quote to expire\n kind: Number\n options:\n format: 0\n precision: 0\n QuoteNextNumber:\n label: Next number for a quote (updates after saving a new quote)\n kind: Number\n options:\n format: \"0000000\"\n precision: 0\n SolutionNextNumber:\n label: Next number for a solution (updates after saving a new solution)\n kind: Number\n options:\n format: \"0000000\"\n precision: 0\n EmailTemplate:\n name: EmailTemplate\n fields:\n Body:\n label: Body\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n DeveloperName:\n label: Template Unique Name\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n IsActive:\n label: Available For Use\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LastUsedDate:\n label: Last Used Date\n kind: DateTime\n Markup:\n label: Markup\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n Name:\n label: Email Template Name\n kind: String\n Subject:\n label: Subject\n kind: String\n TemplateStyle:\n label: Style\n kind: Select\n options:\n options:\n - \"\"\n TemplateType:\n label: Template Type\n kind: Select\n options:\n options:\n - \"\"\n Entitlement:\n name: Entitlement\n fields:\n AccountId:\n label: Account Name\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n CasesPerEntitlement:\n label: Cases Per Entitlement\n kind: Number\n options:\n format: 0\n precision: 0\n ContractLineItemId:\n label: Contract Line Item\n kind: Record\n options:\n labelField: ContractId\n module: ContractLineItem\n queryFields:\n - Description\n - LineItemNumber\n - ContractId\n EndDate:\n label: End Date\n kind: DateTime\n EntitlementProcess:\n label: Entitlement Process\n kind: String\n IsPerIncident:\n label: Per Incident\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LastModifiedById:\n label: Last Modified By\n kind: User\n options:\n presetWithAuthenticated: false\n LastModifiedDate:\n label: Last Modified Date\n kind: DateTime\n LastViewedDate:\n label: Last Viewed Date\n kind: DateTime\n Name:\n label: Entitlement Name\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n RemainingCases:\n label: Remaining Cases\n kind: Number\n options:\n format: 0\n precision: 0\n StartDate:\n label: Start Date\n kind: DateTime\n Status:\n label: Status\n kind: Select\n options:\n options:\n - Active\n - Expired\n - Inactive\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Web Support\n - Phone Support\n - Email Support\n - Dedicated Support\n EntitlementContact:\n name: EntitlementContact\n fields:\n CaseMilestoneTypeId:\n label: Casemilestone Type\n kind: Record\n options:\n labelField: Name\n module: MilestoneType\n queryFields:\n - Name\n ContactId:\n label: Contact Name\n kind: Record\n options:\n labelField: Email\n module: Contact\n queryFields:\n - AccountId\n - Email\n - FirstName\n - LastName\n EntitlementId:\n label: Entitlement Name\n kind: Record\n options:\n labelField: Name\n module: Entitlement\n queryFields:\n - AccountId\n - Name\n Name:\n label: Entitlement Contact\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n EntitlementTemplate:\n name: EntitlementTemplate\n fields:\n BusinessHours:\n label: Business Hours\n kind: String\n CasesPerEntitlement:\n label: Cases Per Entitlement\n kind: Number\n options:\n format: 0\n precision: 0\n IsPerIncident:\n label: Per Incident\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Name:\n label: Entitlement Template Name\n kind: String\n Term:\n label: Term (Days)\n kind: Number\n options:\n format: 0\n precision: 0\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Email\n - Messaging\n - Phone\n - Web\n Event:\n name: Event\n fields:\n AccountId:\n label: Account\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n ActivityDate:\n label: Start\n kind: DateTime\n CaseId:\n label: Case\n kind: Record\n options:\n labelField: Subject\n module: Case\n queryFields:\n - AccountId\n - CaseNumber\n - Subject\n ContactId:\n label: Contact\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n ContractId:\n label: Contract\n kind: Record\n options:\n labelField: Name\n module: Contract\n queryFields:\n - AccountId\n - Name\n - ContractNumber\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n DurationInMinutes:\n label: Duration\n kind: Number\n options:\n format: 0\n precision: 0\n EndDateTime:\n label: End\n kind: DateTime\n IsAllDayEvent:\n label: All-Day Event\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsArchived:\n label: Archived\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsPrivate:\n label: Private\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsReminderSet:\n label: Reminder Set\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LeadId:\n label: Lead\n kind: Record\n options:\n labelField: RecordLabel\n module: Lead\n queryFields:\n - RecordLabel\n Location:\n label: Location\n kind: String\n OpportunityId:\n label: Opportunity\n kind: Record\n options:\n labelField: RecordLabel\n module: Opportunity\n queryFields:\n - AccountId\n - Name\n OwnerId:\n label: Assigned To\n kind: User\n options:\n presetWithAuthenticated: false\n QuoteId:\n label: Quote\n kind: Record\n options:\n labelField: Name\n module: Quote\n queryFields:\n - AccountId\n - Name\n - QuoteNumber\n ReminderDateTime:\n label: Reminder Date/Time\n kind: DateTime\n Subject:\n label: Subject\n kind: String\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Call\n - Email\n - Meeting\n - Send Letter / Quote\n - Other\n Idea:\n name: Idea\n fields:\n Body:\n label: Idea Body\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n Categories:\n label: Categories\n kind: Select\n options:\n options:\n - Ecosystem\n - Human Resources\n - Marketing\n - Product\n - Sales\n - Services\n - Support\n CreatorName:\n label: Name of Creator\n kind: String\n ParentIdeaId:\n label: Parent Idea\n kind: Record\n options:\n labelField: Title\n module: Idea\n queryFields:\n - Title\n Status:\n label: Status\n kind: Select\n options:\n options:\n - New\n - Under Consideration\n - Accepted\n - Implemented\n - Duplicate\n Title:\n label: Title\n kind: String\n VoteScore:\n label: Vote Score\n kind: Number\n options:\n format: 0\n precision: 0\n VoteTotal:\n label: Vote Total\n kind: Number\n options:\n format: 0\n precision: 0\n Lead:\n name: Lead\n fields:\n AnnualRevenue:\n label: Annual Revenue\n kind: Select\n options:\n options:\n - Less Than 500,000\n - 500,000 To 1 Million\n - 1 To 2.5 Million\n - 2.5 To 5 Million\n - 5 To 10 Million\n - 10 To 20 Million\n - 20 To 50 Million\n - 50 To 100 Million\n - 100 To 500 Million\n selectType: default\n City:\n label: Address City\n kind: String\n private: true\n Company:\n label: Company\n kind: String\n required: true\n ConvertedAccountId:\n label: Converted Account\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n selectType: default\n ConvertedContactId:\n label: Converted Contact\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n selectType: default\n ConvertedDate:\n label: Converted Date\n kind: DateTime\n ConvertedOpportunityId:\n label: Converted Opportunity\n kind: Record\n options:\n labelField: Name\n module: Opportunity\n queryFields:\n - AccountId\n - Name\n selectType: default\n Country:\n label: Address Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n selectType: default\n private: true\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n DoNotCall:\n label: Do Not Call\n kind: Bool\n options:\n falseLabel: \"False\"\n trueLabel: Do Not Call\n Email:\n label: Email\n kind: String\n private: true\n Facebook:\n label: Facebook\n kind: Url\n private: true\n Fax:\n label: Fax\n kind: String\n private: true\n FirstName:\n label: First Name\n kind: String\n private: true\n HasOptedOutOfEmail:\n label: Email Opt Out\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n HasOptedOutOfFax:\n label: Fax Opt Out\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Industry:\n label: Industry\n kind: Select\n options:\n options:\n - \"\"\n - Agriculture\n - Apparel\n - Banking\n - Biotechnology\n - Chemicals\n - Communications\n - Construction\n - Consulting\n - Education\n - Electronics\n - Energy\n - Engineering\n - Entertainment\n - Environmental\n - Finance\n - Food & Beverage\n - Government\n - Healthcare\n - Hospitality\n - Insurance\n - Machinery\n - Manufacturing\n - Media\n - Not For Profit\n - Other\n - Recreation\n - Retail\n - Shipping\n - Technology\n - Telecommunications\n - Transportation\n - Utilities\n selectType: default\n IsConverted:\n label: Converted\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsDeleted:\n label: Deleted\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsUnreadByOwner:\n label: Unread By Owner\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LastName:\n label: Last Name\n kind: String\n private: true\n required: true\n LastTransferDate:\n label: Last Transfer Date\n kind: DateTime\n LastViewedDate:\n label: Last Viewed Date\n kind: DateTime\n LeadSource:\n label: Lead Source\n kind: Select\n options:\n options:\n - Customer Referral\n - Direct\n - Employee Referral\n - Event\n - Existing Customer\n - Inbound Call\n - Outbound List\n - Partner Referral\n - Seminar\n - Social Media\n - Webinar\n - Website (Organic)\n - Website (PPC)\n - Word of Mouth\n - Other\n selectType: default\n LinkedIn:\n label: LinkedIn\n kind: Url\n private: true\n MasterRecordId:\n label: Lead\n kind: Record\n options:\n labelField: Email\n module: Lead\n queryFields: []\n selectType: default\n MobilePhone:\n label: Mobile\n kind: String\n NumberOfEmployees:\n label: No. of Employees (exact)\n kind: Number\n options:\n format: 0\n precision: 0\n NumberOfEmployeesRange:\n label: No. of Employees (range)\n kind: Select\n options:\n options:\n - 1 - 9\n - 10 - 24\n - 25 - 49\n - 50 - 99\n - 100 - 249\n - 250 - 499\n - 500 - 999\n - 1000 - 2499\n - 2500 - 4999\n - 5000 - 9999\n - Over 10000\n selectType: default\n OwnerId:\n label: Lead Owner\n kind: User\n options:\n presetWithAuthenticated: false\n selectType: default\n Phone:\n label: Phone\n kind: String\n private: true\n PostalCode:\n label: Address Postal Code\n kind: String\n private: true\n Rating:\n label: Rating\n kind: Select\n options:\n options:\n - \xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x85\xe2\x98\x86\xe2\x98\x86\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x86\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x86\n - \xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\xe2\x98\x85\n selectType: default\n RecordLabel:\n label: Record Label\n kind: String\n private: true\n SICCode:\n label: SIC Code\n kind: Number\n options:\n format: 0\n precision: 0\n Salutation:\n label: Salutation\n kind: String\n State:\n label: Address State\n kind: String\n private: true\n Status:\n label: Lead Status\n kind: Select\n options:\n options:\n - New\n - Assigned\n - In Progress\n - Converted\n - Recycled\n - Dead\n selectType: default\n Street:\n label: Address Street\n kind: String\n private: true\n Title:\n label: Title\n kind: String\n Twitter:\n label: Twitter\n kind: Url\n private: true\n Website:\n label: Website\n kind: Url\n MilestoneType:\n name: MilestoneType\n fields:\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n Name:\n label: Name\n kind: String\n RecurrenceType:\n label: Recurrence Type\n kind: Select\n options:\n options:\n - No Recurrence\n - Independent\n - Sequential\n Note:\n name: Note\n fields:\n AccountContactRoleId:\n label: Account Contact Role\n kind: Record\n options:\n labelField: Role\n module: AccountContactRole\n queryFields:\n - AccountId\n - ContactId\n - Role\n AccountId:\n label: Account\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n Body:\n label: Body\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n CampaignId:\n label: Campaign\n kind: Record\n options:\n labelField: Name\n module: Campaigns\n queryFields:\n - Name\n CampaignMemberId:\n label: Campaign Member\n kind: Record\n options:\n labelField: CampaignId\n module: CampaignMember\n queryFields:\n - CampaignId\n - ContactId\n - LeadId\n CaseContactRoleId:\n label: Case Contact Role\n kind: Record\n options:\n labelField: Role\n module: CaseContactRole\n queryFields:\n - CaseId\n - Role\n CaseId:\n label: Case\n kind: Record\n options:\n labelField: Subject\n module: Case\n queryFields:\n - AccountId\n - CaseNumber\n - Subject\n CaseMilestoneId:\n label: Case Milestone\n kind: Record\n options:\n labelField: CaseId\n module: CaseMilestone\n queryFields:\n - CaseId\n - MilestoneTypeId\n ContactId:\n label: Contact\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n ContractContactRoleId:\n label: Contract Contact Role\n kind: Record\n options:\n labelField: ContactId\n module: ContractContactRole\n queryFields:\n - ContactId\n - ContractId\n ContractId:\n label: Contract\n kind: Record\n options:\n labelField: Name\n module: Contract\n queryFields:\n - AccountId\n - Name\n - ContractNumber\n ContractLineItemId:\n label: Contract Line Item\n kind: Record\n options:\n labelField: PricebookEntryId\n module: ContractLineItem\n queryFields:\n - PricebookEntryId\n EmailTemplateId:\n label: Email Template\n kind: Record\n options:\n labelField: Subject\n module: EmailTemplate\n queryFields:\n - Subject\n EntitlementContactId:\n label: Entitlement Contact\n kind: Record\n options:\n labelField: EntitlementId\n module: EntitlementContact\n queryFields:\n - EntitlementId\n EntitlementId:\n label: Entitlement\n kind: Record\n options:\n labelField: Name\n module: Entitlement\n queryFields:\n - Name\n EntitlementTemplateId:\n label: Entitlement Template\n kind: Record\n options:\n labelField: Name\n module: EntitlementTemplate\n queryFields:\n - Name\n EventId:\n label: Event\n kind: Record\n options:\n labelField: Subject\n module: Event\n queryFields:\n - Subject\n FileAdd1:\n label: File 1\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: grid\n FileAdd2:\n label: File 2\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: grid\n FileAdd3:\n label: File 3\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: grid\n FileAdd4:\n label: File 4\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: grid\n IsPrivate:\n label: Private\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LeadId:\n label: Lead\n kind: Record\n options:\n labelField: RecordLabel\n module: Lead\n queryFields:\n - RecordLabel\n OpportunityCompetitorId:\n label: Opportunity Competitor\n kind: Record\n options:\n labelField: CompetitorName\n module: OpportunityCompetitor\n queryFields:\n - CompetitorName\n OpportunityContactRoleId:\n label: Opportunity Contact Role\n kind: Record\n options:\n labelField: ContactId\n module: OpportunityContactRole\n queryFields:\n - ContactId\n - Role\n OpportunityId:\n label: Opportunity\n kind: Record\n options:\n labelField: Name\n module: Opportunity\n queryFields:\n - AccountId\n - Name\n OpportunityLineItemId:\n label: Opportunity Line Item\n kind: Record\n options:\n labelField: ProductId\n module: OpportunityLineItem\n queryFields:\n - Description\n - Name\n - ProductId\n PricebookEntryId:\n label: Pricebook Entry\n kind: Record\n options:\n labelField: Name\n module: PricebookEntry\n queryFields:\n - ProductCode\n - Name\n PricebookId:\n label: Pricebook\n kind: Record\n options:\n labelField: Name\n module: Pricebook\n queryFields:\n - Name\n ProductId:\n label: Product\n kind: Record\n options:\n labelField: Name\n module: Product\n queryFields:\n - ProductCode\n - Name\n QuoteId:\n label: Quote\n kind: Record\n options:\n labelField: Name\n module: Quote\n queryFields:\n - AccountId\n - Name\n - QuoteNumber\n TaskId:\n label: Task\n kind: Record\n options:\n labelField: Subject\n module: Task\n queryFields:\n - Subject\n Title:\n label: Title\n kind: String\n Opportunity:\n name: Opportunity\n fields:\n AccountId:\n label: Account Name\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n selectType: default\n Amount:\n label: Amount\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n Authority:\n label: Authority\n kind: String\n options:\n multiLine: true\n Budget:\n label: Budget\n kind: String\n options:\n multiLine: true\n CampaignId:\n label: Primary Campaign Source\n kind: Record\n options:\n labelField: Name\n module: Campaigns\n queryFields:\n - Name\n selectType: default\n CloseDate:\n label: Close Date\n kind: DateTime\n Competition:\n label: Competition\n kind: String\n options:\n multiLine: true\n ContractId:\n label: Contract\n kind: Record\n options:\n labelField: Name\n module: Contract\n queryFields:\n - AccountId\n - Name\n - ContractNumber\n selectType: default\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n ExpectedRevenue:\n label: Expected Revenue\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n FiscalQuarter:\n label: Fiscal Period\n kind: Number\n options:\n format: 0\n precision: 0\n FiscalYear:\n label: Fiscal Period\n kind: Number\n options:\n format: 0\n precision: 0\n ForecastCategory:\n label: Forecast Category\n kind: Select\n options:\n options:\n - Pipeline\n - Best Case\n - Commit\n selectType: default\n HasOpportunityLineItem:\n label: Has Line Item\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsClosed:\n label: Closed\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsPrivate:\n label: Private\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsWon:\n label: Won\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LeadSource:\n label: Lead Source\n kind: Select\n options:\n options:\n - Customer Referral\n - Direct\n - Employee Referral\n - Event\n - Existing Customer\n - Inbound Call\n - Outbound List\n - Partner Referral\n - Seminar\n - Social Media\n - Webinar\n - Website (Organic)\n - Website (PPC)\n - Word of Mouth\n - Other\n selectType: default\n Name:\n label: Opportunity Name\n kind: String\n Need:\n label: Need\n kind: String\n options:\n multiLine: true\n NextStep:\n label: Next Step\n kind: String\n OwnerId:\n label: Opportunity Owner\n kind: User\n options:\n presetWithAuthenticated: false\n selectType: default\n PricebookId:\n label: Price Book\n kind: Record\n options:\n labelField: Name\n module: Pricebook\n queryFields:\n - Name\n selectType: default\n Probability:\n label: Probability (%)\n kind: Number\n options:\n format: 0\n precision: 0\n suffix: '%'\n RecordLabel:\n label: Record Label\n kind: String\n StageName:\n label: Stage\n kind: Select\n options:\n options:\n - Qualification\n - Need Analysis\n - Proposal\n - Negotiation\n - Closed Won\n - Closed Lost\n selectType: default\n Timeline:\n label: Timeline\n kind: String\n options:\n multiLine: true\n TotalOpportunityQuantity:\n label: Quantity\n kind: Number\n options:\n format: 0\n precision: 0\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Exisiting Business\n - New Business\n selectType: default\n OpportunityCompetitor:\n name: OpportunityCompetitor\n fields:\n CompetitorName:\n label: Competitor Name\n kind: String\n OpportunityId:\n label: Opportunity\n kind: Record\n options:\n labelField: Name\n module: Opportunity\n queryFields:\n - AccountId\n - Name\n Strengths:\n label: Strengths\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n Weaknesses:\n label: Weaknesses\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n OpportunityContactRole:\n name: OpportunityContactRole\n fields:\n ContactId:\n label: Contact\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n IsPrimary:\n label: Primary\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n OpportunityId:\n label: Opportunity\n kind: Record\n options:\n labelField: Name\n module: Opportunity\n queryFields: []\n Role:\n label: Role\n kind: Select\n options:\n options:\n - Business User\n - Decision Maker\n - Economic Buyer\n - Economic Decision Maker\n - Evaluator\n - Executive Sponsor\n - Gatekeeper\n - Influencer\n - Project Manager\n - Technical Buyer\n - Other\n OpportunityLineItem:\n name: OpportunityLineItem\n fields:\n Description:\n label: Line Description\n kind: String\n Discount:\n label: Discount\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n ListPrice:\n label: List Price\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n Name:\n label: Opportunity Product Name\n kind: String\n OpportunityId:\n label: Opportunity\n kind: Record\n options:\n labelField: Name\n module: Opportunity\n queryFields:\n - AccountId\n - Name\n PricebookEntryId:\n label: Price Book Entry\n kind: Record\n options:\n labelField: Name\n module: PricebookEntry\n queryFields:\n - ProductCode\n - Name\n ProductCode:\n label: Product Code\n kind: String\n ProductId:\n label: Product\n kind: Record\n options:\n labelField: Name\n module: Product\n queryFields: []\n Quantity:\n label: Quantity\n kind: Number\n options:\n format: 0\n precision: 0\n ServiceDate:\n label: Date\n kind: DateTime\n SortOrder:\n label: Sort Order\n kind: Number\n options:\n format: 0\n precision: 0\n Subtotal:\n label: Subtotal\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n TotalPrice:\n label: Total Price\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n UnitPrice:\n label: Sales Price\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n Pricebook:\n name: Pricebook\n fields:\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n IsActive:\n label: Active\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsStandard:\n label: Is Standard Price Book\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Name:\n label: Price Book Name\n kind: String\n PricebookEntry:\n name: PricebookEntry\n fields:\n IsActive:\n label: Active\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Name:\n label: Product Name\n kind: String\n PricebookId:\n label: Price Book\n kind: Record\n options:\n labelField: Name\n module: Pricebook\n queryFields:\n - Name\n ProductCode:\n label: Product Code\n kind: String\n ProductId:\n label: Product\n kind: Record\n options:\n labelField: Name\n module: Product\n queryFields:\n - ProductCode\n - Name\n UnitPrice:\n label: List Price\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n UseStandardPrice:\n label: Use Standard Price\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Product:\n name: Product\n fields:\n Description:\n label: Product Description\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n Family:\n label: Product Family\n kind: Select\n options:\n options:\n - Crust Core\n - Crust Add-On\n IsActive:\n label: Active\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n Name:\n label: Product Name\n kind: String\n ProductCode:\n label: Product Code\n kind: String\n Question:\n name: Question\n fields:\n BestReplyId:\n label: Best Reply\n kind: Record\n options:\n labelField: Name\n module: Reply\n queryFields:\n - Name\n Body:\n label: Question Body\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n NumReplies:\n label: Number of Replies\n kind: Number\n options:\n format: 0\n precision: 0\n Title:\n label: Question Title\n kind: String\n UpVotes:\n label: Up Votes\n kind: Number\n options:\n format: 0\n precision: 0\n VoteScore:\n label: Vote Score\n kind: Number\n options:\n format: 0\n precision: 0\n Quote:\n name: Quote\n fields:\n AccountId:\n label: Account Name\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n AdditionalCity:\n label: Additional To City\n kind: String\n AdditionalCountry:\n label: Additional To Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n AdditionalName:\n label: Additional To Name\n kind: String\n AdditionalPostalCode:\n label: Additional To Postal Code\n kind: String\n AdditionalState:\n label: Additional To State\n kind: String\n AdditionalStreet:\n label: Additional To Street\n kind: String\n BillingCity:\n label: Bill To City\n kind: String\n BillingCountry:\n label: Bill To Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n BillingName:\n label: Bill To Name\n kind: String\n BillingPostalCode:\n label: Bill To Postal Code\n kind: String\n BillingState:\n label: Bill To State\n kind: String\n BillingStreet:\n label: Bill To Street\n kind: String\n ContactId:\n label: Contact Name\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n Description:\n label: Description\n kind: String\n options:\n multiLine: true\n Discount:\n label: Additional Discount\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n Email:\n label: Email\n kind: Email\n ExpirationDate:\n label: Expiration Date\n kind: DateTime\n Fax:\n label: Fax\n kind: String\n GrandTotal:\n label: Grand Total (calculated)\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n LineItemCount:\n label: Line Items\n kind: Number\n options:\n format: 0\n precision: 0\n Name:\n label: Quote Name\n kind: String\n OpportunityId:\n label: Opportunity Name\n kind: Record\n options:\n labelField: Name\n module: Opportunity\n queryFields:\n - AccountId\n - Name\n Phone:\n label: Phone\n kind: String\n PricebookId:\n label: Pricebook\n kind: Record\n options:\n labelField: Name\n module: Pricebook\n queryFields:\n - Name\n QuoteNumber:\n label: Quote Number\n kind: Number\n options:\n format: \"0000000\"\n precision: 0\n QuoteToCity:\n label: Quote To City\n kind: String\n QuoteToCountry:\n label: Quote To Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n QuoteToName:\n label: Quote To Name\n kind: String\n QuoteToPostalCode:\n label: Quote To Postal Code\n kind: String\n QuoteToState:\n label: Quote To State\n kind: String\n QuoteToStreet:\n label: Quote To Street\n kind: String\n RecordLabel:\n label: Record Label\n kind: String\n ShippingCity:\n label: Ship To City\n kind: String\n ShippingCountry:\n label: Ship To Country\n kind: Select\n options:\n options:\n - Afghanistan\n - \xc3\x85land Islands\n - Albania\n - Algeria\n - American Samoa\n - Andorra\n - Angola\n - Anguilla\n - Antarctica\n - Antigua And Barbuda\n - Argentina\n - Armenia\n - Aruba\n - Australia\n - Austria\n - Azerbaijan\n - Bahamas\n - Bahrain\n - Bangladesh\n - Barbados\n - Belarus\n - Belgium\n - Belize\n - Benin\n - Bermuda\n - Bhutan\n - Bolivia\n - Bosnia And Herzegovina\n - Botswana\n - Bouvet Island\n - Brazil\n - British Indian Ocean Territory\n - Brunei Darussalam\n - Bulgaria\n - Burkina Faso\n - Burundi\n - Cambodia\n - Cameroon\n - Canada\n - Cape Verde\n - Cayman Islands\n - Central African Republic\n - Chad\n - Chile\n - China\n - Christmas Island\n - Cocos (Keeling) Islands\n - Colombia\n - Comoros\n - Congo\n - Congo; The Democratic Republic Of The\n - Cook Islands\n - Costa Rica\n - Cote D'ivoire\n - Croatia\n - Cuba\n - Cyprus\n - Czechia\n - Denmark\n - Djibouti\n - Dominica\n - Dominican Republic\n - Ecuador\n - Egypt\n - El Salvador\n - Equatorial Guinea\n - Eritrea\n - Estonia\n - Ethiopia\n - Falkland Islands (Malvinas)\n - Faroe Islands\n - Fiji\n - Finland\n - France\n - French Guiana\n - French Polynesia\n - French Southern Territories\n - Gabon\n - Gambia\n - Georgia\n - Germany\n - Ghana\n - Gibraltar\n - Greece\n - Greenland\n - Grenada\n - Guadeloupe\n - Guam\n - Guatemala\n - Guernsey\n - Guinea\n - Guinea-bissau\n - Guyana\n - Haiti\n - Heard Island And Mcdonald Islands\n - Holy See (Vatican City State)\n - Honduras\n - Hong Kong\n - Hungary\n - Iceland\n - India\n - Indonesia\n - Iran; Islamic Republic Of\n - Iraq\n - Ireland\n - Isle Of Man\n - Israel\n - Italy\n - Jamaica\n - Japan\n - Jersey\n - Jordan\n - Kazakhstan\n - Kenya\n - Kiribati\n - Korea; Democratic People's Republic Of\n - Korea; Republic Of\n - Kuwait\n - Kyrgyzstan\n - Lao People's Democratic Republic\n - Latvia\n - Lebanon\n - Lesotho\n - Liberia\n - Libyan Arab Jamahiriya\n - Liechtenstein\n - Lithuania\n - Luxembourg\n - Macao\n - Macedonia; The Former Yugoslav Republic Of\n - Madagascar\n - Malawi\n - Malaysia\n - Maldives\n - Mali\n - Malta\n - Marshall Islands\n - Martinique\n - Mauritania\n - Mauritius\n - Mayotte\n - Mexico\n - Micronesia; Federated States Of\n - Moldova; Republic Of\n - Monaco\n - Mongolia\n - Montenegro\n - Montserrat\n - Morocco\n - Mozambique\n - Myanmar\n - Namibia\n - Nauru\n - Nepal\n - Netherlands\n - Netherlands Antilles\n - New Caledonia\n - New Zealand\n - Nicaragua\n - Niger\n - Nigeria\n - Niue\n - Norfolk Island\n - Northern Mariana Islands\n - Norway\n - Oman\n - Pakistan\n - Palau\n - Palestinian Territory; Occupied\n - Panama\n - Papua New Guinea\n - Paraguay\n - Peru\n - Philippines\n - Pitcairn\n - Poland\n - Portugal\n - Puerto Rico\n - Qatar\n - Reunion\n - Romania\n - Russian Federation\n - Rwanda\n - Saint Helena\n - Saint Kitts And Nevis\n - Saint Lucia\n - Saint Pierre And Miquelon\n - Saint Vincent And The Grenadines\n - Samoa\n - San Marino\n - Sao Tome And Principe\n - Saudi Arabia\n - Senegal\n - Serbia\n - Seychelles\n - Sierra Leone\n - Singapore\n - Slovakia\n - Slovenia\n - Solomon Islands\n - Somalia\n - South Africa\n - South Georgia And The South Sandwich Islands\n - Spain\n - Sri Lanka\n - Sudan\n - Suriname\n - Svalbard And Jan Mayen\n - Swaziland\n - Sweden\n - Switzerland\n - Syrian Arab Republic\n - Taiwan; Province Of China\n - Tajikistan\n - Tanzania; United Republic Of\n - Thailand\n - Timor-leste\n - Togo\n - Tokelau\n - Tonga\n - Trinidad And Tobago\n - Tunisia\n - Turkey\n - Turkmenistan\n - Turks And Caicos Islands\n - Tuvalu\n - Uganda\n - Ukraine\n - United Arab Emirates\n - United Kingdom\n - United States\n - United States Minor Outlying Islands\n - Uruguay\n - Uzbekistan\n - Vanuatu\n - Venezuela\n - Viet Nam\n - Virgin Islands; British\n - Virgin Islands; U.S.\n - Wallis And Futuna\n - Western Sahara\n - Yemen\n - Zambia\n - Zimbabwe\n ShippingHandling:\n label: Shipping and Handling\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n ShippingName:\n label: Ship To Name\n kind: String\n ShippingPostalCode:\n label: Ship To Postal Code\n kind: String\n ShippingState:\n label: Ship To State\n kind: String\n ShippingStreet:\n label: Ship To Street\n kind: String\n Status:\n label: Status\n kind: Select\n options:\n options:\n - Draft\n - Needs Review\n - In Review\n - Approved\n - Rejected\n - Presented\n - Accepted\n - Denied\n Subtotal:\n label: Subtotal (calculated)\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n Tax:\n label: Tax\n kind: Number\n options:\n format: 0\n precision: 0\n suffix: '%'\n TotalPrice:\n label: Total Price (calculated)\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n QuoteLineItem:\n name: QuoteLineItem\n fields:\n Description:\n label: Line Description\n kind: String\n Discount:\n label: Discount\n kind: Number\n options:\n format: 0\n precision: \"2\"\n suffix: \xe2\x82\xac\n LineItemDescription:\n label: Line Item Description\n kind: String\n options:\n multiLine: true\n LineItemNumber:\n label: Line Item Number\n kind: String\n ListPrice:\n label: List Price\n kind: Number\n options:\n format: 0\n precision: \"2\"\n suffix: \xe2\x82\xac\n PricebookEntryId:\n label: Price Book Entry\n kind: Record\n options:\n labelField: Name\n module: PricebookEntry\n queryFields:\n - ProductCode\n - Name\n ProductCode:\n label: Product Code\n kind: String\n ProductId:\n label: Product\n kind: Record\n options:\n labelField: Name\n module: Product\n queryFields:\n - ProductCode\n - Name\n Quantity:\n label: Quantity\n kind: Number\n options:\n format: 0\n precision: 0\n QuoteId:\n label: Quote\n kind: Record\n options:\n labelField: Name\n module: Quote\n queryFields:\n - AccountId\n - Name\n - QuoteNumber\n ServiceDate:\n label: Date\n kind: DateTime\n SortOrder:\n label: Sort Order\n kind: Number\n options:\n format: 0\n precision: 0\n Subtotal:\n label: Subtotal\n kind: Number\n options:\n format: 0\n precision: \"2\"\n suffix: \xe2\x82\xac\n TotalPrice:\n label: Total Price\n kind: Number\n options:\n format: 0\n precision: \"2\"\n suffix: \xe2\x82\xac\n UnitPrice:\n label: Sales Price\n kind: Number\n options:\n format: 0\n precision: 2\n suffix: \xe2\x82\xac\n Reply:\n name: Reply\n fields:\n Body:\n label: Reply Body\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n DownVotes:\n label: Down Votes\n kind: Number\n options:\n format: 0\n precision: 0\n IdeaId:\n label: Idea\n kind: Record\n options:\n labelField: Title\n module: Idea\n queryFields:\n - Title\n Name:\n label: Name\n kind: String\n QuestionId:\n label: Question\n kind: Record\n options:\n labelField: Title\n module: Question\n queryFields:\n - Title\n UpVotes:\n label: Up Votes\n kind: Number\n options:\n format: 0\n precision: 0\n VoteTotal:\n label: Vote Total\n kind: Number\n options:\n format: 0\n precision: 0\n Solution:\n name: Solution\n fields:\n CaseId:\n label: Case\n kind: Record\n options:\n labelField: Subject\n module: Case\n queryFields:\n - AccountId\n - CaseNumber\n - Subject\n File:\n label: File\n kind: File\n options:\n allowDocuments: false\n allowImages: false\n mode: list\n IsPublished:\n label: Public\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsReviewed:\n label: Reviewed\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n ProductId:\n label: Product\n kind: Record\n options:\n labelField: Name\n module: Product\n queryFields:\n - ProductCode\n - Name\n SolutionName:\n label: Solution Title\n kind: String\n SolutionNote:\n label: Solution Details\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n SolutionNumber:\n label: Solution Number\n kind: Number\n options:\n format: \"0000000\"\n precision: 0\n Status:\n label: Status\n kind: Select\n options:\n options:\n - New\n - Pending review\n - Accepted\n - Obsolete\n - Duplicate\n Task:\n name: Task\n fields:\n AccountId:\n label: Account\n kind: Record\n options:\n labelField: AccountName\n module: Account\n queryFields:\n - AccountName\n selectType: default\n ActivityDate:\n label: Due Date\n kind: DateTime\n CallDisposition:\n label: Call Result\n kind: String\n CallDurationInSeconds:\n label: Call Duration\n kind: Number\n options:\n format: 0\n precision: 0\n CallObject:\n label: Call Object Identifier\n kind: String\n CallType:\n label: Call Type\n kind: Select\n options:\n options:\n - Internal\n - Inbound\n - Outbound\n selectType: default\n CaseId:\n label: Case\n kind: Record\n options:\n labelField: Subject\n module: Case\n queryFields:\n - AccountId\n - CaseNumber\n - Subject\n selectType: default\n ContactId:\n label: Contact\n kind: Record\n options:\n labelField: RecordLabel\n module: Contact\n queryFields:\n - RecordLabel\n selectType: default\n ContractId:\n label: Contract\n kind: Record\n options:\n labelField: Name\n module: Contract\n queryFields:\n - AccountId\n - Name\n - ContractNumber\n selectType: default\n Description:\n label: Comments\n kind: String\n options:\n multiLine: true\n useRichTextEditor: true\n IsClosed:\n label: Closed\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n IsReminderSet:\n label: Reminder Set\n kind: Bool\n options:\n falseLabel: \"No\"\n trueLabel: \"Yes\"\n LeadId:\n label: Lead\n kind: Record\n options:\n labelField: RecordLabel\n module: Lead\n queryFields:\n - RecordLabel\n selectType: default\n OpportunityId:\n label: Opportunity\n kind: Record\n options:\n labelField: Name\n module: Opportunity\n queryFields:\n - AccountId\n - Name\n selectType: default\n OwnerId:\n label: Assigned To\n kind: User\n options:\n presetWithAuthenticated: false\n selectType: default\n Priority:\n label: Priority\n kind: Select\n options:\n options:\n - High\n - Normal\n - Low\n selectType: default\n QuoteId:\n label: Quote\n kind: Record\n options:\n labelField: Name\n module: Quote\n queryFields:\n - AccountId\n - Name\n - QuoteNumber\n selectType: default\n ReminderDateTime:\n label: Reminder Date/Time\n kind: DateTime\n Status:\n label: Status\n kind: Select\n options:\n options:\n - Open\n - Completed\n selectType: default\n Subject:\n label: Subject\n kind: String\n Type:\n label: Type\n kind: Select\n options:\n options:\n - Call\n - Email\n - Send letter\n - Send Quote\n - Send Message\n - Other\n selectType: default\n Vote:\n name: Vote\n fields:\n IdeaId:\n label: Idea\n kind: Record\n options:\n labelField: Title\n module: Idea\n queryFields:\n - Title\n QuestionId:\n label: Question\n kind: Record\n options:\n labelField: Title\n module: Question\n queryFields:\n - Title\n ReplyId:\n label: Reply\n kind: Record\n options:\n labelField: Name\n module: Reply\n queryFields:\n - Name\n Score:\n label: Score\n kind: Number\n options:\n format: 0\n precision: 0\nPK\x07\x08r<\x06\xf9\xc9-\x02\x00\xc9-\x02\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00 \x001200_charts.yamlUT\x05\x00\x01\x80Cm8namespace: crm\ncharts:\n LeadsByCountry:\n name: Leads by country\n config:\n reports:\n - metrics:\n - backgroundColor: '#e5a83b'\n beginAtZero: true\n field: count\n fixTooltips: true\n label: Number of leads\n type: bar\n dimensions:\n - conditions: {}\n field: Country\n modifier: (no grouping / buckets)\n module: Lead\n LeadsBySource:\n name: Leads by source\n config:\n reports:\n - metrics:\n - backgroundColor: '#36d436'\n beginAtZero: true\n field: count\n label: Number of leads\n type: bar\n dimensions:\n - conditions: {}\n field: LeadSource\n modifier: (no grouping / buckets)\n module: Lead\n LeadsByType:\n name: Leads by type\n config:\n reports:\n - metrics:\n - backgroundColor: '#63da1a'\n beginAtZero: true\n field: count\n label: Number of leads\n type: bar\n dimensions:\n - conditions: {}\n field: Status\n modifier: (no grouping / buckets)\n module: Lead\n LeadsPerDay:\n name: Leads per day\n config:\n reports:\n - metrics:\n - aggregate: SUM\n axisType: linear\n backgroundColor: '#fc7507'\n beginAtZero: true\n field: count\n fill: false\n label: Leads per day\n type: line\n dimensions:\n - conditions: {}\n field: created_at\n modifier: DATE\n module: Lead\n OpportunitiesByValue:\n name: Opportunities by value\n config:\n reports:\n - metrics:\n - aggregate: SUM\n backgroundColor: '#5977ff'\n beginAtZero: true\n field: Amount\n label: Total value\n type: bar\n dimensions:\n - conditions: {}\n field: StageName\n modifier: (no grouping / buckets)\n module: Opportunity\n QuarterlyPerformance:\n name: Quarterly performance\n config:\n reports:\n - filter: Amount > 0\n metrics:\n - aggregate: SUM\n axisPosition: left\n axisType: linear\n backgroundColor: '#009eff'\n beginAtZero: true\n field: Amount\n fill: true\n label: Amount\n type: line\n dimensions:\n - autoSkip: true\n conditions: {}\n field: CloseDate\n modifier: QUARTER\n module: Opportunity\nPK\x07\x08\x18\x18\xf1\xc2\xb0 \x00\x00\xb0 \x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00 \x001300_scripts.yamlUT\x05\x00\x01\x80Cm8namespace: crm\nscripts:\n AccountCreateNewOpportunity:\n source: |-\n //Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n let opportunityCloseDays = settings.values.OpportunityCloseDateDays\n let opportunityProbability = settings.values.OpportunityProbability\n let opportunityForecaseCategory = settings.values.OpportunityForecaseCategory\n let opportunityStagename = settings.values.OpportunityStagename\n\n //Calculate the expiration date\n let m = new Date()\n m.setDate(m.getDate() + parseInt(opportunityCloseDays, 10))\n let closeDate = m.getUTCFullYear() + \"/\" + (m.getUTCMonth() + 1) + \"/\" + m.getUTCDate() + \" \" + m.getUTCHours() + \":\" + m.getUTCMinutes() + \":\" + m.getUTCSeconds()\n\n // Find the contact we want to link the new case to (by default, the primary contact)\n return Compose.findRecords(`AccountId = ${$record.recordID}`, 'Contact')\n\n .then(({ set, filter }) => {\n\n let ContactId, SuppliedName, SuppliedEmail, SuppliedPhone\n\n // Loop through the contacts of the account, to save the primary contact\n set.forEach(r => {\n\n //Check if it's the primary contact\n let contactIsPrimary = r.values.IsPrimary\n if (contactIsPrimary === '1') {\n\n //Add the contact\n ContactId = r.recordID\n }\n })\n\n // Create the related opportunity\n return Compose.makeRecord({\n 'OwnerId': $record.values.OwnerId,\n 'LeadSource': $record.values.LeadSource,\n 'Name': '(unnamed)',\n 'AccountId': $record.recordID,\n 'IsClosed': 'No',\n 'IsWon': 'No',\n 'CloseDate': closeDate,\n 'Probability': opportunityProbability,\n 'ForecastCategory': opportunityForecaseCategory,\n 'StageName': opportunityStagename\n }, 'Opportunity')\n\n .then(myOpportunity => {\n\n return Compose.saveRecord(myOpportunity)\n\n }).then(mySavedOpportunity => {\n\n //Create a new contact linked to the opportunity\n return Compose.makeRecord({\n 'ContactId': ContactId,\n 'OpportunityId': mySavedOpportunity.recordID,\n 'IsPrimary': '1'\n }, 'OpportunityContactRole')\n\n .then(myOpportunityContactRole => {\n\n return Compose.saveRecord(myOpportunityContactRole)\n\n .then(() => {\n\n // Notify current user\n ComposeUI.success(`The new opportunity has been created.`)\n\n\n }).then(() => {\n\n // Go to the record\n ComposeUI.gotoRecordEditor(mySavedOpportunity)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Account\n resource: compose:record\n CaseInsertCaseNumber:\n source: |-\n //Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n // Map the case number\n let nextCaseNumber = settings.values.CaseNextNumber\n if (typeof nextCaseNumber == \"undefined\" || nextCaseNumber === '' || isNaN(nextCaseNumber)) {\n nextCaseNumber = 0\n }\n\n $record.values.CaseNumber = nextCaseNumber\n let nextCaseNumberUpdated = parseInt(nextCaseNumber,10) + 1\n\n // Update the config\n settings.values.CaseNextNumber = nextCaseNumberUpdated\n return Compose.saveRecord(settings).then(mySavedSettings => {\n\n console.log('Record saved, new ID', mySavedSettings.recordID)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: false\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: beforeCreate\n module: Case\n resource: compose:record\n CaseInformContactOfSolution:\n source: |-\n // Check if the case is solved\n if (!$record.values.Status === 'Closed') {\n\n // Get the to address\n let to = $record.values.SuppliedEmail\n if (!to) {\n ComposeUI.warning(`There is no supplied email. Please fill in an email address in the supplied email field.`)\n return\n }\n\n // Get email body\n let html = \"

Solution of case: \" + $record.values.CaseNumber + \" - \" + $record.values.Subject + \"

\"\n html = html + \"
\"\n html = html + \"Solution Title: \" + $record.values.SolutionName + \"
\"\n html = html + \"Solution Details: \" + $record.values.SolutionNote\n\n // Send the email\n return Compose.sendMail(to, `Corteza - Quote: ${$record.values.QuoteNumber} - ${$record.values.Name}`, { html: html }).then(() => {\n ComposeUI.success(`The case solutoin has been sent via email.`)\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n } else {\n ComposeUI.warning(`You can only inform the client of a solution when the case status is \"Closed\".`)\n return\n }\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Case\n resource: compose:record\n ContactSetRecordLabel:\n source: |-\n // Set the record label string\n let recordLabel = ''\n\n // Get the first name\n let firstName = $record.values.FirstName\n if (!firstName) {\n firstName = ''\n }\n\n // Get the last name\n let lastName = $record.values.LastName\n if (!lastName) {\n lastName = ''\n }\n\n // Create the full name\n let fullName = ''\n if ((firstName !== '') && (lastName === '')) {\n recordLabel = firstName\n }\n\n if ((firstName === '') && (lastName !== '')) {\n recordLabel = lastName\n }\n\n if ((firstName !== '') && (lastName !== '')) {\n recordLabel = firstName + ' ' + lastName\n }\n\n // Get the company name from the account\n // Check if there is a related account, to map the fields of the account\n let accountId = $record.values.AccountId\n if (accountId) {\n return Compose.findRecordByID(accountId, 'Account').then(accountRecord => {\n\n // Add to the record label\n recordLabel = recordLabel + ' (' + accountRecord.values.AccountName + ')'\n $record.values.RecordLabel = recordLabel\n\n }).catch(err => {\n // solve the problem\n $record.values.RecordLabel = recordLabel\n\n console.error(err)\n })\n\n }\n async: false\n runInUA: false\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: beforeUpdate\n module: Contact\n resource: compose:record\n - event: beforeCreate\n module: Contact\n resource: compose:record\n LeadSetRecordLabel:\n source: |-\n // Set the record label string\n let recordLabel = ''\n\n // Get the first name\n let firstName = $record.values.FirstName\n if (!firstName) {\n fistName = ''\n }\n\n // Get the last name\n let lastName = $record.values.LastName\n if (!lastName) {\n lastName = ''\n }\n\n // Create the full name\n let fullName = ''\n if ((firstName !== '') && (lastName === '')) {\n recordLabel = firstName\n }\n\n if ((firstName === '') && (lastName !== '')) {\n recordLabel = lastName\n }\n\n if ((firstName !== '') && (lastName !== '')) {\n recordLabel = firstName + ' ' + lastName\n }\n\n // Get the company name\n let company = $record.values.Company\n if (!company) {\n company = ''\n }\n\n // Add the company name (if there is one)\n if (company !== '') {\n recordLabel = recordLabel + ' (' + company + ')'\n }\n\n // Set the label\n $record.values.RecordLabel = recordLabel\n async: false\n runInUA: false\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: beforeUpdate\n module: Lead\n resource: compose:record\n - event: beforeCreate\n module: Lead\n resource: compose:record\n QuoteApproveQuote:\n source: |-\n //Check if the quote has the correct status\n if ($record.values.Status !== 'In Review') {\n // Inform\n ComposeUI.warning(`A quote needs to have the status In Review in order to be approved.`)\n return true\n }\n\n //Change value\n $record.values.Status = 'Approved'\n\n return Compose.saveRecord($record)\n .then(mySavedRecord => {\n\n // Get the email of the owner\n return System.findUserByID($record.createdBy).then(user => {\n\n // Send the mail\n return Compose.sendMail(\n user.email,\n `Quote \"${$record.values.Name}\" has been approved`,\n { html: `The following quote has been approved:

${$record.values.Name}` }\n )\n }).then(() => {\n\n // Notify current user\n ComposeUI.success(`The quote has been approved and the quote owner has been notified via email.`)\n\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Quote\n resource: compose:record\n SolutionInsertSolutionNumber:\n source: |-\n //Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n // Map the case number\n let nextSolutionNumber = settings.values.SolutionNextNumber\n if (typeof nextSolutionNumber == \"undefined\" || nextSolutionNumber === '' || isNaN(nextSolutionNumber)) {\n nextSolutionNumber = 0\n }\n $record.values.SolutionNumber = nextSolutionNumber\n let nextSolutionNumberUpdated = parseInt(nextSolutionNumber,10) + 1\n\n // Update the config\n settings.values.SolutionNextNumber = nextSolutionNumberUpdated\n\n return Compose.saveRecord(settings).then(mySavedSettings => {\n console.log('Record saved, new ID', mySavedSettings.recordID)\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: false\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: beforeCreate\n module: Solution\n resource: compose:record\n AccountCreateNewContract:\n source: |-\n //Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n // Map the case number\n let ContractDefaultTime = settings.values.ContractDefaultTime\n\n // Get the contract number\n let nextContractNumber = settings.values.ContractNextNumber\n if (typeof nextContractNumber == \"undefined\" || nextContractNumber === '' || isNaN(nextContractNumber)) {\n nextContractNumber = 0\n }\n\n return Compose.makeRecord({\n 'OwnerId' : $record.values.OwnerId,\n 'AccountId' : $record.recordID,\n 'Status' : 'Draft',\n 'BillingStreet' : $record.values.BillingStreet,\n 'BillingCity' : $record.values.BillingCity,\n 'BillingState' : $record.values.BillingState,\n 'BillingPostalCode' : $record.values.BillingPostalCode,\n 'BillingCountry' : $record.values.BillingCountry,\n 'ShippingStreet' : $record.values.BillingStreet,\n 'ShippingCity' : $record.values.BillingCity,\n 'ShippingState' : $record.values.BillingState,\n 'ShippingPostalCode' : $record.values.BillingPostalCode,\n 'ShippingCountry' : $record.values.BillingCountry,\n 'ContractTerm' : ContractDefaultTime,\n 'ContractNumber' : nextContractNumber\n }, 'Contract').then(myContract => {\n\n // return was missing here. Set tjhe mySavedCase below\n return Compose.saveRecord(myContract)\n\n }).then(mySavedContract => {\n let nextContractNumberUpdated = parseInt(nextContractNumber,10) + 1\n\n // Update the config\n settings.values.ContractNextNumber = nextContractNumberUpdated\n return Compose.saveRecord(settings).then(mySavedSettings => {\n\n console.log('Record saved, new ID', mySavedSettings.recordID)\n\n }).then(() => {\n\n // Notify current user\n ComposeUI.success(`The new contract record has been created.`)\n\n }).then(() => {\n\n // Go to the record\n ComposeUI.gotoRecordEditor(mySavedContract)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Account\n resource: compose:record\n CaseSetStatusToWorking:\n source: |-\n // Update the status\n $record.values.Status = 'Working'\n let caseRecord = $record\n\n // Save the case\n return Compose.makeRecord({\n 'CaseId' : caseRecord.recordID,\n 'Description' : 'State set to \"Working\"',\n 'Type' : 'State change'\n }, 'CaseUpdate').then(myCaseUpdate => {\n\n return Compose.saveRecord(myCaseUpdate)\n\n }).then(myCaseUpdate => {\n\n return Compose.saveRecord(caseRecord)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Case\n resource: compose:record\n CaseSetStatusToClosed:\n source: |-\n // Check if the case is already closed\n if ($record.values.Status === 'Closed') {\n // Case is closed already. Exit\n ComposeUI.success(`This case is already closed.`)\n return true\n }\n\n // Check if there is a solution\n let SolutionName = $record.values.SolutionName\n let solutionRecord = $record.values.SolutionId\n\n // If there is no solution, show that it's not possible to close the case\n if ((!SolutionName) && (!solutionRecord)) {\n ComposeUI.warning(`Unable to close the case. Please add a solution name or select an existing solution before closing the case.`)\n return true\n }\n\n // Update the status\n $record.values.IsClosed = true\n var m = new Date()\n var dateString = m.getUTCFullYear() + \"/\" + (m.getUTCMonth() + 1) + \"/\" + m.getUTCDate() + \" \" + m.getUTCHours() + \":\" + m.getUTCMinutes() + \":\" + m.getUTCSeconds()\n $record.values.ClosedDate = dateString\n $record.values.Status = 'Closed'\n\n return Compose.saveRecord($record)\n .then(mySavedRecord => {\n\n // Create the CaseUpdate record\n return Compose.makeRecord({\n 'Description': 'State set to \"Closed',\n 'Type': 'State change',\n 'CaseId': $record.recordID\n }, 'CaseUpdate')\n\n .then(myCaseUpdate => {\n\n return Compose.saveRecord(myCaseUpdate)\n\n }).then(mySavedCaseUpdate => {\n\n // Check if a solution record has been selected\n if (solutionRecord) {\n\n // If there is a solution record, map the values in the case\n return Compose.findRecordByID(solutionRecord, 'Solution').then(solution => {\n $record.values.SolutionName = solution.values.SolutionName\n $record.values.SolutionNote = solution.values.SolutionNote\n $record.values.SolutionFile = solution.values.File\n\n return Compose.saveRecord($record)\n }).catch(err => {\n\n // solve the problem\n console.error(err)\n })\n } else {\n\n // If there is no solution record, check if the value \"SubmitAsSolution\" is checked. If so, save the solution as a Solution record\n if ($record.values.SubmitAsSolution) {\n\n //Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n // Map the solution number\n let nextSolutionNumber = settings.values.SolutionNextNumber\n if (typeof nextSolutionNumber == \"undefined\" || nextSolutionNumber === '' || isNaN(nextSolutionNumber)) {\n nextSolutionNumber = 0\n }\n\n // Create the Solution record\n return Compose.makeRecord({\n 'SolutionName': $record.values.SolutionName,\n 'SolutionNote': $record.values.SolutionNote,\n 'File': $record.values.SolutionFile,\n 'Status': 'New',\n 'IsPublished': '1',\n 'CaseId': $record.recordID,\n 'SolutionNumber': nextSolutionNumber,\n 'ProductId': $record.values.ProductId\n }, 'Solution')\n\n .then(mySolution => {\n\n return Compose.saveRecord(mySolution)\n\n }).then(mySavedSolution => {\n\n // Save the solution record in the case record\n $record.values.SolutionId = mySavedSolution.recordID\n return Compose.saveRecord($record)\n\n }).then(mySavedSolution => {\n\n let nextSolutionNumberUpdated = parseInt(nextSolutionNumber, 10) + 1\n\n // Update the config\n settings.values.SolutionNextNumber = nextSolutionNumberUpdated\n return Compose.saveRecord(settings).then(mySavedSettings => {\n\n console.log('Record saved, ID', mySavedSettings.recordID)\n\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }\n }\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Case\n resource: compose:record\n AccountCreateNewCase:\n source: |-\n //Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n // Map the case number\n let nextCaseNumber = settings.values.CaseNextNumber\n if (typeof nextCaseNumber == \"undefined\" || nextCaseNumber === '' || isNaN(nextCaseNumber)) {\n nextCaseNumber = 0\n }\n\n // Find the contact we want to link the new case to (by default, the primary contact)\n return Compose.findRecords(`AccountId = ${$record.recordID}`, 'Contact').then(({ set, filter }) => {\n\n let ContactId, SuppliedName, SuppliedEmail, SuppliedPhone\n\n // Loop through the contacts of the account, to save the primary contact\n set.forEach(r => {\n\n //Check if it's the primary contact\n let contactIsPrimary = r.values.IsPrimary\n console.log(contactIsPrimary)\n if (contactIsPrimary === '1') {\n\n //Add the contact\n ContactId = r.recordID\n SuppliedName = r.values.FirstName + ' ' + r.values.LastName\n SuppliedEmail = r.values.Email\n SuppliedPhone = r.values.Phone\n }\n })\n\n return Compose.makeRecord({\n 'OwnerId' : $record.values.OwnerId,\n 'Subject' : '(no subject)',\n 'ContactId' : ContactId,\n 'AccountId' : $record.recordID,\n 'Status' : 'New',\n 'Priority' : 'Low',\n 'SuppliedName' : SuppliedName,\n 'SuppliedEmail' : SuppliedEmail,\n 'SuppliedPhone' : SuppliedPhone,\n 'CaseNumber' : nextCaseNumber\n }, 'Case').then(myCase => {\n\n Compose.saveRecord(myCase)\n\n }).then(mySavedCase => {\n let nextCaseNumberUpdated = parseInt(nextCaseNumber,10) + 1\n\n // Update the config\n settings.values.CaseNextNumber = nextCaseNumberUpdated\n return Compose.saveRecord(settings).then(mySavedSettings => {\n\n console.log('Record saved, new ID', mySavedSettings.recordID)\n\n }).then(({ mySavedCase }) => {\n\n // Notify current user\n ComposeUI.success(`The new case has been created.`)\n\n\n }).then(({ mySavedCase }) => {\n\n // Go to the record\n ComposeUI.gotoRecordEditor(mySavedCase)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Account\n resource: compose:record\n ContactCreateNewCase:\n source: |-\n //Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n // Map the case number\n let nextCaseNumber = settings.values.CaseNextNumber\n if (typeof nextCaseNumber == \"undefined\" || nextCaseNumber === '' || isNaN(nextCaseNumber)) {\n nextCaseNumber = 0\n }\n\n return Compose.makeRecord({\n 'OwnerId' : $record.values.OwnerId,\n 'Subject' : '(no subject)',\n 'ContactId' : $record.recordID,\n 'AccountId' : $record.values.AccountId,\n 'Status' : 'New',\n 'Priority' : 'Low',\n 'SuppliedName' : $record.values.FirstName + ' ' + $record.values.LastName,\n 'SuppliedEmail' : $record.values.Email,\n 'SuppliedPhone' : $record.values.Phone,\n 'CaseNumber' : nextCaseNumber\n }, 'Case').then(myCase => {\n\n // return was missing here. Set tjhe mySavedCase below\n return Compose.saveRecord(myCase)\n\n }).then(mySavedCase => {\n let nextCaseNumberUpdated = parseInt(nextCaseNumber, 10) + 1\n\n // Update the config\n settings.values.CaseNextNumber = nextCaseNumberUpdated\n return Compose.saveRecord(settings).then(mySavedSettings => {\n\n console.log('Record saved, new ID', mySavedSettings.recordID)\n // then(({ mySavedCase }) wasn't needed, since it is already defined\n // for the entire block, starting at line 27\n }).then(() => {\n\n // Notify current user\n ComposeUI.success(`The new case has been created.`)\n\n }).then(() => {\n\n // Go to the record\n ComposeUI.gotoRecordEditor(mySavedCase)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Contact\n resource: compose:record\n LeadConvertLeadIntoAccount:\n source: |-\n if ($record.values.Status === 'Converted') {\n // Lead already converted. Inform user and exit\n ComposeUI.warning('This lead is already converted.')\n return true\n }\n\n // create new record of type/module Account and copy all values\n return Compose.makeRecord({\n 'BillingStreet' : $record.values.Street,\n 'BillingCity' : $record.values.City,\n 'BillingState' : $record.values.State,\n 'BillingPostalCode' : $record.values.PostalCode,\n 'BillingCountry' : $record.values.Country,\n 'AnnualRevenue' : $record.values.AnnualRevenue,\n 'AccountName' : $record.values.Company,\n 'Description' : $record.values.Description,\n 'Fax' : $record.values.Fax,\n 'Industry' : $record.values.Industry,\n 'OwnerId' : $record.values.OwnerId,\n 'AccountSource' : $record.values.LeadSource,\n 'Phone' : $record.values.Phone,\n 'NumberOfEmployees' : $record.values.NumberOfEmployees,\n 'Rating' : $record.values.Rating,\n 'Website' : $record.values.Website,\n 'Twitter' : $record.values.Twitter,\n 'Facebook' : $record.values.Facebook,\n 'LinkedIn' : $record.values.LinkedIn\n }, 'Account').then(myAccount => {\n\n return Compose.saveRecord(myAccount)\n\n }).then(mySavedAccount => {\n\n // Create the related contact\n return Compose.makeRecord({\n 'MailingStreet' : $record.values.Street,\n 'MailingCity' : $record.values.City,\n 'MailingState' : $record.values.State,\n 'MailingPostalCode' : $record.values.PostalCode,\n 'MailingCountry' : $record.values.Country,\n 'Description' : $record.values.Description,\n 'DoNotCall' : $record.values.DoNotCall,\n 'Email' : $record.values.Email,\n 'HasOptedOutOfEmail' : $record.values.HasOptedOutOfEmail,\n 'Fax' : $record.values.Fax,\n 'HasOptedOutOfFax' : $record.values.HasOptedOutOfFax,\n 'OwnerId' : $record.values.OwnerId,\n 'LeadSource' : $record.values.LeadSource,\n 'Website' : $record.values.Website,\n 'Twitter' : $record.values.Twitter,\n 'Facebook' : $record.values.Facebook,\n 'LinkedIn' : $record.values.LinkedIn,\n 'Salutation' : $record.values.Salutation,\n 'FirstName' : $record.values.FirstName,\n 'LastName' : $record.values.LastName,\n 'MobilePhone' : $record.values.MobilePhone,\n 'Phone' : $record.values.Phone,\n 'Title' : $record.values.Title,\n 'IsPrimary' : '1',\n 'AccountId' : mySavedAccount.recordID\n }, 'Contact').then(myContact => {\n\n return Compose.saveRecord(myContact)\n\n }).then(updatedAccount => {\n\n //Update the lead record\n $record.values.Status = 'Converted'\n $record.values.IsConverted = 'Yes'\n $record.values.ConvertedAccountId = mySavedAccount.recordID\n $record.values.ConvertedContactId = mySavedAccount.recordID\n $record.values.ConvertedDate = mySavedAccount.createdAt\n\n return Compose.saveRecord($record)\n\n }).then(leadUser => {\n\n return System.findUserByID($record.values.OwnerId).then(user => {\n\n // Notifies the owner that a new account was created and assigned to him\n Compose.sendRecordToMail(\n user.email,\n 'Lead ' + $record.values.FirstName + ' ' + $record.values.LastName + ' from ' + $record.values.Company + ' has been converted',\n {\n header: '

The following lead has been converted:

'\n },\n mySavedAccount\n )\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).then(({ mySavedAccount }) => {\n\n // Notify current user\n ComposeUI.success(`The lead has been converted.`)\n\n\n }).then(({ mySavedAccount }) => {\n\n // Go to the record\n ComposeUI.gotoRecordEditor(mySavedAccount)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Lead\n resource: compose:record\n LeadConvertLeadToAccountAndOpportunity:\n source: |-\n if ($record.values.Status === 'Converted') {\n // Lead already converted. Inform user and exit\n ComposeUI.warning('This lead is already converted.')\n return true\n }\n\n // create new record of type/module Account and copy all values\n return Compose.makeRecord({\n 'BillingStreet' : $record.values.Street,\n 'BillingCity' : $record.values.City,\n 'BillingState' : $record.values.State,\n 'BillingPostalCode' : $record.values.PostalCode,\n 'BillingCountry' : $record.values.Country,\n 'AnnualRevenue' : $record.values.AnnualRevenue,\n 'AccountName' : $record.values.Company,\n 'Description' : $record.values.Description,\n 'Fax' : $record.values.Fax,\n 'Industry' : $record.values.Industry,\n 'OwnerId' : $record.values.OwnerId,\n 'AccountSource' : $record.values.LeadSource,\n 'Phone' : $record.values.Phone,\n 'NumberOfEmployees' : $record.values.NumberOfEmployees,\n 'Rating' : $record.values.Rating,\n 'Website' : $record.values.Website,\n 'Twitter' : $record.values.Twitter,\n 'Facebook' : $record.values.Facebook,\n 'LinkedIn' : $record.values.LinkedIn\n }, 'Account').then(myAccount => {\n\n return Compose.saveRecord(myAccount)\n\n }).then(mySavedAccount => {\n\n // Create the related contact\n return Compose.makeRecord({\n 'MailingStreet' : $record.values.Street,\n 'MailingCity' : $record.values.City,\n 'MailingState' : $record.values.State,\n 'MailingPostalCode' : $record.values.PostalCode,\n 'MailingCountry' : $record.values.Country,\n 'Description' : $record.values.Description,\n 'DoNotCall' : $record.values.DoNotCall,\n 'Email' : $record.values.Email,\n 'HasOptedOutOfEmail' : $record.values.HasOptedOutOfEmail,\n 'Fax' : $record.values.Fax,\n 'HasOptedOutOfFax' : $record.values.HasOptedOutOfFax,\n 'OwnerId' : $record.values.OwnerId,\n 'LeadSource' : $record.values.LeadSource,\n 'Website' : $record.values.Website,\n 'Twitter' : $record.values.Twitter,\n 'Facebook' : $record.values.Facebook,\n 'LinkedIn' : $record.values.LinkedIn,\n 'Salutation' : $record.values.Salutation,\n 'FirstName' : $record.values.FirstName,\n 'LastName' : $record.values.LastName,\n 'MobilePhone' : $record.values.MobilePhone,\n 'Phone' : $record.values.Phone,\n 'Title' : $record.values.Title,\n 'IsPrimary' : '1',\n 'AccountId' : mySavedAccount.recordID\n }, 'Contact').then(mySavedContact => {\n\n return Compose.saveRecord(mySavedContact).then(mySavedContact => {\n\n // First get the default values\n //Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n let opportunityCloseDays = settings.values.OpportunityCloseDateDays\n let opportunityProbability = settings.values.OpportunityProbability\n let opportunityForecaseCategory = settings.values.OpportunityForecaseCategory\n let opportunityStagename = settings.values.OpportunityStagename\n\n //Calculate the expiration date\n let m = new Date()\n m.setDate(m.getDate() + parseInt(opportunityCloseDays,10))\n let closeDate = m.getUTCFullYear() +\"/\"+ (m.getUTCMonth()+1) +\"/\"+ m.getUTCDate() + \" \" + m.getUTCHours() + \":\" + m.getUTCMinutes() + \":\" + m.getUTCSeconds()\n\n // Create the related opportunity\n return Compose.makeRecord({\n 'Description' : $record.values.Description,\n 'OwnerId' : $record.values.OwnerId,\n 'LeadSource' : $record.values.LeadSource,\n 'Name' : '(unnamed)',\n 'AccountId' : mySavedAccount.recordID,\n 'IsClosed' : 'No',\n 'IsWon' : 'No',\n 'CloseDate' : closeDate,\n 'Probability' : opportunityProbability,\n 'ForecastCategory' : opportunityForecaseCategory,\n 'StageName' : opportunityStagename\n }, 'Opportunity').then(myOpportunity => {\n return Compose.saveRecord(myOpportunity)\n\n }).then(mySavedOpportunity => {\n\n //Create a new contact linked to the opportunity\n return Compose.makeRecord({\n 'ContactId' : mySavedContact.recordID,\n 'OpportunityId' : mySavedOpportunity.recordID,\n 'IsPrimary' : '1'\n }, 'OpportunityContactRole').then(myOpportunityContactRole => {\n return Compose.saveRecord(myOpportunityContactRole)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n\n }).then(updatedAccount => {\n\n //Update the lead record\n $record.values.Status = 'Converted'\n $record.values.IsConverted = 'Yes'\n $record.values.ConvertedAccountId = mySavedAccount.recordID\n $record.values.ConvertedContactId = mySavedAccount.recordID\n $record.values.ConvertedDate = mySavedAccount.createdAt\n\n return Compose.saveRecord($record)\n\n }).then(leadUser => {\n\n return System.findUserByID($record.values.OwnerId).then(user => {\n\n // Notifies the owner that a new account was created and assigned to him\n Compose.sendRecordToMail(\n user.email,\n 'Lead ' + $record.values.FirstName + ' ' + $record.values.LastName + ' from ' + $record.values.Company + ' has been converted',\n {\n header: '

The following lead has been converted:

'\n },\n mySavedAccount\n )\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).then(({ mySavedAccount }) => {\n\n // Notify current user\n ComposeUI.success(`The lead has been converted.`)\n\n\n }).then(({ mySavedAccount }) => {\n\n // Go to the record\n ComposeUI.gotoRecordEditor(mySavedAccount)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Lead\n resource: compose:record\n QuoteSendQuoteToCustomEmail:\n source: |-\n // Get the to address\n let to = prompt(\"Please enter an email to send this quote to:\")\n if (to === null || to === \"\") {\n ComposeUI.warning(`Please enter an email to send this quote to .`)\n return\n }\n\n let lineitems = ''\n Compose.findRecords(`QuoteId = ${$record.recordID}`, 'QuoteLineItem')\n\n .then(({ set, filter }) => {\n\n set.forEach(lineitem => {\n\n lineitems = lineitems + \"Price: \" + lineitem.values.UnitPrice + \"
\"\n lineitems = lineitems + \"Quantity: \" + lineitem.values.Quantity + \"
\"\n lineitems = lineitems + \"Subtotal: \" + lineitem.values.Subtotal + \"
\"\n lineitems = lineitems + \"Discount: \" + lineitem.values.Discount + \"
\"\n lineitems = lineitems + \"Total Price: \" + lineitem.values.TotalPrice + \"
\"\n lineitems = lineitems + \"-------------------------
\"\n })\n return lineitems\n }).then(lineitems => {\n\n\n // Get email body\n let html = \"

Details of Quote: \" + $record.values.QuoteNumber + \" - \" + $record.values.Name + \"

\"\n html = html + \"
\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"
\"\n html = html + \"Quote Information
\"\n html = html + \"
\"\n html = html + \"Quote Number: \" + $record.values.QuoteNumber + \"
\"\n html = html + \"Quote Name: \" + $record.values.Name + \"
\"\n html = html + \"Expiration Date: \" + $record.values.ExpirationDate + \"
\"\n html = html + \"Description: \" + $record.values.Description\n html = html + \"
\"\n html = html + \"Primary contact data
\"\n html = html + \"
\"\n html = html + \"Contact Name: \" + $record.values.ContactId + \"
\"\n html = html + \"Email: \" + $record.values.Email + \"
\"\n html = html + \"Phone: \" + $record.values.Phone\n html = html + \"
\"\n html = html + \"Totals
\"\n html = html + \"
\"\n html = html + \"Subtotal: \" + $record.values.Subtotal + \"
\"\n html = html + \"Additional Discount: \" + $record.values.Discount + \"
\"\n html = html + \"Shipping and Handling: \" + $record.values.ShippingHandling + \"
\"\n html = html + \"Total Price: \" + $record.values.TotalPrice + \"
\"\n html = html + \"Tax: \" + $record.values.Tax + \"
\"\n html = html + \"Grand Total: \" + $record.values.GrandTotal\n html = html + \"
\"\n html = html + \"Products
\"\n html = html + \"
\"\n html = html + lineitems\n html = html + \"
\"\n html = html + \"Bill To
\"\n html = html + \"
\"\n html = html + \"Bill to Name: \" + $record.values.BillingName + \"
\"\n html = html + \"Bill to Street: \" + $record.values.BillingStreet + \"
\"\n html = html + \"Bill to City: \" + $record.values.BillingCity + \"
\"\n html = html + \"Bill to State: \" + $record.values.BillingState + \"
\"\n html = html + \"Bill to Postal Code: \" + $record.values.BillingPostalCode + \"
\"\n html = html + \"Bill to Country: \" + $record.values.BillingCountry\n html = html + \"
\"\n html = html + \"Quote To
\"\n html = html + \"
\"\n html = html + \"Quote to Name: \" + $record.values.QuoteToName + \"
\"\n html = html + \"Quote to Street: \" + $record.values.QuoteToStreet + \"
\"\n html = html + \"Quote to City: \" + $record.values.QuoteToCity + \"
\"\n html = html + \"Quote to State: \" + $record.values.QuoteToState + \"
\"\n html = html + \"Quote to Postal Code: \" + $record.values.QuoteToPostalCode + \"
\"\n html = html + \"Quote to Country: \" + $record.values.QuoteToCountry\n html = html + \"
\"\n html = html + \"Ship To
\"\n html = html + \"
\"\n html = html + \"Ship to Name: \" + $record.values.ShippingName + \"
\"\n html = html + \"Ship to Street: \" + $record.values.ShippingStreet + \"
\"\n html = html + \"Ship to City: \" + $record.values.ShippingCity + \"
\"\n html = html + \"Ship to State: \" + $record.values.ShippingState + \"
\"\n html = html + \"Ship to Postal Code: \" + $record.values.ShippingPostalCode + \"
\"\n html = html + \"Ship to Country: \" + $record.values.ShippingCountry\n html = html + \"
\"\n\n // Send the email\n return Compose.sendMail(to, `Corteza - Quote: ${$record.values.QuoteNumber} - ${$record.values.Name}`, { html: html }).then(() => {\n ComposeUI.success(`The quote has been sent via email.`)\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Quote\n resource: compose:record\n QuoteSendQuoteToPrimaryContact:\n source: |-\n // Get the to address\n let to = $record.values.Email\n if (!to) {\n ComposeUI.warning(`There is no email linked to the quote. Please fill in an email address in the \"Primary contact data\" block.`)\n return\n }\n\n let lineitems = ''\n Compose.findRecords(`QuoteId = ${$record.recordID}`, 'QuoteLineItem')\n\n .then(({ set, filter }) => {\n\n set.forEach(lineitem => {\n\n lineitems = lineitems + \"Price: \" + lineitem.values.UnitPrice + \"
\"\n lineitems = lineitems + \"Quantity: \" + lineitem.values.Quantity + \"
\"\n lineitems = lineitems + \"Subtotal: \" + lineitem.values.Subtotal + \"
\"\n lineitems = lineitems + \"Discount: \" + lineitem.values.Discount + \"
\"\n lineitems = lineitems + \"Total Price: \" + lineitem.values.TotalPrice + \"
\"\n lineitems = lineitems + \"-------------------------
\"\n })\n return lineitems\n }).then(lineitems => {\n\n\n // Get email body\n let html = \"

Details of Quote: \" + $record.values.QuoteNumber + \" - \" + $record.values.Name + \"

\"\n html = html + \"
\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"\"\n html = html + \"
\"\n html = html + \"Quote Information
\"\n html = html + \"
\"\n html = html + \"Quote Number: \" + $record.values.QuoteNumber + \"
\"\n html = html + \"Quote Name: \" + $record.values.Name + \"
\"\n html = html + \"Expiration Date: \" + $record.values.ExpirationDate + \"
\"\n html = html + \"Description: \" + $record.values.Description\n html = html + \"
\"\n html = html + \"Primary contact data
\"\n html = html + \"
\"\n html = html + \"Contact Name: \" + $record.values.ContactId + \"
\"\n html = html + \"Email: \" + $record.values.Email + \"
\"\n html = html + \"Phone: \" + $record.values.Phone\n html = html + \"
\"\n html = html + \"Totals
\"\n html = html + \"
\"\n html = html + \"Subtotal: \" + $record.values.Subtotal + \"
\"\n html = html + \"Additional Discount: \" + $record.values.Discount + \"
\"\n html = html + \"Shipping and Handling: \" + $record.values.ShippingHandling + \"
\"\n html = html + \"Total Price: \" + $record.values.TotalPrice + \"
\"\n html = html + \"Tax: \" + $record.values.Tax + \"
\"\n html = html + \"Grand Total: \" + $record.values.GrandTotal\n html = html + \"
\"\n html = html + \"Products
\"\n html = html + \"
\"\n html = html + lineitems\n html = html + \"
\"\n html = html + \"Bill To
\"\n html = html + \"
\"\n html = html + \"Bill to Name: \" + $record.values.BillingName + \"
\"\n html = html + \"Bill to Street: \" + $record.values.BillingStreet + \"
\"\n html = html + \"Bill to City: \" + $record.values.BillingCity + \"
\"\n html = html + \"Bill to State: \" + $record.values.BillingState + \"
\"\n html = html + \"Bill to Postal Code: \" + $record.values.BillingPostalCode + \"
\"\n html = html + \"Bill to Country: \" + $record.values.BillingCountry\n html = html + \"
\"\n html = html + \"Quote To
\"\n html = html + \"
\"\n html = html + \"Quote to Name: \" + $record.values.QuoteToName + \"
\"\n html = html + \"Quote to Street: \" + $record.values.QuoteToStreet + \"
\"\n html = html + \"Quote to City: \" + $record.values.QuoteToCity + \"
\"\n html = html + \"Quote to State: \" + $record.values.QuoteToState + \"
\"\n html = html + \"Quote to Postal Code: \" + $record.values.QuoteToPostalCode + \"
\"\n html = html + \"Quote to Country: \" + $record.values.QuoteToCountry\n html = html + \"
\"\n html = html + \"Ship To
\"\n html = html + \"
\"\n html = html + \"Ship to Name: \" + $record.values.ShippingName + \"
\"\n html = html + \"Ship to Street: \" + $record.values.ShippingStreet + \"
\"\n html = html + \"Ship to City: \" + $record.values.ShippingCity + \"
\"\n html = html + \"Ship to State: \" + $record.values.ShippingState + \"
\"\n html = html + \"Ship to Postal Code: \" + $record.values.ShippingPostalCode + \"
\"\n html = html + \"Ship to Country: \" + $record.values.ShippingCountry\n html = html + \"
\"\n\n // Send the email\n return Compose.sendMail(to, `Corteza - Quote: ${$record.values.QuoteNumber} - ${$record.values.Name}`, { html: html }).then(() => {\n ComposeUI.success(`The quote has been sent via email.`)\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Quote\n resource: compose:record\n QuoteSubmitQuoteForApproval:\n source: |-\n // Check if it can be reviewed\n if ($record.values.Status !== 'Draft' && $record.values.Status !== 'Needs Review') {\n crust.notify.ui.alert.warning('A quote needs to have the status Draft or Needs Review in order to be sent for approval')\n return true\n }\n\n // Set the status\n $record.values.Status = 'In Review'\n\n // Saves the quote and inform\n return Compose.saveRecord($record)\n .then(mySavedRecord => {\n\n // Get the email of the owner\n return System.findUserByID($record.createdBy).then(user => {\n\n // Send the mail\n return Compose.sendMail(\n user.email, //Change this to the email address of the person that needs to approve the quotes\n `Quote \"${$record.values.Name}\" needs approval`,\n { html: `The following quote needs approval:

${$record.values.Name}` }\n )\n }).then(() => {\n\n // Notify current user\n ComposeUI.success(`The quote has been sent for approval.`)\n\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Quote\n resource: compose:record\n OpportunityGenerateNewQuote:\n source: |-\n // Check if there is a related account, to map the fields of the account\n if (!$record.values.AccountId) {\n\n // Exit when there is no account related to the opportunity.\n ComposeUI.warning('Please link the opportunity to an account before generating a quote')\n return\n }\n\n let quoteContactId\n let quoteEmail\n let quotePhone\n let quoteFax\n let quoteAccountId\n let quoteBillingStreet\n let quoteBillingCity\n let quoteBillingState\n let quoteBillingPostalCode\n let quoteBillingCountry\n let quoteBillingName\n let quoteToStreet\n let quoteToCity\n let quoteToState\n let quoteToPostalCode\n let quoteToCountry\n let quoteToName\n let quoteShippingStreet\n let quoteShippingCity\n let quoteShippingState\n let quoteShippingPostalCode\n let quoteShippingCountry\n let quoteShippingName\n let quoteExpirationDate\n let quoteNumber\n\n // Get the primary contact for the quote\n return Compose.findRecords(`OpportunityId = ${$record.recordID}`, 'OpportunityContactRole')\n\n .then(({ set, filter }) => {\n\n let primary_contact\n\n if (set.length === 1) {\n\n // Get the contact\n primary_contact = set[0]\n\n } else {\n\n // Loop through the contacts of the account, to save the primary contact\n set.forEach(r => {\n\n // Check if it's the primary contact\n let contactIsPrimary = r.values.IsPrimary\n if (contactIsPrimary === '1') {\n\n // Add the contact\n primary_contact = r\n }\n })\n }\n return primary_contact\n\n }).then(primary_contact => {\n\n // If we have the primary contact, continue to add it to the quote. Else, skip this block\n if (primary_contact) {\n\n // Get the contact data\n return Compose.findRecordByID(primary_contact.values.ContactId, 'Contact').then(contact => {\n\n quoteContactId = contact.recordID\n quoteEmail = contact.values.Email\n quotePhone = contact.values.Phone\n quoteFax = contact.values.Fax\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }\n\n }).then(mySavedQuote => {\n\n // Get the related account\n return Compose.findRecordByID($record.values.AccountId, 'Account').then(account => {\n\n quoteAccountId = account.recordID,\n quoteBillingStreet = account.values.BillingStreet,\n quoteBillingCity = account.values.BillingCity,\n quoteBillingState = account.values.BillingState,\n quoteBillingPostalCode = account.values.BillingPostalCode,\n quoteBillingCountry = account.values.BillingCountry,\n quoteBillingName = account.values.AccountName,\n quoteToStreet = account.values.BillingStreet,\n quoteToCity = account.values.BillingCity,\n quoteToState = account.values.BillingState,\n quoteToPostalCode = account.values.BillingPostalCode,\n quoteToCountry = account.values.BillingCountry,\n quoteToName = account.values.AccountName,\n quoteShippingStreet = account.values.BillingStreet,\n quoteShippingCity = account.values.BillingCity,\n quoteShippingState = account.values.BillingState,\n quoteShippingPostalCode = account.values.BillingPostalCode,\n quoteShippingCountry = account.values.BillingCountry,\n quoteShippingName = account.values.AccountName\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).then(mySavedQuote => {\n\n // Get the default settings\n return Compose.findLastRecord('Settings').then(settings => {\n\n // Get the expiration date\n let quoteExpirationDays = settings.values.QuoteExpirationDays\n\n // Calculate the expiration date\n let m = new Date()\n m.setDate(m.getDate() + parseInt(quoteExpirationDays, 10))\n let expirationDate = m.getUTCFullYear() + \"/\" + (m.getUTCMonth() + 1) + \"/\" + m.getUTCDate() + \" \" + m.getUTCHours() + \":\" + m.getUTCMinutes() + \":\" + m.getUTCSeconds()\n\n // Save the date\n quoteExpirationDate = expirationDate\n\n // Map the quote number\n let nextQuoteNumber = settings.values.QuoteNextNumber\n if (typeof nextQuoteNumber == \"undefined\" || nextQuoteNumber === '' || isNaN(nextQuoteNumber)) {\n nextQuoteNumber = 0\n }\n quoteNumber = nextQuoteNumber\n let nextQuoteNumberUpdated = parseInt(nextQuoteNumber, 10) + 1\n\n // Update the config\n settings.values.QuoteNextNumber = nextQuoteNumberUpdated\n return Compose.saveRecord(settings).then(mySavedSettings => {\n\n console.log('Record saved, ID', mySavedSettings.recordID)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).then(mySavedQuote => {\n\n // Create a new quote record for the opportunity\n return Compose.makeRecord({\n 'ShippingHandling': 0,\n 'Status': 'Draft',\n 'Discount': 0,\n 'Tax': 0,\n 'OpportunityId': $record.recordID,\n 'GrandTotal': $record.values.Amount,\n 'PricebookId': $record.values.PricebookId,\n 'Name': $record.values.Name,\n 'Subtotal': $record.values.Amount,\n 'TotalPrice': $record.values.Amount,\n 'ContactId': quoteContactId,\n 'Email': quoteEmail,\n 'Phone': quotePhone,\n 'Fax': quoteFax,\n 'AccountId': quoteAccountId,\n 'BillingStreet': quoteBillingStreet,\n 'BillingCity': quoteBillingCity,\n 'BillingState': quoteBillingState,\n 'BillingPostalCode': quoteBillingPostalCode,\n 'BillingCountry': quoteBillingCountry,\n 'BillingName': quoteBillingName,\n 'QuoteToStreet': quoteToStreet,\n 'QuoteToCity': quoteToCity,\n 'QuoteToState': quoteToState,\n 'QuoteToPostalCode': quoteToPostalCode,\n 'QuoteToCountry': quoteToCountry,\n 'QuoteToName': quoteToName,\n 'ShippingStreet': quoteShippingStreet,\n 'ShippingCity': quoteShippingCity,\n 'ShippingState': quoteShippingState,\n 'ShippingPostalCode': quoteShippingPostalCode,\n 'ShippingCountry': quoteShippingCountry,\n 'ShippingName': quoteShippingName,\n 'ExpirationDate': quoteExpirationDate,\n 'QuoteNumber': quoteNumber\n }, 'Quote')\n\n .then(myQuote => {\n\n return Compose.saveRecord(myQuote)\n\n .then(mySavedQuote => {\n\n // Get the list of products from the opportunity to the quote\n return Compose.findRecords(`OpportunityId = ${$record.recordID}`, 'OpportunityLineItem')\n\n .then(({ set, filter }) => {\n\n // Loop through the lineitems related to the opportunity\n set.forEach(r => {\n\n // Create a new contact linked to the opportunity\n return Compose.makeRecord({\n 'Discount': r.values.Discount,\n 'Description': r.values.Description,\n 'ListPrice': r.values.ListPrice,\n 'PricebookEntryId': r.values.PricebookEntryId,\n 'ProductId': r.values.ProductId,\n 'ProductCode': r.values.ProductCode,\n 'Quantity': r.values.Quantity,\n 'UnitPrice': r.values.UnitPrice,\n 'Subtotal': r.values.Subtotal,\n 'TotalPrice': r.values.TotalPrice,\n 'QuoteId': mySavedQuote.recordID\n }, 'QuoteLineItem')\n\n .then(myQuoteLineItem => {\n\n return Compose.saveRecord(myQuoteLineItem)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n })\n })\n\n }).then(() => {\n\n // Notify current user\n ComposeUI.success(`The new quote has been created.`)\n\n\n }).then(() => {\n\n // Go to the record\n ComposeUI.gotoRecordEditor(mySavedQuote)\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Opportunity\n resource: compose:record\n QuoteUpdateTotalPrice:\n source: |-\n // Get the subtotal\n let subtotal = parseFloat($record.values.Subtotal)\n\n // Apply additional quote discount\n let discount = $record.values.Discount\n if (!discount || discount === '' || isNaN(discount)) {\n discount = 0\n }\n let totalPrice = subtotal - parseFloat(discount)\n\n // Calculate if it's not below 0\n if (totalPrice < 0) {\n totalPrice = 0\n }\n\n // Apply shipping\n let shippingHandling = $record.values.ShippingHandling\n if (!shippingHandling || shippingHandling === '' || isNaN(shippingHandling)) {\n shippingHandling = 0\n }\n totalPrice = totalPrice + parseFloat(shippingHandling)\n\n // Add totalPrice to the record\n $record.values.TotalPrice = totalPrice\n\n // Apply taxes\n let tax = $record.values.Tax\n if (!shippingHandling || shippingHandling === '' || isNaN(shippingHandling)) {\n // No tax, so don't do anything\n $record.values.GrandTotal = totalPrice\n } else {\n if (tax > 0) {\n // Apply tax\n let taxpercent = parseFloat(tax / 100);\n $record.values.GrandTotal = totalPrice * (1 + taxpercent)\n }\n }\n async: false\n runInUA: false\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: beforeUpdate\n module: Quote\n resource: compose:record\n OpportunityApplyPriceBook:\n source: |-\n // Get the current price book\n let pricebookId = $record.values.PricebookId\n\n // Check if there is a price book. If there isn't one, find the standard one\n if (!pricebookId) {\n\n //If there is no price book selected, get the default price book.\n return Compose.findRecords('IsActive = 1', 'Pricebook')\n\n .then(({ set, filter }) => {\n\n if (set.length === 0) {\n\n // return that there are no Price books in the CRM\n ComposeUI.warning(`There are no active price books configured in the CRM. Please insert an active price book in the Price book module.`)\n\n } else {\n\n // Loop through the price books, to find the standard one\n set.forEach(r => {\n\n //Check if the price book is the standard one\n if (r.values.IsStandard === '1') {\n\n //Get the price book id\n pricebookId = r.recordID\n }\n })\n\n if (pricebookId) {\n\n //Save the price book in the opportunity\n $record.values.PricebookId = pricebookId\n\n // Save the price book in the opportunity\n return Compose.saveRecord($record)\n }\n }\n\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }\n\n // Check if a price book is selected or if a standard price book has been found. If not, exit.\n if (!pricebookId) {\n ComposeUI.warning(`Please select a Price book for this opportunity first.`)\n return\n }\n\n //Set the total amount of the opportunity\n let amount = 0\n\n // Find all opportunity lineitems\n return Compose.findRecords(`OpportunityId = ${$record.recordID}`, 'OpportunityLineItem')\n\n .then(({ set, filter }) => {\n\n set.forEach(lineitem => {\n\n //Set the default values\n let quantity = lineitem.values.Quantity\n let discount = lineitem.values.Discount\n let listprice = 0\n let unitprice = 0\n let subtotal = 0\n let totalprice = 0\n\n // Get the product\n return Compose.findRecordByID(lineitem.values.ProductId, 'Product').then(product => {\n\n // Set the product name and code\n lineitem.values.Name = product.values.Name\n lineitem.values.ProductCode = product.values.ProductCode\n\n }).then(product => {\n\n // Get the right price from the selected price book\n return Compose.findRecords(`PricebookId = ${pricebookId} AND ProductId = ${lineitem.values.ProductId}`, 'PricebookEntry')\n\n .then(({ set, filter }) => {\n\n if (set.length > 0) {\n\n let pricebookEntry = set[0]\n\n // Get the list price\n listprice = pricebookEntry.values.UnitPrice\n\n // Update unitprice only when the value is empty\n unitprice = lineitem.values.UnitPrice\n if (!unitprice || unitprice === '' || isNaN(unitprice)) {\n unitprice = listprice\n }\n\n // Calculate the totals\n if (!quantity || quantity === '' || isNaN(quantity)) {\n quantity = 0\n }\n subtotal = unitprice * quantity\n\n // Calculate the total\n if (!discount || discount === '' || isNaN(discount)) {\n totalprice = subtotal\n } else {\n totalprice = subtotal - discount\n }\n\n // Update it in the listitem record\n lineitem.values.ListPrice = listprice\n lineitem.values.UnitPrice = unitprice\n lineitem.values.Subtotal = subtotal\n lineitem.values.TotalPrice = totalprice\n\n //Add the total price to the amount of the opportunity\n amount = amount + totalprice\n\n // Save the lineitem\n return Compose.saveRecord(lineitem)\n }\n }).then(mySolution => {\n\n //Save the opportunity record\n $record.values.Amount = amount\n return Compose.saveRecord($record)\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n }).catch(err => {\n // solve the problem\n console.error(err)\n })\n async: false\n runInUA: true\n critical: true\n enabled: true\n timeout: 0\n triggers:\n - event: manual\n module: Opportunity\n resource: compose:record\nPK\x07\x08>\x16\x18\x81\xf1\x05\x01\x00\xf1\x05\x01\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00 \x001400_pages.yamlUT\x05\x00\x01\x80Cm8namespace: crm\npages:\n - handle: Home\n title: Home\n blocks:\n - title: New Leads\n options:\n fields:\n - name: FirstName\n - name: LastName\n - name: Email\n - name: LeadSource\n - name: Status\n module: Lead\n page: RecordPageForModuleLead\n perPage: 5\n prefilter: Status = 'New'\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 14, 6, 9]\n - title: Leads by Type\n options:\n chart: LeadsByType\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Chart\n xywh: [9, 0, 3, 7]\n - title: Open Opportunities\n options:\n fields:\n - name: Name\n - name: AccountId\n - name: Amount\n - name: StageName\n - name: NextStep\n module: Opportunity\n page: RecordPageForModuleOpportunity\n perPage: 3\n prefilter: StageName != 'Closed Won' AND StageName != 'Closed Lost'\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [6, 14, 6, 9]\n - title: Leads by Country\n options:\n chart: LeadsByCountry\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Chart\n xywh: [6, 0, 3, 7]\n - title: Leads per day\n options:\n chart: LeadsPerDay\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Chart\n xywh: [6, 7, 3, 7]\n - title: My Calendar\n options:\n feeds:\n - endField: EndDateTime\n module: Event\n startField: ActivityDate\n titleField: Subject\n - endField: null\n module: Task\n startField: ActivityDate\n titleField: Subject\n header:\n views:\n - agendaWeek\n - agendaMonth\n - agendaDay\n - month\n - listMonth\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Calendar\n xywh: [0, 0, 6, 14]\n - title: Opportunities\n options:\n chart: OpportunitiesByValue\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Chart\n xywh: [9, 7, 3, 7]\n visible: \n - handle: Leads\n title: Leads\n blocks:\n - title: List of leads\n options:\n fields:\n - name: FirstName\n - name: LastName\n - name: Email\n - name: Rating\n - name: Company\n - name: Country\n - name: Status\n - name: OwnerId\n module: Lead\n page: RecordPageForModuleLead\n perPage: 20\n prefilter: \"\"\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 0, 9, 21]\n - title: Leads by type\n options:\n chart: LeadsByType\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Chart\n xywh: [9, 0, 3, 7]\n - title: Leads by country\n options:\n chart: LeadsByCountry\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Chart\n xywh: [9, 7, 3, 7]\n - title: Leads by source\n options:\n chart: LeadsBySource\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Chart\n xywh: [9, 14, 3, 7]\n pages:\n - handle: RecordPageForModuleLead\n module: Lead\n title: Record page for module \"Lead\"\n blocks:\n - title: Personal Data\n options:\n fields:\n - name: FirstName\n - name: LastName\n - name: Salutation\n - name: Title\n - name: Phone\n - name: MobilePhone\n - name: Email\n - name: Website\n - name: Twitter\n - name: LinkedIn\n - name: Facebook\n kind: Record\n xywh: [0, 0, 3, 15]\n - title: Twitter feed\n options:\n fields: []\n profileSourceField: Twitter\n kind: SocialFeed\n xywh: [9, 0, 3, 31]\n - title: Company Data\n options:\n fields:\n - name: Company\n - name: Industry\n - name: AnnualRevenue\n - name: NumberOfEmployees\n - name: NumberOfEmployeesRange\n - name: Country\n - name: City\n - name: Street\n - name: State\n - name: PostalCode\n kind: Record\n xywh: [3, 0, 3, 15]\n - title: Other Information\n options:\n fields:\n - name: Rating\n - name: Status\n - name: LeadSource\n - name: OwnerId\n - name: Description\n - name: ConvertedAccountId\n - name: ConvertedContactId\n - name: ConvertedOpportunityId\n - name: ConvertedDate\n kind: Record\n xywh: [6, 0, 3, 15]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: LeadId = ${recordID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 15, 6, 8]\n - title: Events\n options:\n fields:\n - name: Type\n - name: Subject\n - name: ActivityDate\n module: Event\n page: RecordPageForModuleEvent\n perPage: 5\n prefilter: LeadId = ${recordID}\n presort: ActivityDate DESC\n kind: RecordList\n xywh: [0, 23, 4, 8]\n - title: Tasks\n options:\n fields:\n - name: Type\n - name: Subject\n - name: Status\n - name: ActivityDate\n module: Task\n page: RecordPageForModuleTask\n perPage: 5\n prefilter: LeadId = ${recordID}\n presort: ActivityDate DESC\n kind: RecordList\n xywh: [4, 23, 5, 8]\n - title: Lead Actions\n options:\n buttons:\n - label: Convert this Lead in to an Account\n script: LeadConvertLeadIntoAccount\n variant: primary\n - label: 'Lead: Convert a lead into an account and opportunity'\n script: LeadConvertLeadToAccountAndOpportunity\n variant: primary\n kind: Automation\n xywh: [6, 15, 3, 8]\n visible: true\n - handle: AllNewLeads\n title: All New Leads\n blocks:\n - title: New Leads\n options:\n fields:\n - name: FirstName\n - name: LastName\n - name: Email\n - name: Rating\n - name: Company\n - name: Country\n - name: LeadSource\n - name: Status\n - name: OwnerId\n module: Lead\n page: RecordPageForModuleLead\n perPage: 20\n prefilter: Status = 'New' OR Status = 'Assigned'\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n visible: true\n - handle: MyLeads\n title: My Leads\n blocks:\n - title: My Leads\n options:\n fields:\n - name: FirstName\n - name: LastName\n - name: Email\n - name: Rating\n - name: Company\n - name: Country\n - name: LeadSource\n - name: Status\n - name: OwnerId\n module: Lead\n page: RecordPageForModuleLead\n perPage: 20\n prefilter: OwnerId = ${userID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 21]\n visible: true\n visible: true\n - handle: Accounts\n title: Accounts\n blocks:\n - title: All accounts\n options:\n fields:\n - name: AccountName\n - name: Type\n - name: Rating\n - name: Industry\n - name: AccountSource\n - name: OwnerId\n - name: createdAt\n module: Account\n page: RecordPageForModuleAccount\n perPage: 20\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 0, 12, 19]\n pages:\n - handle: RecordPageForModuleAccount\n module: Account\n title: Record page for module \"Account\"\n blocks:\n - title: Account Detail\n options:\n fields:\n - name: AccountName\n - name: Type\n - name: Industry\n - name: NumberOfEmployees\n - name: AnnualRevenue\n - name: Twitter\n - name: LinkedIn\n - name: Facebook\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 0, 3, 12]\n - title: Account Address\n options:\n fields:\n - name: BillingStreet\n - name: BillingCity\n - name: BillingState\n - name: BillingPostalCode\n - name: BillingCountry\n - name: Phone\n - name: Website\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [3, 0, 3, 12]\n - title: Other Information\n options:\n fields:\n - name: Rating\n - name: ParentId\n - name: AccountSource\n - name: OwnerId\n - name: Description\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [6, 0, 3, 12]\n - title: Company Twitter Feed\n options:\n fields: []\n profileSourceField: Twitter\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: SocialFeed\n xywh: [9, 0, 3, 20]\n - title: Opportunities\n options:\n fields:\n - name: Name\n - name: StageName\n - name: Amount\n - name: CloseDate\n hideAddButton: true\n module: Opportunity\n page: RecordPageForModuleOpportunity\n perPage: 5\n prefilter: AccountId = ${recordID}\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 12, 6, 8]\n - title: Contacts\n options:\n fields:\n - name: FirstName\n - name: LastName\n - name: Title\n hidePaging: true\n module: Contact\n page: RecordPageForModuleContact\n perPage: 5\n prefilter: AccountId = ${recordID}\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 20, 4, 8]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: AccountId = ${recordID}\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 28, 4, 8]\n - title: Cases\n options:\n fields:\n - name: CaseNumber\n - name: Subject\n - name: Status\n hideAddButton: true\n module: Case\n page: RecordPageForModuleCase\n perPage: 5\n prefilter: AccountId = ${recordID}\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [8, 20, 4, 8]\n - title: Events\n options:\n fields:\n - name: Type\n - name: Subject\n - name: ActivityDate\n module: Event\n page: RecordPageForModuleEvent\n perPage: 5\n prefilter: AccountId = ${recordID}\n presort: ActivityDate DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [4, 28, 4, 8]\n - title: Tasks\n options:\n fields:\n - name: Type\n - name: Subject\n - name: Status\n - name: ActivityDate\n module: Task\n page: RecordPageForModuleTask\n perPage: 5\n prefilter: AccountId = ${recordID}\n presort: ActivityDate DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [8, 28, 4, 8]\n - title: Contracts\n options:\n fields:\n - name: Name\n - name: StartDate\n - name: EndDate\n - name: Status\n hideAddButton: true\n module: Contract\n page: RecordPageForModuleContract\n perPage: 5\n prefilter: AccountId = ${recordID}\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [4, 20, 4, 8]\n - title: Account Actions\n options:\n buttons:\n - label: Generate a new Opportunity for this Account\n script: AccountCreateNewOpportunity\n variant: primary\n - label: Generate a new Contract for this Account\n script: AccountCreateNewContract\n variant: primary\n - label: Generate a new Case for this Account\n script: AccountCreateNewCase\n variant: primary\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Automation\n xywh: [6, 12, 3, 8]\n pages:\n - handle: RecordPageForModuleAccountContactRole\n module: AccountContactRole\n title: Record page for module \"AccountContactRole\"\n blocks:\n - title: Account Contact Role Details\n options:\n fields:\n - name: AccountId\n - name: ContactId\n - name: Role\n - name: IsPrimary\n kind: Record\n xywh: [0, 0, 5, 15]\n visible: false\n visible: true\n - handle: MyAccounts\n title: My Accounts\n blocks:\n - title: My Accounts\n options: \n fields:\n - name: AccountName\n - name: Type\n - name: Rating\n - name: Industry\n - name: AccountSource\n - name: OwnerId\n - name: createdAt\n module: Account\n page: RecordPageForModuleAccount\n perPage: 20\n prefilter: OwnerId = ${userID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 21]\n visible: true\n visible: true\n - handle: Opportunities\n title: Opportunities\n blocks:\n - title: List of Opportunities\n options:\n fields:\n - name: Name\n - name: Amount\n - name: AccountId\n - name: StageName\n - name: CloseDate\n - name: OwnerId\n - name: createdAt\n module: Opportunity\n page: RecordPageForModuleOpportunity\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleOpportunity\n module: Opportunity\n title: Record page for module \"Opportunity\"\n blocks:\n - title: Opportunity Detail\n options:\n fields:\n - name: Name\n - name: AccountId\n - name: Type\n - name: CloseDate\n - name: Probability\n - name: PricebookId\n - name: Amount\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 0, 4, 11]\n - title: Additional Information\n options:\n fields:\n - name: OwnerId\n - name: NextStep\n - name: LeadSource\n - name: CampaignId\n - name: ForecastCategory\n - name: Description\n - name: createdAt\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [8, 0, 4, 11]\n - title: Contact Roles\n options:\n fields:\n - name: ContactId\n - name: IsPrimary\n - name: Role\n module: OpportunityContactRole\n page: RecordPageForModuleOpportunityContactRole\n perPage: 5\n prefilter: OpportunityId = ${recordID}\n presort: IsPrimary DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [6, 19, 6, 8]\n - title: Opportunity Qualification\n options:\n fields:\n - name: StageName\n - name: Budget\n - name: Authority\n - name: Need\n - name: Timeline\n - name: Competition\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [4, 0, 4, 11]\n - title: Products\n options:\n fields:\n - name: ProductId\n - name: ProductCode\n - name: ListPrice\n - name: UnitPrice\n - name: Quantity\n - name: Subtotal\n - name: Discount\n - name: TotalPrice\n module: OpportunityLineItem\n page: RecordPageForModuleOpportunityLineItem\n perPage: 5\n prefilter: OpportunityId = ${recordID}\n presort: ProductId ASC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 11, 8, 8]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: OpportunityId = ${recordID}\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 27, 4, 8]\n - title: Events\n options:\n fields:\n - name: Type\n - name: Subject\n - name: ActivityDate\n module: Event\n page: RecordPageForModuleEvent\n perPage: 5\n prefilter: OpportunityId = ${recordID}\n presort: ActivityDate DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [4, 27, 4, 8]\n - title: Tasks\n options:\n fields:\n - name: Type\n - name: Subject\n - name: Status\n - name: ActivityDate\n module: Task\n page: RecordPageForModuleTask\n perPage: 5\n prefilter: OpportunityId = ${recordID}\n presort: ActivityDate DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [8, 27, 4, 8]\n - title: Quotes\n options:\n fields:\n - name: QuoteNumber\n - name: Name\n - name: ExpirationDate\n - name: Subtotal\n - name: TotalPrice\n hideAddButton: true\n module: Quote\n page: RecordPageForModuleQuote\n perPage: 5\n prefilter: OpportunityId = ${recordID}\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 19, 6, 8]\n - title: Opportunity Actions\n options:\n buttons:\n - label: Update prices of Products by applying the selected Price Book\n and inserted discounts\n script: OpportunityApplyPriceBook\n variant: primary\n - label: Generate a new Quote for this Opportunity\n script: OpportunityGenerateNewQuote\n variant: primary\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Automation\n xywh: [8, 11, 4, 8]\n pages:\n - handle: RecordPageForModuleOpportunityLineItem\n module: OpportunityLineItem\n title: Record page for module \"OpportunityLineItem\"\n blocks:\n - title: Opportunity Line Item Details\n options:\n fields:\n - name: OpportunityId\n - name: ProductId\n - name: Description\n - name: UnitPrice\n - name: Quantity\n - name: Discount\n kind: Record\n xywh: [0, 0, 4, 13]\n - title: Automatically inserted values\n options:\n fields:\n - name: ProductCode\n - name: ListPrice\n - name: Subtotal\n - name: TotalPrice\n kind: Record\n xywh: [4, 0, 4, 13]\n visible: false\n - handle: RecordPageForModuleOpportunityCompetitor\n module: OpportunityCompetitor\n title: Record page for module \"OpportunityCompetitor\"\n blocks:\n - title: Opportunity Competitor Details\n options:\n fields:\n - name: OpportunityId\n - name: CompetitorName\n - name: Strengths\n - name: Weaknesses\n kind: Record\n xywh: [0, 0, 5, 17]\n visible: false\n - handle: RecordPageForModuleOpportunityContactRole\n module: OpportunityContactRole\n title: Record page for module \"OpportunityContactRole\"\n blocks:\n - title: Opportunity Contact Role Details\n options:\n fields:\n - name: OpportunityId\n - name: ContactId\n - name: Role\n - name: IsPrimary\n kind: Record\n xywh: [0, 0, 4, 16]\n pages:\n - handle: RecordPageForModulePricebookEntry\n module: PricebookEntry\n title: Record page for module \"PricebookEntry\"\n blocks:\n - title: Details\n options:\n fields:\n - name: PricebookId\n - name: ProductId\n - name: UnitPrice\n kind: Record\n xywh: [0, 0, 4, 15]\n visible: false\n visible: false\n visible: false\n - handle: MyOpportunities\n title: My Opportunities\n blocks:\n - title: My Opportunities\n options:\n fields:\n - name: Name\n - name: Amount\n - name: AccountId\n - name: StageName\n - name: CloseDate\n - name: OwnerId\n - name: createdAt\n module: Opportunity\n page: RecordPageForModuleOpportunity\n perPage: 20\n prefilter: OwnerId = ${userID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n visible: true\n visible: true\n - handle: Contacts\n title: Contacts\n blocks:\n - title: List of Contacts\n options:\n fields:\n - name: FirstName\n - name: LastName\n - name: AccountId\n - name: Phone\n - name: Email\n - name: OwnerId\n module: Contact\n page: RecordPageForModuleContact\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleContact\n module: Contact\n title: Record page for module \"Contact\"\n blocks:\n - title: Personal Data\n options:\n fields:\n - name: FirstName\n - name: LastName\n - name: Salutation\n - name: Title\n - name: Phone\n - name: Email\n - name: Twitter\n - name: Facebook\n - name: LinkedIn\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 0, 3, 13]\n - title: Contact Address\n options:\n fields:\n - name: AccountId\n - name: IsPrimary\n - name: MailingStreet\n - name: MailingCity\n - name: MailingState\n - name: MailingPostalCode\n - name: MailingCountry\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [3, 0, 3, 13]\n - title: Other Information\n options:\n fields:\n - name: OwnerId\n - name: DoNotCall\n - name: HasOptedOutOfEmail\n - name: ContactSource\n - name: Description\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [6, 0, 3, 13]\n - title: Contact Twitter Feed\n options:\n fields: []\n profileSourceField: Twitter\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: SocialFeed\n xywh: [9, 0, 3, 20]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: LastModifiedDate\n - name: CreatedById\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: ContactId = ${recordID}\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 21, 4, 8]\n - title: Events\n options:\n fields:\n - name: Type\n - name: Subject\n - name: ActivityDate\n module: Event\n page: RecordPageForModuleEvent\n perPage: 5\n prefilter: ContactId = ${recordID}\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [4, 21, 4, 8]\n - title: Tasks\n options:\n fields:\n - name: Type\n - name: Subject\n - name: Status\n - name: ActivityDate\n module: Task\n page: RecordPageForModuleTask\n perPage: 5\n prefilter: ContactId = ${recordID}\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [8, 21, 4, 8]\n - title: Cases related with this Contact\n options:\n fields:\n - name: CaseNumber\n - name: Status\n - name: Subject\n - name: createdAt\n hideAddButton: true\n module: Case\n page: RecordPageForModuleCase\n perPage: 5\n prefilter: ContactId = ${recordID}\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 13, 6, 8]\n - title: Contact Actions\n options:\n buttons:\n - label: Create a new Case for this Contact\n script: ContactCreateNewCase\n variant: primary\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Automation\n xywh: [6, 13, 3, 8]\n visible: false\n visible: true\n - handle: Quotes\n title: Quotes\n blocks:\n - title: List of Quotes\n options:\n fields:\n - name: QuoteNumber\n - name: Name\n - name: OpportunityId\n - name: Discount\n - name: TotalPrice\n - name: Tax\n - name: GrandTotal\n - name: createdAt\n - name: ExpirationDate\n module: Quote\n page: RecordPageForModuleQuote\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleQuote\n module: Quote\n title: Record page for module \"Quote\"\n blocks:\n - title: Quote Information\n options:\n fields:\n - name: QuoteNumber\n - name: Name\n - name: OpportunityId\n - name: ExpirationDate\n - name: Status\n - name: Description\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 0, 4, 12]\n - title: Totals\n options:\n fields:\n - name: PricebookId\n - name: Subtotal\n - name: Discount\n - name: ShippingHandling\n - name: TotalPrice\n - name: Tax\n - name: GrandTotal\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [8, 0, 4, 12]\n - title: Primary contact data\n options:\n fields:\n - name: AccountId\n - name: ContactId\n - name: Email\n - name: Phone\n - name: createdBy\n - name: createdAt\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [4, 0, 4, 12]\n - title: Bill To\n options:\n fields:\n - name: BillingName\n - name: BillingStreet\n - name: BillingCity\n - name: BillingState\n - name: BillingPostalCode\n - name: BillingCountry\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 20, 4, 9]\n - title: Quote To\n options:\n fields:\n - name: QuoteToName\n - name: QuoteToStreet\n - name: QuoteToCity\n - name: QuoteToState\n - name: QuoteToPostalCode\n - name: QuoteToCountry\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [4, 20, 4, 9]\n - title: Ship To\n options:\n fields:\n - name: ShippingName\n - name: ShippingStreet\n - name: ShippingCity\n - name: ShippingState\n - name: ShippingPostalCode\n - name: ShippingCountry\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [8, 20, 4, 9]\n - title: Quote Line Items\n options:\n fields:\n - name: ProductId\n - name: UnitPrice\n - name: Quantity\n - name: Subtotal\n - name: Discount\n - name: TotalPrice\n - name: ListPrice\n module: QuoteLineItem\n page: RecordPageForModuleQuoteLineItem\n perPage: 5\n prefilter: QuoteId = ${recordID}\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 12, 8, 8]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: QuoteId = ${recordID}\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 29, 4, 8]\n - title: Events\n options:\n fields:\n - name: Type\n - name: Subject\n - name: ActivityDate\n module: Event\n page: RecordPageForModuleEvent\n perPage: 5\n prefilter: QuoteId = ${recordID}\n presort: ActivityDate DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [4, 29, 4, 8]\n - title: Tasks\n options:\n fields:\n - name: Type\n - name: Subject\n - name: Status\n - name: ActivityDate\n module: Task\n page: RecordPageForModuleTask\n perPage: 5\n prefilter: QuoteId = ${recordID}\n presort: ActivityDate DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [8, 29, 4, 8]\n - title: Quote Actions\n options:\n buttons:\n - label: Submit this Quote for approval\n script: QuoteSubmitQuoteForApproval\n variant: primary\n - label: Approve this Quote\n script: QuoteApproveQuote\n variant: primary\n - label: Send this Quote via email to the primary contact\n script: QuoteSendQuoteToPrimaryContact\n variant: primary\n - label: Send this Quote to a custom email\n script: QuoteSendQuoteToCustomEmail\n variant: primary\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Automation\n xywh: [8, 12, 4, 8]\n pages:\n - handle: RecordPageForModuleQuoteLineItem\n module: QuoteLineItem\n title: Record page for module \"QuoteLineItem\"\n blocks:\n - title: Quote Line Item Information\n options:\n fields:\n - name: QuoteId\n - name: LineItemNumber\n - name: LineItemDescription\n - name: ProductId\n - name: ListPrice\n - name: UnitPrice\n - name: Quantity\n - name: Subtotal\n - name: Discount\n - name: TotalPrice\n kind: Record\n xywh: [0, 0, 4, 19]\n visible: false\n visible: false\n visible: true\n - handle: Products\n title: Products\n blocks:\n - title: List of Products\n options:\n fields:\n - name: Name\n - name: ProductCode\n - name: Description\n - name: Family\n module: Product\n page: RecordPageForModuleProduct\n perPage: 20\n presort: Name ASC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleProduct\n module: Product\n title: Record page for module \"Product\"\n blocks:\n - title: Product Details\n options:\n fields:\n - name: Name\n - name: ProductCode\n - name: Family\n - name: Description\n - name: IsActive\n kind: Record\n xywh: [0, 0, 6, 10]\n - title: Appears in the following Price Books\n options:\n fields:\n - name: PricebookId\n - name: UnitPrice\n hideAddButton: true\n module: PricebookEntry\n page: RecordPageForModulePricebookEntry\n perPage: 5\n prefilter: ProductId = ${recordID}\n kind: RecordList\n xywh: [6, 0, 6, 10]\n - title: Related Cases\n options:\n fields:\n - name: CaseNumber\n - name: Subject\n - name: Status\n hideAddButton: true\n module: Case\n page: RecordPageForModuleCase\n perPage: 5\n prefilter: ProductId = ${recordID}\n presort: CaseNumber DESC\n kind: RecordList\n xywh: [0, 10, 6, 8]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: ProductId = ${recordID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [6, 10, 6, 8]\n visible: false\n - handle: PriceBook\n title: Price book\n blocks:\n - title: Price books\n options:\n fields:\n - name: Name\n - name: Description\n - name: IsStandard\n - name: IsActive\n module: Pricebook\n page: RecordPageForModulePricebook\n perPage: 20\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleCaseContactRole\n module: CaseContactRole\n title: Record page for module \"CaseContactRole\"\n blocks:\n - title: Case Contact Role Details\n options:\n fields:\n - name: CasesId\n - name: ContactId\n - name: Role\n - name: IsPrimary\n kind: Record\n xywh: [0, 0, 5, 16]\n visible: false\n - handle: RecordPageForModulePricebook\n module: Pricebook\n title: Record page for module \"Pricebook\"\n blocks:\n - title: Price Book Details\n options:\n fields:\n - name: Name\n - name: Description\n - name: IsStandard\n - name: IsActive\n kind: Record\n xywh: [0, 0, 6, 14]\n - title: Price Book Entries\n options:\n fields:\n - name: ProductId\n - name: UnitPrice\n module: PricebookEntry\n page: RecordPageForModulePricebookEntry\n perPage: 12\n prefilter: PricebookId = ${recordID}\n kind: RecordList\n xywh: [6, 0, 6, 14]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: PricebookId = ${recordID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 14, 12, 8]\n visible: false\n visible: true\n visible: true\n - handle: Contracts\n title: Contracts\n blocks:\n - title: List of Contracts\n options:\n fields:\n - name: ContractNumber\n - name: AccountId\n - name: Status\n - name: StartDate\n - name: EndDate\n - name: ContractTerm\n module: Contract\n page: RecordPageForModuleContract\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleContract\n module: Contract\n title: Record page for module \"Contract\"\n blocks:\n - title: Contract Details\n options:\n fields:\n - name: AccountId\n - name: ContractNumber\n - name: Status\n - name: StartDate\n - name: EndDate\n - name: ContractTerm\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 0, 4, 12]\n - title: Contract Billing Address\n options:\n fields:\n - name: BillingStreet\n - name: BillingCity\n - name: BillingState\n - name: BillingPostalCode\n - name: BillingCountry\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 12, 4, 9]\n - title: Contract Description and Special Terms\n options:\n fields:\n - name: OwnerId\n - name: Description\n - name: SpecialTerms\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [4, 0, 4, 12]\n - title: Contract Files\n options:\n fields:\n - name: File1\n - name: File2\n - name: File3\n - name: File4\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [8, 0, 4, 12]\n - title: Contract Shipping Address\n options:\n fields:\n - name: ShippingStreet\n - name: ShippingCity\n - name: ShippingState\n - name: ShippingPostalCode\n - name: ShippingCountry\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [4, 12, 4, 9]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: ContractId = ${recordID}\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 21, 4, 8]\n - title: Events\n options:\n fields:\n - name: Type\n - name: Subject\n - name: ActivityDate\n module: Event\n page: RecordPageForModuleEvent\n perPage: 5\n prefilter: ContractId = ${recordID}\n presort: ActivityDate DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [4, 21, 4, 8]\n - title: Tasks\n options:\n fields:\n - name: Type\n - name: Subject\n - name: Status\n - name: ActivityDate\n module: Task\n page: RecordPageForModuleTask\n perPage: 5\n prefilter: ContractId = ${recordID}\n presort: ActivityDate DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [8, 21, 4, 8]\n pages:\n - handle: RecordPageForModuleContractLineItem\n module: ContractLineItem\n title: Record page for module \"ContractLineItem\"\n blocks:\n - title: Contract Line Item Details\n options:\n fields:\n - name: LineItemNumber\n - name: Description\n - name: StartDate\n - name: EndDate\n - name: Status\n kind: Record\n xywh: [0, 0, 4, 11]\n - title: Contract Line Item Pricing\n options:\n fields:\n - name: UnitPrice\n - name: Quantity\n - name: Subtotal\n - name: Discount\n - name: TotalPrice\n kind: Record\n xywh: [4, 0, 4, 11]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: ContractLineItemId = ${recordID}\n kind: RecordList\n xywh: [8, 0, 4, 11]\n visible: false\n - handle: RecordPageForModuleEntitlement\n module: Entitlement\n title: Record page for module \"Entitlement\"\n blocks:\n - title: Entitlement Details\n options:\n fields:\n - name: Name\n - name: Entitlement Process\n - name: CasesPerEntitlement\n - name: Type\n - name: RemainingCases\n - name: IsPerIncident\n - name: StartDate\n - name: EndDate\n - name: Status\n kind: Record\n xywh: [0, 0, 4, 13]\n - title: Other Information\n options:\n fields:\n - name: AccountId\n - name: ContractLineItemId\n - name: CreatedById\n - name: CreatedDate\n - name: LastModifiedById\n - name: LastModifiedDate\n kind: Record\n xywh: [4, 0, 4, 13]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: EntitlementId = ${recordID}\n kind: RecordList\n xywh: [6, 13, 6, 7]\n - title: Entitlement Templates\n options:\n fields:\n - name: Name\n - name: Type\n - name: CasesPerEntitlement\n - name: IsPerIncident\n - name: Term\n module: EntitlementTemplate\n page: RecordPageForModuleEntitlementTemplate\n perPage: 5\n prefilter: EntitlementId = ${recordID}\n kind: RecordList\n xywh: [0, 13, 6, 7]\n - title: Entitlement Contacts\n options:\n fields:\n - name: ContactId\n - name: Name\n module: EntitlementContact\n page: RecordPageForModuleEntitlementContact\n perPage: 8\n prefilter: EntitlementId = ${recordID}\n kind: RecordList\n xywh: [8, 0, 4, 13]\n pages:\n - handle: RecordPageForModuleEntitlementTemplate\n module: EntitlementTemplate\n title: Record page for module \"EntitlementTemplate\"\n blocks:\n - title: Entitlement Template Details\n options:\n fields:\n - name: Name\n - name: Type\n - name: CasesPerEntitlement\n - name: IsPerIncident\n - name: Term\n - name: BusinessHours\n kind: Record\n xywh: [0, 0, 4, 14]\n visible: false\n - handle: RecordPageForModuleEntitlementContact\n module: EntitlementContact\n title: Record page for module \"EntitlementContact\"\n blocks:\n - title: Entitlement Contact Details\n options:\n fields:\n - name: EntitlementId\n - name: ContactId\n - name: Name\n kind: Record\n xywh: [0, 0, 4, 14]\n visible: false\n visible: false\n - handle: RecordPageForModuleContractContactRole\n module: ContractContactRole\n title: Record page for module \"ContractContactRole\"\n blocks:\n - title: Contract Contact Role Details\n options:\n fields:\n - name: ContractId\n - name: ContactId\n - name: Role\n - name: IsPrimary\n kind: Record\n xywh: [0, 0, 4, 16]\n visible: false\n visible: false\n visible: true\n - handle: Cases\n title: Cases\n blocks:\n - title: List of Cases\n options:\n fields:\n - name: CaseNumber\n - name: Subject\n - name: Status\n - name: CreatedDate\n - name: OwnerId\n - name: createdAt\n module: Case\n page: RecordPageForModuleCase\n perPage: 20\n presort: createdAt DESC\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleCase\n module: Case\n title: Record page for module \"Case\"\n blocks:\n - title: Case Main Information\n options:\n fields:\n - name: CaseNumber\n - name: Subject\n - name: AccountId\n - name: ContactId\n - name: SuppliedName\n - name: SuppliedEmail\n - name: SuppliedPhone\n kind: Record\n xywh: [0, 0, 3, 14]\n - title: Case Details\n options:\n fields:\n - name: Type\n - name: Description\n - name: File\n - name: Origin\n - name: ProductId\n kind: Record\n xywh: [3, 0, 3, 14]\n - title: Case Status\n options:\n fields:\n - name: Status\n - name: OwnerId\n - name: CreatedDate\n - name: Priority\n - name: IsEscalated\n - name: IsClosed\n - name: ClosedDate\n - name: Reason\n kind: Record\n xywh: [9, 0, 3, 14]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: CaseId = ${recordID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 22, 4, 8]\n - title: Events\n options:\n fields:\n - name: Type\n - name: Subject\n - name: ActivityDate\n module: Event\n page: RecordPageForModuleEvent\n perPage: 5\n prefilter: CaseId = ${recordID}\n presort: ActivityDate DESC\n kind: RecordList\n xywh: [4, 22, 5, 8]\n - title: Tasks\n options:\n fields:\n - name: Type\n - name: Subject\n - name: Status\n - name: ActivityDate\n module: Task\n page: RecordPageForModuleTask\n perPage: 5\n prefilter: CaseId = ${recordID}\n presort: ActivityDate DESC\n kind: RecordList\n xywh: [9, 22, 3, 8]\n - title: Case Updates\n options:\n fields:\n - name: Type\n - name: Description\n - name: File\n - name: createdBy\n - name: createdAt\n module: CaseUpdate\n page: RecordPageForModuleCaseUpdate\n perPage: 5\n prefilter: CaseId = ${recordID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 14, 9, 8]\n - title: Case Actions\n options:\n buttons:\n - label: Set Case status to Working\n script: CaseSetStatusToWorking\n variant: primary\n - label: Set Case status to Closed\n script: CaseSetStatusToClosed\n variant: primary\n - label: Inform the contact via email of the Case's solution\n script: CaseInformContactOfSolution\n variant: primary\n kind: Automation\n xywh: [9, 14, 3, 8]\n - title: Case Solution\n options:\n fields:\n - name: SolutionName\n - name: SolutionNote\n - name: SolutionFile\n - name: SolutionId\n - name: SubmitAsSolution\n kind: Record\n xywh: [6, 0, 3, 14]\n pages:\n - handle: RecordPageForModuleCaseUpdate\n module: CaseUpdate\n title: Record page for module \"CaseUpdate\"\n blocks:\n - title: Case Update\n options:\n fields:\n - name: CaseId\n - name: Description\n - name: Type\n - name: File\n - name: IsSolution\n - name: createdBy\n - name: createdAt\n kind: Record\n xywh: [0, 0, 4, 20]\n visible: false\n - handle: RecordPageForModuleCaseMilestone\n module: CaseMilestone\n title: Record page for module \"CaseMilestone\"\n blocks:\n - title: Case Milestone Details\n options:\n fields:\n - name: CaseId\n - name: TargetDate\n - name: TargetResponseInDays\n - name: TargetResponseInHrs\n - name: TargetResponseInMins\n - name: StartDate\n - name: CompletionDate\n - name: IsViolated\n - name: IsCompleted\n kind: Record\n xywh: [0, 0, 5, 19]\n pages:\n - handle: RecordPageForModuleMilestoneType\n module: MilestoneType\n title: Record page for module \"MilestoneType\"\n blocks:\n - title: Case Milestone Type Details\n options:\n fields:\n - name: Name\n - name: Description\n - name: RecurrenceType\n kind: Record\n xywh: [0, 0, 4, 15]\n visible: false\n visible: false\n visible: false\n - handle: Solutions\n title: Solutions\n blocks:\n - title: List of Solutions\n options:\n fields:\n - name: SolutionNumber\n - name: SolutionName\n - name: SolutionNote\n - name: CaseId\n - name: ProductId\n module: Solution\n page: RecordPageForModuleSolution\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleSolution\n module: Solution\n title: Record page for module \"Solution\"\n blocks:\n - title: Solution Details\n options:\n fields:\n - name: SolutionNumber\n - name: SolutionName\n - name: SolutionNote\n - name: File\n - name: CaseId\n - name: ProductId\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 0, 5, 17]\n visible: false\n visible: true\n visible: true\n - handle: Campaigns\n title: Campaigns\n blocks:\n - title: List of Campaigns\n options:\n fields:\n - name: Name\n - name: ParentId\n - name: Type\n - name: Status\n - name: StartDate\n - name: EndDate\n module: Campaigns\n page: RecordPageForModuleCampaign\n perPage: 20\n prefilter: \"\"\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleCampaign\n module: Campaigns\n title: Record page for module \"Campaign\"\n blocks:\n - title: Campaign Details\n options:\n fields:\n - name: Name\n - name: IsActive\n - name: ParentId\n - name: Type\n - name: OwnerId\n - name: Status\n - name: StartDate\n - name: EndDate\n kind: Record\n xywh: [0, 0, 4, 13]\n - title: Campaign Planning\n options:\n fields:\n - name: BudgetedCost\n - name: ActualCost\n - name: ExpectedRevenue\n - name: CreatedById\n - name: CreatedDate\n - name: Description\n kind: Record\n xywh: [4, 0, 4, 13]\n - title: Campaign Statistics\n options:\n fields:\n - name: NumberOfLeads\n - name: NumberOfConvertedLeads\n - name: NumberOfContacts\n - name: NumberOfOpportunities\n - name: NumberOfWonOpportunities\n - name: AmountAllOpportunities\n - name: AmountWonOpportunities\n kind: Record\n xywh: [8, 0, 4, 13]\n - title: Campaign Members\n options:\n fields:\n - name: LeadId\n - name: ContactId\n - name: Status\n module: CampaignMember\n page: RecordPageForModuleCampaignMember\n perPage: 5\n prefilter: CampaignId = ${recordID}\n kind: RecordList\n xywh: [0, 13, 8, 8]\n - title: Generated Opportunities\n options:\n fields:\n - name: Name\n - name: StageName\n - name: Amount\n - name: CloseDate\n module: Opportunity\n page: RecordPageForModuleOpportunity\n perPage: 5\n prefilter: CampaignId = ${recordID}\n kind: RecordList\n xywh: [0, 21, 8, 8]\n - title: Notes\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n module: Note\n page: RecordPageForModuleNote\n perPage: 5\n prefilter: CampaignId = ${recordID}\n presort: createdAt DESC\n kind: RecordList\n xywh: [8, 21, 4, 8]\n pages:\n - handle: RecordPageForModuleCampaignMember\n module: CampaignMember\n title: Record page for module \"CampaignMember\"\n blocks:\n - title: Campaign Member Details\n options:\n fields:\n - name: CampaignId\n - name: LeadId\n - name: ContactId\n - name: HasResponded\n - name: FirstRespondedDate\n - name: Status\n kind: Record\n xywh: [0, 0, 5, 13]\n visible: false\n visible: false\n visible: true\n - handle: Tasks\n title: Tasks\n blocks:\n - title: List of Tasks\n options:\n fields:\n - name: Subject\n - name: Status\n - name: LeadId\n - name: AccountId\n - name: ContactId\n - name: OpportunityId\n - name: QuoteId\n - name: ContractId\n - name: CaseId\n - name: ActivityDate\n module: Task\n page: RecordPageForModuleTask\n perPage: 20\n prefilter: \"\"\n presort: ActivityDate DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleTask\n module: Task\n title: Record page for module \"Task\"\n blocks:\n - title: Task Details\n options:\n fields:\n - name: Subject\n - name: Description\n - name: Type\n kind: Record\n xywh: [0, 0, 4, 20]\n - title: Related To\n options:\n fields:\n - name: LeadId\n - name: AccountId\n - name: ContactId\n - name: OpportunityId\n - name: QuoteId\n - name: ContractId\n kind: Record\n xywh: [8, 0, 4, 20]\n - title: Task Status\n options:\n fields:\n - name: Status\n - name: ActivityDate\n - name: Priority\n - name: createdBy\n - name: createdAt\n kind: Record\n xywh: [4, 0, 4, 20]\n visible: false\n visible: true\n - handle: Events\n title: Events\n blocks:\n - title: List of Events\n options:\n fields:\n - name: WhoId\n - name: Subject\n - name: ActivityDate\n - name: StartDateTime\n - name: EndDateTime\n - name: LeadId\n - name: AccountId\n - name: OpportunityId\n - name: createdBy\n module: Event\n page: RecordPageForModuleEvent\n perPage: 20\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleEvent\n module: Event\n title: Record page for module \"Event\"\n blocks:\n - title: Event Data\n options:\n fields:\n - name: Subject\n - name: Description\n - name: Location\n - name: createdAt\n - name: createdBy\n kind: Record\n xywh: [0, 0, 4, 20]\n - title: Related Objects\n options:\n fields:\n - name: LeadId\n - name: AccountId\n - name: ContactId\n - name: OpportunityId\n - name: QuoteId\n - name: ContractId\n - name: CaseId\n kind: Record\n xywh: [8, 0, 4, 20]\n - title: Event Date and Time\n options:\n fields:\n - name: ActivityDate\n - name: DurationInMinutes\n - name: EndDateTime\n - name: IsAllDayEvent\n kind: Record\n xywh: [4, 0, 4, 20]\n visible: false\n visible: true\n - handle: Notes\n title: Notes\n blocks:\n - title: List of Notes\n options:\n fields:\n - name: Title\n - name: LeadId\n - name: AccountId\n - name: ContactId\n - name: OpportunityId\n - name: QuoteId\n - name: ContractId\n - name: CaseId\n - name: createdAt\n - name: createdBy\n module: Note\n page: RecordPageForModuleNote\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleNote\n module: Note\n title: Record page for module \"Note\"\n blocks:\n - title: Note\n options:\n fields:\n - name: Title\n - name: Body\n - name: createdAt\n - name: createdBy\n kind: Record\n xywh: [0, 0, 4, 20]\n - title: Files\n options:\n fields:\n - name: FileAdd1\n - name: FileAdd2\n - name: FileAdd3\n - name: FileAdd4\n kind: Record\n xywh: [4, 0, 4, 20]\n - title: Related Objects\n options:\n fields:\n - name: LeadId\n - name: AccountId\n - name: ContactId\n - name: OpportunityId\n - name: QuoteId\n - name: ContractId\n - name: CaseId\n kind: Record\n xywh: [8, 0, 4, 20]\n visible: false\n visible: true\n - handle: Dashboards\n title: Dashboards\n blocks:\n - title: Content\n options:\n body:

Each page in Corteza can be a dashboard. You can add text blocks,\n record lists or charts to make a Sales Activities Dashboard, an executive\n dashboard, or any other dashboard you may need, and set the access\n permissions to define who can view or edit the dashboard.

\n kind: Content\n xywh: [0, 0, 5, 16]\n - title: Leads per day\n options:\n chart: LeadsPerDay\n kind: Chart\n xywh: [5, 0, 3, 16]\n pages:\n - handle: Settings\n title: Settings\n description: A list of default values which are called upon in automation\n processes.\n blocks:\n - title: Settings\n options:\n fields:\n - name: createdAt\n - name: updatedAt\n hidePaging: true\n module: Settings\n page: RecordPageForModuleSettings\n perPage: 1\n kind: RecordList\n xywh: [0, 0, 12, 7]\n pages:\n - handle: RecordPageForModuleSettings\n module: Settings\n title: Record page for module \"Settings\"\n blocks:\n - title: Quote Settings\n options:\n fields:\n - name: QuoteNextNumber\n - name: QuoteExpirationDays\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [3, 0, 3, 12]\n - title: Opportunity Settings\n options:\n fields:\n - name: OpportunityCloseDateDays\n - name: OpportunityProbability\n - name: OpportunityForecaseCategory\n - name: OpportunityStagename\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [0, 0, 3, 12]\n - title: Contract Settings\n options:\n fields:\n - name: ContractNextNumber\n - name: ContractDefaultTime\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [6, 0, 3, 12]\n - title: Case Settings\n options:\n fields:\n - name: CaseNextNumber\n - name: SolutionNextNumber\n style:\n variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary}\n kind: Record\n xywh: [9, 0, 3, 12]\n visible: false\n visible: true\n visible: true\n - handle: UnpublishedModules\n title: Unpublished modules\n pages:\n - handle: Questions\n title: Questions\n visible: false\n blocks:\n - title: List of Questions\n options:\n fields:\n - name: Title\n - name: CreatedDate\n - name: NumReplies\n module: Question\n page: RecordPageForModuleQuestion\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleQuestion\n module: Question\n title: Record page for module \"Question\"\n blocks:\n - title: Question Details\n options:\n fields:\n - name: Title\n - name: Body\n - name: NumReplies\n - name: BestReplyId\n - name: UpVotes\n - name: VoteScore\n kind: Record\n xywh: [0, 0, 4, 13]\n - title: Replies\n options:\n fields:\n - name: Body\n - name: Name\n - name: UpVotes\n - name: DownVotes\n - name: VoteTotal\n module: Reply\n page: RecordPageForModuleReply\n perPage: 5\n prefilter: QuestionId = ${recordID}\n kind: RecordList\n xywh: [0, 13, 12, 7]\n - title: Votes\n options:\n fields:\n - name: Score\n module: Vote\n page: RecordPageForModuleVote\n perPage: 8\n prefilter: QuestionId = ${recordID}\n kind: RecordList\n xywh: [4, 0, 8, 13]\n pages:\n - handle: RecordPageForModuleVote\n module: Vote\n title: Record page for module \"Vote\"\n blocks:\n - title: Vote Score\n options:\n fields:\n - name: Score\n - name: CreatedById\n - name: CreatedDate\n kind: Record\n xywh: [0, 0, 4, 13]\n - title: Related Object\n options:\n fields:\n - name: IdeaId\n - name: ReplyId\n - name: QuestionId\n kind: Record\n xywh: [4, 0, 4, 13]\n visible: false\n - handle: RecordPageForModuleReply\n module: Reply\n title: Record page for module \"Reply\"\n blocks:\n - title: Reply Details\n options:\n fields:\n - name: QuestionId\n - name: IdeaId\n - name: Body\n - name: Name\n - name: UpVotes\n - name: DownVotes\n - name: VoteTotal\n kind: Record\n xywh: [0, 0, 6, 20]\n - title: Votes\n options:\n fields:\n - name: Score\n - name: CreatedById\n - name: CreatedDate\n module: Vote\n page: RecordPageForModuleVote\n perPage: 20\n prefilter: ReplyId = ${recordID}\n kind: RecordList\n xywh: [6, 0, 6, 20]\n visible: false\n visible: false\n - handle: Ideas\n title: Ideas\n blocks:\n - title: List of Ideas\n options:\n fields:\n - name: Title\n - name: Categories\n - name: ParentIdeaId\n - name: VoteScore\n - name: Status\n module: Idea\n page: RecordPageForModuleIdea\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleIdea\n module: Idea\n title: Record page for module \"Idea\"\n blocks:\n - title: Idea Details\n options:\n fields:\n - name: Title\n - name: Body\n - name: Categories\n - name: ParentIdeaId\n - name: CreatorName\n - name: Status\n - name: VoteScore\n - name: VoteTotal\n kind: Record\n xywh: [0, 0, 4, 20]\n - title: Votes\n options:\n fields:\n - name: Score\n - name: CreatedById\n - name: CreatedDate\n module: Vote\n page: RecordPageForModuleVote\n perPage: 20\n prefilter: IdeaId = ${recordID}\n kind: RecordList\n xywh: [8, 0, 4, 20]\n - title: Replies\n options:\n fields:\n - name: Body\n - name: Name\n - name: UpVotes\n - name: DownVotes\n - name: VoteTotal\n module: Reply\n page: RecordPageForModuleReply\n perPage: 20\n prefilter: IdeaId = ${recordID}\n kind: RecordList\n xywh: [4, 0, 4, 20]\n visible: false\n visible: false\n - handle: Emails\n title: Emails\n blocks:\n - title: List of Email Templates\n options:\n fields:\n - name: Name\n - name: IsActive\n - name: createdBy\n module: EmailTemplate\n page: RecordPageForModuleEmailTemplate\n perPage: 20\n presort: createdAt DESC\n kind: RecordList\n xywh: [0, 0, 12, 20]\n pages:\n - handle: RecordPageForModuleEmailTemplate\n module: EmailTemplate\n title: Record page for module \"EmailTemplate\"\n blocks:\n - title: Email Template Details\n options:\n fields:\n - name: Name\n - name: Subject\n - name: Description\n - name: Body\n - name: IsActive\n kind: Record\n xywh: [0, 0, 6, 19]\n visible: false\n visible: false\n visible: false\nPK\x07\x08\xa7\xd8\xefxm \x01\x00m \x01\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00 \x001500_record_settings.yamlUT\x05\x00\x01\x80Cm8namespace: crm\nrecords:\n Settings:\n - values:\n QuoteExpirationDays: \"30\"\n QuoteNextNumber: \"1\"\n OpportunityCloseDateDays: \"30\"\n OpportunityProbability: \"10\"\n OpportunityForecaseCategory: \"Pipeline\"\n OpportunityStagename: \"Qualification\"\n ContractNextNumber: \"1\"\n ContractDefaultTime: \"12\"\n CaseNextNumber: \"1\"\n SolutionNextNumber: \"1\"\nPK\x07\x08+t\xf5;\x83\x01\x00\x00\x83\x01\x00\x00PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xe2u&+\xaf\x02\x00\x00\xaf\x02\x00\x00\x18\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\x00\x00\x00\x000000_access_control.yamlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xe8\x0c\x08\xf3\x88\x00\x00\x00\x88\x00\x00\x00\x13\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\xfe\x02\x00\x001000_namespace.yamlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(r<\x06\xf9\xc9-\x02\x00\xc9-\x02\x00\x11\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\xd0\x03\x00\x001100_modules.yamlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x18\x18\xf1\xc2\xb0 \x00\x00\xb0 \x00\x00\x10\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\xe11\x02\x001200_charts.yamlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(>\x16\x18\x81\xf1\x05\x01\x00\xf1\x05\x01\x00\x11\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\xd8;\x02\x001300_scripts.yamlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xa7\xd8\xefxm \x01\x00m \x01\x00\x0f\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\x11B\x03\x001400_pages.yamlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(+t\xf5;\x83\x01\x00\x00\x83\x01\x00\x00\x19\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\xc4b\x04\x001500_record_settings.yamlUT\x05\x00\x01\x80Cm8PK\x05\x06\x00\x00\x00\x00\x07\x00\x07\x00\x06\x02\x00\x00\x97d\x04\x00\x00\x00" diff --git a/provision/messaging/static.go b/provision/messaging/static.go index 25c8c4e9f..ec524c9e9 100644 --- a/provision/messaging/static.go +++ b/provision/messaging/static.go @@ -3,4 +3,4 @@ // Package contains static assets. package messaging -var Asset = "PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00 \x000000_access_control.yamlUT\x05\x00\x01\x80Cm8allow:\n everyone:\n messaging:\n - access\n\n admins:\n messaging:\n - access\n - grant\n - channel.public.create\n - channel.private.create\n - channel.group.create\n\n messaging:channel:\n - update\n - leave\n - read\n - join\n - delete\n - undelete\n - archive\n - unarchive\n - members.manage\n - attachments.manage\n - message.attach\n - message.update.all\n - message.update.own\n - message.delete.all\n - message.delete.own\n - message.embed\n - message.send\n - message.reply\n - message.react\n\nPK\x07\x08\xa5\xf4PT`\x02\x00\x00`\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x00 \x001000_channels.yamlUT\x05\x00\x01\x80Cm8channels:\n - name: General\n type: public\n - name: Random\n type: public\nPK\x07\x08\xe8\x83F\xf8O\x00\x00\x00O\x00\x00\x00PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xa5\xf4PT`\x02\x00\x00`\x02\x00\x00\x18\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x00\x00\x00\x000000_access_control.yamlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xe8\x83F\xf8O\x00\x00\x00O\x00\x00\x00\x12\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xaf\x02\x00\x001000_channels.yamlUT\x05\x00\x01\x80Cm8PK\x05\x06\x00\x00\x00\x00\x02\x00\x02\x00\x98\x00\x00\x00G\x03\x00\x00\x00\x00" +var Asset = "PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00 \x000000_access_control.yamlUT\x05\x00\x01\x80Cm8allow:\n everyone:\n messaging:\n - access\n\n admins:\n messaging:\n - access\n - grant\n - channel.public.create\n - channel.private.create\n - channel.group.create\n\n messaging:channel:\n - update\n - leave\n - read\n - join\n - delete\n - undelete\n - archive\n - unarchive\n - members.manage\n - attachments.manage\n - message.attach\n - message.update.all\n - message.update.own\n - message.delete.all\n - message.delete.own\n - message.embed\n - message.send\n - message.reply\n - message.react\n\nPK\x07\x08\xa5\xf4PT`\x02\x00\x00`\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x00 \x001000_channels.yamlUT\x05\x00\x01\x80Cm8channels:\n - name: General\n type: public\n - name: Random\n type: public\nPK\x07\x08\xe8\x83F\xf8O\x00\x00\x00O\x00\x00\x00PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xa5\xf4PT`\x02\x00\x00`\x02\x00\x00\x18\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\x00\x00\x00\x000000_access_control.yamlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xe8\x83F\xf8O\x00\x00\x00O\x00\x00\x00\x12\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\xaf\x02\x00\x001000_channels.yamlUT\x05\x00\x01\x80Cm8PK\x05\x06\x00\x00\x00\x00\x02\x00\x02\x00\x98\x00\x00\x00G\x03\x00\x00\x00\x00" diff --git a/provision/system/static.go b/provision/system/static.go index 9d9221e1f..6ec43e878 100644 --- a/provision/system/static.go +++ b/provision/system/static.go @@ -3,4 +3,4 @@ // Package contains static assets. package system -var Asset = "PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00 \x000000_access_control.yamlUT\x05\x00\x01\x80Cm8allow:\n admins:\n system:\n - access\n - grant\n - settings.read\n - settings.manage\n - organisation.create\n - application.create\n - user.create\n - role.create\n - automation-script.create\n\n system:application:\n - read\n - update\n - delete\n\n system:user:\n - read\n - update\n - suspend\n - unsuspend\n - delete\n\n system:role:\n - read\n - update\n - delete\n - members.manage\n\n system:automation-script:\n - read\n - update\n - delete\nPK\x07\x08\xd3\xa84K)\x02\x00\x00)\x02\x00\x00PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xd3\xa84K)\x02\x00\x00)\x02\x00\x00\x18\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x00\x00\x00\x000000_access_control.yamlUT\x05\x00\x01\x80Cm8PK\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00O\x00\x00\x00x\x02\x00\x00\x00\x00" +var Asset = "PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00 \x000000_access_control.yamlUT\x05\x00\x01\x80Cm8allow:\n admins:\n system:\n - access\n - grant\n - settings.read\n - settings.manage\n - organisation.create\n - application.create\n - user.create\n - role.create\n - automation-script.create\n\n system:application:\n - read\n - update\n - delete\n\n system:user:\n - read\n - update\n - suspend\n - unsuspend\n - delete\n\n system:role:\n - read\n - update\n - delete\n - members.manage\n\n system:automation-script:\n - read\n - update\n - delete\nPK\x07\x08\xd3\xa84K)\x02\x00\x00)\x02\x00\x00PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xd3\xa84K)\x02\x00\x00)\x02\x00\x00\x18\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\x00\x00\x00\x000000_access_control.yamlUT\x05\x00\x01\x80Cm8PK\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00O\x00\x00\x00x\x02\x00\x00\x00\x00" diff --git a/system/db/mysql/static.go b/system/db/mysql/static.go index 0d943ffb0..b83ab53e1 100644 --- a/system/db/mysql/static.go +++ b/system/db/mysql/static.go @@ -3,4 +3,4 @@ // Package contains static assets. package mysql -var Asset = "PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00 \x0020180704080000.base.up.sqlUT\x05\x00\x01\x80Cm8-- all known organisations (crust instances) and our relation towards them\nCREATE TABLE organisations (\n id BIGINT UNSIGNED NOT NULL,\n fqn TEXT NOT NULL, -- fully qualified name of the organisation\n name TEXT NOT NULL, -- display name of the organisation\n\n created_at DATETIME NOT NULL DEFAULT NOW(),\n updated_at DATETIME NULL,\n archived_at DATETIME NULL,\n deleted_at DATETIME NULL, -- organisation soft delete\n\n PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE settings (\n name VARCHAR(200) NOT NULL COMMENT 'Unique set of setting keys',\n value TEXT COMMENT 'Setting value',\n\n PRIMARY KEY (name)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\n-- Keeps all known users, home and external organisation\n-- changes are stored in audit log\nCREATE TABLE users (\n id BIGINT UNSIGNED NOT NULL,\n email TEXT NOT NULL,\n username TEXT NOT NULL,\n password TEXT NOT NULL,\n name TEXT NOT NULL,\n handle TEXT NOT NULL,\n meta JSON NOT NULL,\n satosa_id CHAR(36) NULL,\n\n rel_organisation BIGINT UNSIGNED NOT NULL,\n\n created_at DATETIME NOT NULL DEFAULT NOW(),\n updated_at DATETIME NULL,\n suspended_at DATETIME NULL,\n deleted_at DATETIME NULL, -- user soft delete\n\n PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE UNIQUE INDEX uid_satosa ON users (satosa_id);\n\n-- Keeps all known teams\nCREATE TABLE teams (\n id BIGINT UNSIGNED NOT NULL,\n name TEXT NOT NULL, -- display name of the team\n handle TEXT NOT NULL, -- team handle string\n\n created_at DATETIME NOT NULL DEFAULT NOW(),\n updated_at DATETIME NULL,\n archived_at DATETIME NULL,\n deleted_at DATETIME NULL, -- team soft delete\n\n PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\n-- Keeps team memberships\nCREATE TABLE team_members (\n rel_team BIGINT UNSIGNED NOT NULL REFERENCES organisation(id),\n rel_user BIGINT UNSIGNED NOT NULL,\n\n PRIMARY KEY (rel_team, rel_user)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nPK\x07\x08\xedzU\x8am \x00\x00m \x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00.\x00 \x0020181124181811.rename_and_prefix_tables.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE teams RENAME TO sys_team;\nALTER TABLE organisations RENAME TO sys_organisation;\nALTER TABLE team_members RENAME TO sys_team_member;\nALTER TABLE users RENAME TO sys_user;PK\x07\x08\xf2\xc4\x87\xe8\xb5\x00\x00\x00\xb5\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-\x00 \x0020181125100429.add_user_kind_and_owner.up.sqlUT\x05\x00\x01\x80Cm8# add field to manage user type (bot support)\nALTER TABLE `sys_user` ADD `kind` VARCHAR(8) NOT NULL DEFAULT '' AFTER `handle`;\n\n# add field to manage \"ownership\" (get all bots created by user)\nALTER TABLE `sys_user` ADD `rel_user_id` BIGINT UNSIGNED NOT NULL AFTER `rel_organisation`, ADD INDEX (`rel_user_id`);\nPK\x07\x089\xa0\xdat8\x01\x00\x008\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-\x00 \x0020181125153544.satosa_index_not_unique.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `sys_user` DROP INDEX `uid_satosa`, ADD INDEX `uid_satosa` (`satosa_id`) USING BTREE;PK\x07\x08\x0d\xf9\xd3ga\x00\x00\x00a\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\x00 \x0020181208140000.credentials.up.sqlUT\x05\x00\x01\x80Cm8-- Keeps all known users, home and external organisation\n-- changes are stored in audit log\nCREATE TABLE sys_credentials (\n id BIGINT UNSIGNED NOT NULL,\n rel_owner BIGINT UNSIGNED NOT NULL REFERENCES sys_users(id),\n label TEXT NOT NULL COMMENT 'something we can differentiate credentials by',\n kind VARCHAR(128) NOT NULL COMMENT 'hash, facebook, gplus, github, linkedin ...',\n credentials TEXT NOT NULL COMMENT 'crypted/hashed passwords, secrets, social profile ID',\n meta JSON NOT NULL,\n expires_at DATETIME NULL,\n\n created_at DATETIME NOT NULL DEFAULT NOW(),\n updated_at DATETIME NULL,\n deleted_at DATETIME NULL, -- user soft delete\n\n PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE INDEX idx_owner ON sys_credentials (rel_owner);\nPK\x07\x08f\x1f\x08\xd0\x9a\x03\x00\x00\x9a\x03\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00)\x00 \x0020190103203201.users-password-null.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `sys_user` MODIFY `password` TEXT NULL;\nPK\x07\x080V\x13\x0f4\x00\x00\x004\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00 \x0020190116102104.rules.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE `sys_rules` (\n `rel_team` BIGINT UNSIGNED NOT NULL,\n `resource` VARCHAR(128) NOT NULL,\n `operation` VARCHAR(128) NOT NULL,\n `value` TINYINT(1) NOT NULL,\n\n PRIMARY KEY (`rel_team`, `resource`, `operation`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nPK\x07\x08\x05\x10[\x91\x05\x01\x00\x00\x05\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00)\x00 \x0020190221001051.rename-team-to-role.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE sys_team RENAME TO sys_role;\nALTER TABLE sys_team_member RENAME TO sys_role_member;\n\nALTER TABLE `sys_role_member` CHANGE COLUMN `rel_team` `rel_role` BIGINT UNSIGNED NOT NULL;\nALTER TABLE `sys_rules` CHANGE COLUMN `rel_team` `rel_role` BIGINT UNSIGNED NOT NULL;\nPK\x07\x08s-\x98\xd0\x13\x01\x00\x00\x13\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00,\x00 \x0020190226160000.system_roles_and_rules.up.sqlUT\x05\x00\x01\x80Cm8REPLACE INTO `sys_role` (`id`, `name`, `handle`) VALUES\n (1, 'Everyone', 'everyone'),\n (2, 'Administrators', 'admins');\n\nPK\x07\x08\x06RHi{\x00\x00\x00{\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\"\x00 \x0020190306205033.applications.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE sys_application (\n id BIGINT UNSIGNED NOT NULL,\n rel_owner BIGINT UNSIGNED NOT NULL REFERENCES sys_users(id),\n name TEXT NOT NULL COMMENT 'something we can differentiate application by',\n enabled BOOL NOT NULL,\n\n unify JSON NULL COMMENT 'unify specific settings',\n\n created_at DATETIME NOT NULL DEFAULT NOW(),\n updated_at DATETIME NULL,\n deleted_at DATETIME NULL, -- user soft delete\n\n PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\n\nREPLACE INTO `sys_application` (`id`, `name`, `enabled`, `rel_owner`, `unify`) VALUES\n( 1, 'Crust Messaging', true, 0,\n '{\"logo\": \"/applications/crust.jpg\", \"icon\": \"/applications/crust_favicon.png\", \"url\": \"/messaging/\", \"listed\": true}'\n),\n( 2, 'Crust CRM', true, 0,\n '{\"logo\": \"/applications/crust.jpg\", \"icon\": \"/applications/crust_favicon.png\", \"url\": \"/crm/\", \"listed\": true}'\n),\n( 3, 'Crust Admin Area', true, 0,\n '{\"logo\": \"/applications/crust.jpg\", \"icon\": \"/applications/crust_favicon.png\", \"url\": \"/admin/\", \"listed\": true}'\n),\n( 4, 'Corteza Jitsi Bridge', true, 0,\n '{\"logo\": \"/applications/jitsi.png\", \"icon\": \"/applications/jitsi_icon.png\", \"url\": \"/bridge/jitsi/\", \"listed\": true}'\n),\n( 5, 'Google Maps', true, 0,\n '{\"logo\": \"/applications/google_maps.png\", \"icon\": \"/applications/google_maps_icon.png\", \"url\": \"/bridge/google-maps/\", \"listed\": true}'\n);\n\nPK\x07\x08Oi\xd5\xd3\xc6\x05\x00\x00\xc6\x05\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00 \x0020190326122000.settings.up.sqlUT\x05\x00\x01\x80Cm8DROP TABLE IF EXISTS `settings`;\n\nCREATE TABLE IF NOT EXISTS `sys_settings` (\n rel_owner BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Value owner, 0 for global settings',\n name VARCHAR(200) NOT NULL COMMENT 'Unique set of setting keys',\n value JSON COMMENT 'Setting value',\n\n updated_at DATETIME NOT NULL DEFAULT NOW() COMMENT 'When was the value updated',\n updated_by BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Who created/updated the value',\n\n PRIMARY KEY (name, rel_owner)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nPK\x07\x08`\xcb\x1b\x81t\x02\x00\x00t\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00#\x00 \x0020190403113201.users-cleanup.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `sys_user` DROP `password`;\nALTER TABLE `sys_user` DROP `satosa_id`;\nALTER TABLE `sys_credentials` ADD `last_used_at` DATETIME NULL;\nPK\x07\x088\x92\x0fs\x91\x00\x00\x00\x91\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00#\x00 \x0020190405090000.internal-auth.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `sys_user` ADD `email_confirmed` BOOLEAN NOT NULL DEFAULT FALSE;\nPK\x07\x08\x8fQs\x8cM\x00\x00\x00M\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\x00 \x0020190506090000.compose-app.up.sqlUT\x05\x00\x01\x80Cm8UPDATE `sys_application`\n SET `name` = 'Crust Compose',\n `unify` = '{\"logo\": \"/applications/crust.jpg\", \"icon\": \"/applications/crust_favicon.png\", \"url\": \"/compose/\", \"listed\": true}'\n WHERE id = 2;\nPK\x07\x08\x10\xe9%]\xd0\x00\x00\x00\xd0\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\x00 \x0020190506090000.permissions.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE IF NOT EXISTS sys_permission_rules (\n rel_role BIGINT UNSIGNED NOT NULL,\n resource VARCHAR(128) NOT NULL,\n operation VARCHAR(128) NOT NULL,\n access TINYINT(1) NOT NULL,\n\n PRIMARY KEY (rel_role, resource, operation)\n) ENGINE=InnoDB;\n\nCREATE TABLE IF NOT EXISTS messaging_permission_rules (\n rel_role BIGINT UNSIGNED NOT NULL,\n resource VARCHAR(128) NOT NULL,\n operation VARCHAR(128) NOT NULL,\n access TINYINT(1) NOT NULL,\n\n PRIMARY KEY (rel_role, resource, operation)\n) ENGINE=InnoDB;\n\nCREATE TABLE IF NOT EXISTS compose_permission_rules (\n rel_role BIGINT UNSIGNED NOT NULL,\n resource VARCHAR(128) NOT NULL,\n operation VARCHAR(128) NOT NULL,\n access TINYINT(1) NOT NULL,\n\n PRIMARY KEY (rel_role, resource, operation)\n) ENGINE=InnoDB;\n\nREPLACE sys_permission_rules\n (rel_role, resource, operation, access)\n SELECT rel_role, resource, operation, `value` - 1 FROM sys_rules WHERE resource LIKE 'system%';\n\nREPLACE compose_permission_rules\n (rel_role, resource, operation, access)\n SELECT rel_role, resource, operation, `value` - 1 FROM sys_rules WHERE resource LIKE 'compose%';\n\nREPLACE messaging_permission_rules\n (rel_role, resource, operation, access)\n SELECT rel_role, resource, operation, `value` - 1 FROM sys_rules WHERE resource LIKE 'messaging%';\n\nDROP TABLE sys_rules;\nPK\x07\x08\x08\xd4\xe0+e\x05\x00\x00e\x05\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00*\x00 \x0020190826085348.migrate-gplus-google.up.sqlUT\x05\x00\x01\x80Cm8/* migrates existing credentials */\nUPDATE sys_credentials SET kind = 'google' WHERE kind = 'gplus';\n\n/* migrates existing settings. */\nUPDATE sys_settings SET name = REPLACE(name, '.gplus.', '.google.') WHERE name LIKE 'auth.external.providers.gplus.%';\nPK\x07\x08<\xac\xedE\xff\x00\x00\x00\xff\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00 \x0020190902080000.automation.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE IF NOT EXISTS sys_automation_script (\n `id` BIGINT(20) UNSIGNED NOT NULL,\n `rel_namespace` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'For compatibility only, not used',\n `name` VARCHAR(64) NOT NULL DEFAULT 'unnamed' COMMENT 'The name of the script',\n `source` TEXT NOT NULL COMMENT 'Source code for the script',\n `source_ref` VARCHAR(200) NOT NULL COMMENT 'Where is the script located (if remote)',\n `async` BOOLEAN NOT NULL DEFAULT FALSE COMMENT 'Do we run this script asynchronously?',\n `rel_runner` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Who is running the script? 0 for invoker',\n `run_in_ua` BOOLEAN NOT NULL DEFAULT FALSE COMMENT 'Run this script inside user-agent environment',\n `timeout` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Any explicit timeout set for this script (milliseconds)?',\n `critical` BOOLEAN NOT NULL DEFAULT TRUE COMMENT 'Is it critical that this script is executed successfully',\n `enabled` BOOLEAN NOT NULL DEFAULT TRUE COMMENT 'Is this script enabled?',\n\n `created_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `updated_at` DATETIME NULL DEFAULT NULL,\n `deleted_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `deleted_at` DATETIME NULL DEFAULT NULL,\n\n PRIMARY KEY (`id`)\n\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE IF NOT EXISTS sys_automation_trigger (\n `id` BIGINT(20) UNSIGNED NOT NULL,\n `rel_script` BIGINT(20) UNSIGNED NOT NULL COMMENT 'Script that is triggered',\n\n `resource` VARCHAR(128) NOT NULL COMMENT 'Resource triggering the event',\n `event` VARCHAR(128) NOT NULL COMMENT 'Event triggered',\n `event_condition`\n TEXT NOT NULL COMMENT 'Trigger condition',\n `enabled` BOOLEAN NOT NULL DEFAULT TRUE COMMENT 'Trigger enabled?',\n\n `weight` INT NOT NULL DEFAULT 0,\n\n `created_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `updated_at` DATETIME NULL DEFAULT NULL,\n `deleted_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `deleted_at` DATETIME NULL DEFAULT NULL,\n\n CONSTRAINT `fk_sys_automation_script` FOREIGN KEY (`rel_script`) REFERENCES `sys_automation_script` (`id`),\n\n PRIMARY KEY (`id`)\n\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nPK\x07\x08\xac\xbb\x1b\x07i\x0b\x00\x00i\x0b\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00 \x0020190924093443.reminders.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE IF NOT EXISTS sys_reminder (\n `id` BIGINT(20) UNSIGNED NOT NULL,\n `resource` VARCHAR(128) NOT NULL COMMENT 'Resource, that this reminder is bound to',\n `payload` JSON NOT NULL COMMENT 'Payload for this reminder',\n `snooze_count` INT NOT NULL DEFAULT 0 COMMENT 'Number of times this reminder was snoozed',\n\n `assigned_to` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Assignee for this reminder',\n `assigned_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'User that assigned this reminder',\n `assigned_at` DATETIME NOT NULL COMMENT 'When the reminder was assigned',\n\n `dismissed_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'User that dismissed this reminder',\n `dismissed_at` DATETIME NULL DEFAULT NULL COMMENT 'Time the reminder was dismissed',\n\n `remind_at` DATETIME NULL DEFAULT NULL COMMENT 'Time the user should be reminded',\n\n `created_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `updated_at` DATETIME NULL DEFAULT NULL,\n `deleted_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `deleted_at` DATETIME NULL DEFAULT NULL,\n\n PRIMARY KEY (`id`)\n\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nPK\x07\x08\n\x10\"\x05X\x06\x00\x00X\x06\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00 \x00migrations.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE IF NOT EXISTS `migrations` (\n `project` varchar(16) NOT NULL COMMENT 'sam, crm, ...',\n `filename` varchar(255) NOT NULL COMMENT 'yyyymmddHHMMSS.sql',\n `statement_index` int(11) NOT NULL COMMENT 'Statement number from SQL file',\n `status` TEXT NOT NULL COMMENT 'ok or full error message',\n PRIMARY KEY (`project`,`filename`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nPK\x07\x08\x0d\xa5T2x\x01\x00\x00x\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00 \x00new.shUT\x05\x00\x01\x80Cm8#!/bin/bash\ntouch $(date +%Y%m%d%H%M%S).up.sqlPK\x07\x08s\xd4N*.\x00\x00\x00.\x00\x00\x00PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xedzU\x8am \x00\x00m \x00\x00\x1a\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x00\x00\x00\x0020180704080000.base.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xf2\xc4\x87\xe8\xb5\x00\x00\x00\xb5\x00\x00\x00.\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xbe \x00\x0020181124181811.rename_and_prefix_tables.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(9\xa0\xdat8\x01\x00\x008\x01\x00\x00-\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xd8\n\x00\x0020181125100429.add_user_kind_and_owner.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x0d\xf9\xd3ga\x00\x00\x00a\x00\x00\x00-\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81t\x0c\x00\x0020181125153544.satosa_index_not_unique.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(f\x1f\x08\xd0\x9a\x03\x00\x00\x9a\x03\x00\x00!\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x819\x0d\x00\x0020181208140000.credentials.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(0V\x13\x0f4\x00\x00\x004\x00\x00\x00)\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81+\x11\x00\x0020190103203201.users-password-null.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x05\x10[\x91\x05\x01\x00\x00\x05\x01\x00\x00\x1b\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xbf\x11\x00\x0020190116102104.rules.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(s-\x98\xd0\x13\x01\x00\x00\x13\x01\x00\x00)\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x16\x13\x00\x0020190221001051.rename-team-to-role.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x06RHi{\x00\x00\x00{\x00\x00\x00,\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x89\x14\x00\x0020190226160000.system_roles_and_rules.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(Oi\xd5\xd3\xc6\x05\x00\x00\xc6\x05\x00\x00\"\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81g\x15\x00\x0020190306205033.applications.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(`\xcb\x1b\x81t\x02\x00\x00t\x02\x00\x00\x1e\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x86\x1b\x00\x0020190326122000.settings.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(8\x92\x0fs\x91\x00\x00\x00\x91\x00\x00\x00#\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81O\x1e\x00\x0020190403113201.users-cleanup.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x8fQs\x8cM\x00\x00\x00M\x00\x00\x00#\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81:\x1f\x00\x0020190405090000.internal-auth.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x10\xe9%]\xd0\x00\x00\x00\xd0\x00\x00\x00!\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xe1\x1f\x00\x0020190506090000.compose-app.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x08\xd4\xe0+e\x05\x00\x00e\x05\x00\x00!\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81 !\x00\x0020190506090000.permissions.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(<\xac\xedE\xff\x00\x00\x00\xff\x00\x00\x00*\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xc6&\x00\x0020190826085348.migrate-gplus-google.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xac\xbb\x1b\x07i\x0b\x00\x00i\x0b\x00\x00 \x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81&(\x00\x0020190902080000.automation.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\n\x10\"\x05X\x06\x00\x00X\x06\x00\x00\x1f\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xe63\x00\x0020190924093443.reminders.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x0d\xa5T2x\x01\x00\x00x\x01\x00\x00\x0e\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x94:\x00\x00migrations.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(s\xd4N*.\x00\x00\x00.\x00\x00\x00\x06\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xed\x81Q<\x00\x00new.shUT\x05\x00\x01\x80Cm8PK\x05\x06\x00\x00\x00\x00\x14\x00\x14\x00\xed\x06\x00\x00\xbc<\x00\x00\x00\x00" +var Asset = "PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00 \x0020180704080000.base.up.sqlUT\x05\x00\x01\x80Cm8-- all known organisations (crust instances) and our relation towards them\nCREATE TABLE organisations (\n id BIGINT UNSIGNED NOT NULL,\n fqn TEXT NOT NULL, -- fully qualified name of the organisation\n name TEXT NOT NULL, -- display name of the organisation\n\n created_at DATETIME NOT NULL DEFAULT NOW(),\n updated_at DATETIME NULL,\n archived_at DATETIME NULL,\n deleted_at DATETIME NULL, -- organisation soft delete\n\n PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE settings (\n name VARCHAR(200) NOT NULL COMMENT 'Unique set of setting keys',\n value TEXT COMMENT 'Setting value',\n\n PRIMARY KEY (name)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\n-- Keeps all known users, home and external organisation\n-- changes are stored in audit log\nCREATE TABLE users (\n id BIGINT UNSIGNED NOT NULL,\n email TEXT NOT NULL,\n username TEXT NOT NULL,\n password TEXT NOT NULL,\n name TEXT NOT NULL,\n handle TEXT NOT NULL,\n meta JSON NOT NULL,\n satosa_id CHAR(36) NULL,\n\n rel_organisation BIGINT UNSIGNED NOT NULL,\n\n created_at DATETIME NOT NULL DEFAULT NOW(),\n updated_at DATETIME NULL,\n suspended_at DATETIME NULL,\n deleted_at DATETIME NULL, -- user soft delete\n\n PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE UNIQUE INDEX uid_satosa ON users (satosa_id);\n\n-- Keeps all known teams\nCREATE TABLE teams (\n id BIGINT UNSIGNED NOT NULL,\n name TEXT NOT NULL, -- display name of the team\n handle TEXT NOT NULL, -- team handle string\n\n created_at DATETIME NOT NULL DEFAULT NOW(),\n updated_at DATETIME NULL,\n archived_at DATETIME NULL,\n deleted_at DATETIME NULL, -- team soft delete\n\n PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\n-- Keeps team memberships\nCREATE TABLE team_members (\n rel_team BIGINT UNSIGNED NOT NULL REFERENCES organisation(id),\n rel_user BIGINT UNSIGNED NOT NULL,\n\n PRIMARY KEY (rel_team, rel_user)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nPK\x07\x08\xedzU\x8am \x00\x00m \x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00.\x00 \x0020181124181811.rename_and_prefix_tables.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE teams RENAME TO sys_team;\nALTER TABLE organisations RENAME TO sys_organisation;\nALTER TABLE team_members RENAME TO sys_team_member;\nALTER TABLE users RENAME TO sys_user;PK\x07\x08\xf2\xc4\x87\xe8\xb5\x00\x00\x00\xb5\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-\x00 \x0020181125100429.add_user_kind_and_owner.up.sqlUT\x05\x00\x01\x80Cm8# add field to manage user type (bot support)\nALTER TABLE `sys_user` ADD `kind` VARCHAR(8) NOT NULL DEFAULT '' AFTER `handle`;\n\n# add field to manage \"ownership\" (get all bots created by user)\nALTER TABLE `sys_user` ADD `rel_user_id` BIGINT UNSIGNED NOT NULL AFTER `rel_organisation`, ADD INDEX (`rel_user_id`);\nPK\x07\x089\xa0\xdat8\x01\x00\x008\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-\x00 \x0020181125153544.satosa_index_not_unique.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `sys_user` DROP INDEX `uid_satosa`, ADD INDEX `uid_satosa` (`satosa_id`) USING BTREE;PK\x07\x08\x0d\xf9\xd3ga\x00\x00\x00a\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\x00 \x0020181208140000.credentials.up.sqlUT\x05\x00\x01\x80Cm8-- Keeps all known users, home and external organisation\n-- changes are stored in audit log\nCREATE TABLE sys_credentials (\n id BIGINT UNSIGNED NOT NULL,\n rel_owner BIGINT UNSIGNED NOT NULL REFERENCES sys_users(id),\n label TEXT NOT NULL COMMENT 'something we can differentiate credentials by',\n kind VARCHAR(128) NOT NULL COMMENT 'hash, facebook, gplus, github, linkedin ...',\n credentials TEXT NOT NULL COMMENT 'crypted/hashed passwords, secrets, social profile ID',\n meta JSON NOT NULL,\n expires_at DATETIME NULL,\n\n created_at DATETIME NOT NULL DEFAULT NOW(),\n updated_at DATETIME NULL,\n deleted_at DATETIME NULL, -- user soft delete\n\n PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE INDEX idx_owner ON sys_credentials (rel_owner);\nPK\x07\x08f\x1f\x08\xd0\x9a\x03\x00\x00\x9a\x03\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00)\x00 \x0020190103203201.users-password-null.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `sys_user` MODIFY `password` TEXT NULL;\nPK\x07\x080V\x13\x0f4\x00\x00\x004\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00 \x0020190116102104.rules.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE `sys_rules` (\n `rel_team` BIGINT UNSIGNED NOT NULL,\n `resource` VARCHAR(128) NOT NULL,\n `operation` VARCHAR(128) NOT NULL,\n `value` TINYINT(1) NOT NULL,\n\n PRIMARY KEY (`rel_team`, `resource`, `operation`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nPK\x07\x08\x05\x10[\x91\x05\x01\x00\x00\x05\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00)\x00 \x0020190221001051.rename-team-to-role.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE sys_team RENAME TO sys_role;\nALTER TABLE sys_team_member RENAME TO sys_role_member;\n\nALTER TABLE `sys_role_member` CHANGE COLUMN `rel_team` `rel_role` BIGINT UNSIGNED NOT NULL;\nALTER TABLE `sys_rules` CHANGE COLUMN `rel_team` `rel_role` BIGINT UNSIGNED NOT NULL;\nPK\x07\x08s-\x98\xd0\x13\x01\x00\x00\x13\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00,\x00 \x0020190226160000.system_roles_and_rules.up.sqlUT\x05\x00\x01\x80Cm8REPLACE INTO `sys_role` (`id`, `name`, `handle`) VALUES\n (1, 'Everyone', 'everyone'),\n (2, 'Administrators', 'admins');\n\nPK\x07\x08\x06RHi{\x00\x00\x00{\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\"\x00 \x0020190306205033.applications.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE sys_application (\n id BIGINT UNSIGNED NOT NULL,\n rel_owner BIGINT UNSIGNED NOT NULL REFERENCES sys_users(id),\n name TEXT NOT NULL COMMENT 'something we can differentiate application by',\n enabled BOOL NOT NULL,\n\n unify JSON NULL COMMENT 'unify specific settings',\n\n created_at DATETIME NOT NULL DEFAULT NOW(),\n updated_at DATETIME NULL,\n deleted_at DATETIME NULL, -- user soft delete\n\n PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\n\nREPLACE INTO `sys_application` (`id`, `name`, `enabled`, `rel_owner`, `unify`) VALUES\n( 1, 'Crust Messaging', true, 0,\n '{\"logo\": \"/applications/crust.jpg\", \"icon\": \"/applications/crust_favicon.png\", \"url\": \"/messaging/\", \"listed\": true}'\n),\n( 2, 'Crust CRM', true, 0,\n '{\"logo\": \"/applications/crust.jpg\", \"icon\": \"/applications/crust_favicon.png\", \"url\": \"/crm/\", \"listed\": true}'\n),\n( 3, 'Crust Admin Area', true, 0,\n '{\"logo\": \"/applications/crust.jpg\", \"icon\": \"/applications/crust_favicon.png\", \"url\": \"/admin/\", \"listed\": true}'\n),\n( 4, 'Corteza Jitsi Bridge', true, 0,\n '{\"logo\": \"/applications/jitsi.png\", \"icon\": \"/applications/jitsi_icon.png\", \"url\": \"/bridge/jitsi/\", \"listed\": true}'\n),\n( 5, 'Google Maps', true, 0,\n '{\"logo\": \"/applications/google_maps.png\", \"icon\": \"/applications/google_maps_icon.png\", \"url\": \"/bridge/google-maps/\", \"listed\": true}'\n);\n\nPK\x07\x08Oi\xd5\xd3\xc6\x05\x00\x00\xc6\x05\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00 \x0020190326122000.settings.up.sqlUT\x05\x00\x01\x80Cm8DROP TABLE IF EXISTS `settings`;\n\nCREATE TABLE IF NOT EXISTS `sys_settings` (\n rel_owner BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Value owner, 0 for global settings',\n name VARCHAR(200) NOT NULL COMMENT 'Unique set of setting keys',\n value JSON COMMENT 'Setting value',\n\n updated_at DATETIME NOT NULL DEFAULT NOW() COMMENT 'When was the value updated',\n updated_by BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Who created/updated the value',\n\n PRIMARY KEY (name, rel_owner)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nPK\x07\x08`\xcb\x1b\x81t\x02\x00\x00t\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00#\x00 \x0020190403113201.users-cleanup.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `sys_user` DROP `password`;\nALTER TABLE `sys_user` DROP `satosa_id`;\nALTER TABLE `sys_credentials` ADD `last_used_at` DATETIME NULL;\nPK\x07\x088\x92\x0fs\x91\x00\x00\x00\x91\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00#\x00 \x0020190405090000.internal-auth.up.sqlUT\x05\x00\x01\x80Cm8ALTER TABLE `sys_user` ADD `email_confirmed` BOOLEAN NOT NULL DEFAULT FALSE;\nPK\x07\x08\x8fQs\x8cM\x00\x00\x00M\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\x00 \x0020190506090000.compose-app.up.sqlUT\x05\x00\x01\x80Cm8UPDATE `sys_application`\n SET `name` = 'Crust Compose',\n `unify` = '{\"logo\": \"/applications/crust.jpg\", \"icon\": \"/applications/crust_favicon.png\", \"url\": \"/compose/\", \"listed\": true}'\n WHERE id = 2;\nPK\x07\x08\x10\xe9%]\xd0\x00\x00\x00\xd0\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\x00 \x0020190506090000.permissions.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE IF NOT EXISTS sys_permission_rules (\n rel_role BIGINT UNSIGNED NOT NULL,\n resource VARCHAR(128) NOT NULL,\n operation VARCHAR(128) NOT NULL,\n access TINYINT(1) NOT NULL,\n\n PRIMARY KEY (rel_role, resource, operation)\n) ENGINE=InnoDB;\n\nCREATE TABLE IF NOT EXISTS messaging_permission_rules (\n rel_role BIGINT UNSIGNED NOT NULL,\n resource VARCHAR(128) NOT NULL,\n operation VARCHAR(128) NOT NULL,\n access TINYINT(1) NOT NULL,\n\n PRIMARY KEY (rel_role, resource, operation)\n) ENGINE=InnoDB;\n\nCREATE TABLE IF NOT EXISTS compose_permission_rules (\n rel_role BIGINT UNSIGNED NOT NULL,\n resource VARCHAR(128) NOT NULL,\n operation VARCHAR(128) NOT NULL,\n access TINYINT(1) NOT NULL,\n\n PRIMARY KEY (rel_role, resource, operation)\n) ENGINE=InnoDB;\n\nREPLACE sys_permission_rules\n (rel_role, resource, operation, access)\n SELECT rel_role, resource, operation, `value` - 1 FROM sys_rules WHERE resource LIKE 'system%';\n\nREPLACE compose_permission_rules\n (rel_role, resource, operation, access)\n SELECT rel_role, resource, operation, `value` - 1 FROM sys_rules WHERE resource LIKE 'compose%';\n\nREPLACE messaging_permission_rules\n (rel_role, resource, operation, access)\n SELECT rel_role, resource, operation, `value` - 1 FROM sys_rules WHERE resource LIKE 'messaging%';\n\nDROP TABLE sys_rules;\nPK\x07\x08\x08\xd4\xe0+e\x05\x00\x00e\x05\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00*\x00 \x0020190826085348.migrate-gplus-google.up.sqlUT\x05\x00\x01\x80Cm8/* migrates existing credentials */\nUPDATE sys_credentials SET kind = 'google' WHERE kind = 'gplus';\n\n/* migrates existing settings. */\nUPDATE sys_settings SET name = REPLACE(name, '.gplus.', '.google.') WHERE name LIKE 'auth.external.providers.gplus.%';\nPK\x07\x08<\xac\xedE\xff\x00\x00\x00\xff\x00\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00 \x0020190902080000.automation.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE IF NOT EXISTS sys_automation_script (\n `id` BIGINT(20) UNSIGNED NOT NULL,\n `rel_namespace` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'For compatibility only, not used',\n `name` VARCHAR(64) NOT NULL DEFAULT 'unnamed' COMMENT 'The name of the script',\n `source` TEXT NOT NULL COMMENT 'Source code for the script',\n `source_ref` VARCHAR(200) NOT NULL COMMENT 'Where is the script located (if remote)',\n `async` BOOLEAN NOT NULL DEFAULT FALSE COMMENT 'Do we run this script asynchronously?',\n `rel_runner` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Who is running the script? 0 for invoker',\n `run_in_ua` BOOLEAN NOT NULL DEFAULT FALSE COMMENT 'Run this script inside user-agent environment',\n `timeout` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Any explicit timeout set for this script (milliseconds)?',\n `critical` BOOLEAN NOT NULL DEFAULT TRUE COMMENT 'Is it critical that this script is executed successfully',\n `enabled` BOOLEAN NOT NULL DEFAULT TRUE COMMENT 'Is this script enabled?',\n\n `created_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `updated_at` DATETIME NULL DEFAULT NULL,\n `deleted_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `deleted_at` DATETIME NULL DEFAULT NULL,\n\n PRIMARY KEY (`id`)\n\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE IF NOT EXISTS sys_automation_trigger (\n `id` BIGINT(20) UNSIGNED NOT NULL,\n `rel_script` BIGINT(20) UNSIGNED NOT NULL COMMENT 'Script that is triggered',\n\n `resource` VARCHAR(128) NOT NULL COMMENT 'Resource triggering the event',\n `event` VARCHAR(128) NOT NULL COMMENT 'Event triggered',\n `event_condition`\n TEXT NOT NULL COMMENT 'Trigger condition',\n `enabled` BOOLEAN NOT NULL DEFAULT TRUE COMMENT 'Trigger enabled?',\n\n `weight` INT NOT NULL DEFAULT 0,\n\n `created_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `updated_at` DATETIME NULL DEFAULT NULL,\n `deleted_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `deleted_at` DATETIME NULL DEFAULT NULL,\n\n CONSTRAINT `fk_sys_automation_script` FOREIGN KEY (`rel_script`) REFERENCES `sys_automation_script` (`id`),\n\n PRIMARY KEY (`id`)\n\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nPK\x07\x08\xac\xbb\x1b\x07i\x0b\x00\x00i\x0b\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00 \x0020190924093443.reminders.up.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE IF NOT EXISTS sys_reminder (\n `id` BIGINT(20) UNSIGNED NOT NULL,\n `resource` VARCHAR(128) NOT NULL COMMENT 'Resource, that this reminder is bound to',\n `payload` JSON NOT NULL COMMENT 'Payload for this reminder',\n `snooze_count` INT NOT NULL DEFAULT 0 COMMENT 'Number of times this reminder was snoozed',\n\n `assigned_to` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Assignee for this reminder',\n `assigned_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'User that assigned this reminder',\n `assigned_at` DATETIME NOT NULL COMMENT 'When the reminder was assigned',\n\n `dismissed_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'User that dismissed this reminder',\n `dismissed_at` DATETIME NULL DEFAULT NULL COMMENT 'Time the reminder was dismissed',\n\n `remind_at` DATETIME NULL DEFAULT NULL COMMENT 'Time the user should be reminded',\n\n `created_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updated_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `updated_at` DATETIME NULL DEFAULT NULL,\n `deleted_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\n `deleted_at` DATETIME NULL DEFAULT NULL,\n\n PRIMARY KEY (`id`)\n\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nPK\x07\x08\n\x10\"\x05X\x06\x00\x00X\x06\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00 \x00migrations.sqlUT\x05\x00\x01\x80Cm8CREATE TABLE IF NOT EXISTS `migrations` (\n `project` varchar(16) NOT NULL COMMENT 'sam, crm, ...',\n `filename` varchar(255) NOT NULL COMMENT 'yyyymmddHHMMSS.sql',\n `statement_index` int(11) NOT NULL COMMENT 'Statement number from SQL file',\n `status` TEXT NOT NULL COMMENT 'ok or full error message',\n PRIMARY KEY (`project`,`filename`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nPK\x07\x08\x0d\xa5T2x\x01\x00\x00x\x01\x00\x00PK\x03\x04\x14\x00\x08\x00\x00\x00\x00\x00!(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00 \x00new.shUT\x05\x00\x01\x80Cm8#!/bin/bash\ntouch $(date +%Y%m%d%H%M%S).up.sqlPK\x07\x08s\xd4N*.\x00\x00\x00.\x00\x00\x00PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xedzU\x8am \x00\x00m \x00\x00\x1a\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x00\x00\x00\x0020180704080000.base.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xf2\xc4\x87\xe8\xb5\x00\x00\x00\xb5\x00\x00\x00.\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xbe \x00\x0020181124181811.rename_and_prefix_tables.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(9\xa0\xdat8\x01\x00\x008\x01\x00\x00-\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xd8\n\x00\x0020181125100429.add_user_kind_and_owner.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x0d\xf9\xd3ga\x00\x00\x00a\x00\x00\x00-\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81t\x0c\x00\x0020181125153544.satosa_index_not_unique.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(f\x1f\x08\xd0\x9a\x03\x00\x00\x9a\x03\x00\x00!\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x819\x0d\x00\x0020181208140000.credentials.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(0V\x13\x0f4\x00\x00\x004\x00\x00\x00)\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81+\x11\x00\x0020190103203201.users-password-null.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x05\x10[\x91\x05\x01\x00\x00\x05\x01\x00\x00\x1b\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xbf\x11\x00\x0020190116102104.rules.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(s-\x98\xd0\x13\x01\x00\x00\x13\x01\x00\x00)\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x16\x13\x00\x0020190221001051.rename-team-to-role.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x06RHi{\x00\x00\x00{\x00\x00\x00,\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\x89\x14\x00\x0020190226160000.system_roles_and_rules.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(Oi\xd5\xd3\xc6\x05\x00\x00\xc6\x05\x00\x00\"\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81g\x15\x00\x0020190306205033.applications.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(`\xcb\x1b\x81t\x02\x00\x00t\x02\x00\x00\x1e\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x86\x1b\x00\x0020190326122000.settings.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(8\x92\x0fs\x91\x00\x00\x00\x91\x00\x00\x00#\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81O\x1e\x00\x0020190403113201.users-cleanup.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x8fQs\x8cM\x00\x00\x00M\x00\x00\x00#\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81:\x1f\x00\x0020190405090000.internal-auth.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x10\xe9%]\xd0\x00\x00\x00\xd0\x00\x00\x00!\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xe1\x1f\x00\x0020190506090000.compose-app.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x08\xd4\xe0+e\x05\x00\x00e\x05\x00\x00!\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81 !\x00\x0020190506090000.permissions.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(<\xac\xedE\xff\x00\x00\x00\xff\x00\x00\x00*\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\xc6&\x00\x0020190826085348.migrate-gplus-google.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\xac\xbb\x1b\x07i\x0b\x00\x00i\x0b\x00\x00 \x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81&(\x00\x0020190902080000.automation.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\n\x10\"\x05X\x06\x00\x00X\x06\x00\x00\x1f\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\xe63\x00\x0020190924093443.reminders.up.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(\x0d\xa5T2x\x01\x00\x00x\x01\x00\x00\x0e\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x94:\x00\x00migrations.sqlUT\x05\x00\x01\x80Cm8PK\x01\x02\x14\x03\x14\x00\x08\x00\x00\x00\x00\x00!(s\xd4N*.\x00\x00\x00.\x00\x00\x00\x06\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xed\x81Q<\x00\x00new.shUT\x05\x00\x01\x80Cm8PK\x05\x06\x00\x00\x00\x00\x14\x00\x14\x00\xed\x06\x00\x00\xbc<\x00\x00\x00\x00"