Skip to content

Commit 6397ded

Browse files
authored
@W-19036375 - Updates messages to be more uesful (#56)
* chore: updates messages to be more uesful
1 parent 4165af3 commit 6397ded

14 files changed

+800
-364
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[![License](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](https://opensource.org/license/apache-2-0)
66

7-
A Salesforce CLI plugin for working with AppFramework apps, templates, assets, and services.
7+
A Salesforce CLI plugin for working with orchestrated apps, templates, assets, and services.
88

99
## Installation
1010

@@ -59,7 +59,7 @@ yarn test:nuts
5959

6060
## Commands
6161

62-
The plugin provides commands for working with AppFramework templates and applications.
62+
The plugin provides commands for working with templates and apps.
6363

6464
### Template Commands
6565

Lines changed: 92 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,118 @@
11
# summary
22

3-
Create a new AppFramework app from a template.
3+
Create a new app from a template.
44

55
# description
66

7-
Creates a new app from an existing template. The app will be initialized with the configuration defined in the template.
7+
Create a new orchestrated app using an existing template as the foundation. The app is initialized with the configuration, structure, and settings defined in the template, providing a quick start for app development.
8+
9+
You can identify the template to use by either its unique ID or its name. Template IDs are guaranteed to be unique, while template names should be unique within an org. The new app inherits the template's configuration, but can be customized independently after creation.
10+
11+
Use this command to quickly create apps with consistent configurations and accelerate your development workflow. The created app assets appear in Data Cloud and Tableau Next where you can customize as needed. You can manage the app from the App Install History page in Setup.
12+
13+
You must have Data Cloud and Tableau Next enabled in your org and the AppFrameworkManageApp user permission to create apps. Both the template and the new app must be in the same org.
14+
15+
# examples
16+
17+
- Create an app from a template by ID:
18+
19+
<%= config.bin %> <%= command.id %> --target-org myOrg --name "my_app" --template-id 01t000000000123
20+
21+
- Create an app from a template by name:
22+
23+
<%= config.bin %> <%= command.id %> --target-org myOrg --name "sales_app" --template-name "Sales_Template"
24+
25+
- Create an app with a custom label and description:
26+
27+
<%= config.bin %> <%= command.id %> --target-org myOrg --name "analytics_app" --template-name "Analytics_Template" --label "My Analytics App" --description "Custom analytics app"
28+
29+
- Create an app with specific runtime configuration:
30+
31+
<%= config.bin %> <%= command.id %> --target-org myOrg --name "dashboard_app" --template-id 01t000000000456 --runtime-method async --log-level debug
32+
33+
- Create an app using a specific API version:
34+
35+
<%= config.bin %> <%= command.id %> --target-org mySandbox --name "test_app" --template-name "Test Template" --api-version 60.0
836

937
# flags.target-org.summary
1038

11-
Username or alias of the target org.
39+
Login username or alias for the target org.
1240

1341
# flags.target-org.description
1442

15-
Username or alias of the target org. Not required if the `target-org` configuration variable is already set.
43+
The target org to connect to for creating the app. This org must have Data Cloud and Tableau Next enabled and you must have the AppFrameworkManageApp user permission to create apps. The template must also exist in this org.
1644

1745
# flags.api-version.summary
1846

19-
Override the api version used for api requests made by this command.
47+
Override the API version used for API requests.
2048

2149
# flags.api-version.description
2250

23-
Override the api version used for api requests made by this command.
51+
Override the API version used for orchestrator API requests. Use this flag to specify a particular API version when the default version doesn't work with your org's configuration.
2452

2553
# flags.name.summary
2654

27-
Name for the new app (required)
55+
Name for the new app.
2856

2957
# flags.name.description
3058

31-
A unique identifier for the app. Must be unique within your org.
59+
A unique identifier for the app. Must be unique within your org. Use descriptive names that help identify the app's purpose. App names should follow your org's naming conventions.
3260

3361
# flags.label.summary
3462

35-
Label for the new app
63+
Label for the new app.
3664

3765
# flags.label.description
3866

39-
A human-readable label for the app. If not provided, the name will be used.
67+
A human-readable label for the app. This is displayed on the App Install History setup page and helps users identify the app's purpose. If not provided, the name will be used as the label.
4068

4169
# flags.description.summary
4270

43-
Description of the new app
71+
Description of the new app.
4472

4573
# flags.description.description
4674

47-
A description of what the app does.
75+
A description of what the app does and its intended use case. This helps users understand the app's purpose and functionality. The description appears on the App Install History page.
4876

4977
# flags.template-id.summary
5078

51-
ID of the template to use for creating the app
79+
ID of the template to use for creating the app.
5280

5381
# flags.template-id.description
5482

55-
ID of an existing template to use for creating the app. Either template-id or template-name must be provided.
83+
The unique identifier of the template to use for generating the new app.
5684

5785
# flags.template-name.summary
5886

59-
Name of the template to use for creating the app
87+
Name of the template to use for creating the app.
6088

6189
# flags.template-name.description
6290

63-
Name of an existing template to use for creating the app. Either template-id or template-name must be provided.
91+
The name of the template to use for generating the new app.
6492

6593
# flags.runtime-method.summary
6694

67-
Runtime method for the app (sync or async)
95+
Runtime method for the app.
6896

6997
# flags.runtime-method.description
7098

71-
Specifies how the app's runtime operates, either synchronously or asynchronously.
99+
Specifies the runtime method for the app execution. This affects how the app processes data and handles user interactions. Valid values are 'sync' and 'async'.
72100

73101
# flags.log-level.summary
74102

75-
Log level for the app
103+
Log level for the app.
76104

77105
# flags.log-level.description
78106

79-
Sets the logging level for the app. Valid options are: debug, info, warn, error.
107+
Sets the logging level for the app. This controls how much diagnostic information is captured during app execution. Valid values are 'debug', 'info', 'warn', and 'error'.
108+
109+
# noTemplateSpecified
110+
111+
No template specified. You must specify either a template ID with --template-id or a template name with --template-name.
80112

81113
# fetchingTemplate
82114

83-
Fetching template information...
115+
Fetching template details...
84116

85117
# creatingApp
86118

@@ -90,35 +122,57 @@ Creating app from template...
90122

91123
Successfully created app with ID: %s
92124

93-
# noTemplateSpecified
125+
# error.MissingRequiredFlag
126+
127+
Either --template-id or --template-name must be provided.
94128

95-
Either template-id or template-name must be specified.
129+
# error.MissingRequiredFlag.Actions
130+
131+
- Use --template-id to specify a template by its unique ID
132+
- Use --template-name to specify a template by its name
133+
- Get template IDs and names using "sf orchestrator template list"
96134

97135
# error.TemplateNotFound
98136

99-
Template not found. Please check the template ID or name and try again.
137+
Template not found.
100138

101139
# error.TemplateNotFound.Actions
102140

103-
- Verify that the template exists in your organization
104-
- Check that you have spelled the template name correctly
105-
- Try using the template ID instead of the name
141+
- Verify the template ID or name is correct
142+
- Use "sf orchestrator template list" to see available templates
143+
- Check your permissions to view templates
144+
- Make sure you're connected to the correct org with --target-org
106145

107146
# error.AppCreationError
108147

109-
An error occurred while creating the app: %s
148+
Failed to create app: %s
110149

111150
# error.AppCreationError.Actions
112151

113-
- Check the error message above for more details
114-
- Ensure that AppFramework is enabled in your org
115-
- Ensure that your user has the necessary permissions
152+
- Verify that you have permission to create apps in the target org
153+
- Ensure the app name is unique within your org
154+
- Check that Data Cloud and Tableau Next are enabled in your org
155+
- Verify your authentication and org connection are valid
156+
- Try using a different API version with --api-version
116157

117-
# examples
158+
# error.InvalidAppName
118159

119-
- Create a new app using a template ID:
120-
<%= config.bin %> <%= command.id %> --target-org myOrg --name "my_app" --template-id 01t000000000123
121-
- Create a new app using a template name:
122-
<%= config.bin %> <%= command.id %> --target-org myOrg --name "sales_app" --template-name "Sales_Template"
123-
- Create a new app with additional details:
124-
<%= config.bin %> <%= command.id %> --target-org myOrg --name "analytics_app" --template-name "Analytics_Template" --label "My Analytics App" --description "Custom analytics application" --runtime-method async --log-level debug
160+
App name "%s" is invalid or already exists.
161+
162+
# error.InvalidAppName.Actions
163+
164+
- Choose a unique name that doesn't exist in your org
165+
- Ensure the name follows your org's naming conventions
166+
- Use "sf orchestrator app list" to see existing app names
167+
- Avoid special characters and spaces in app names
168+
169+
# error.InsufficientPermissions
170+
171+
You don't have permission to create apps in this org.
172+
173+
# error.InsufficientPermissions.Actions
174+
175+
- Contact your Salesforce admin to request app creation permissions
176+
- Verify you're connected to the correct org with --target-org
177+
- Check that Data Cloud and Tableau Next are enabled in your org
178+
- Check that your user profile has the AppFrameworkManageApp user permission
Lines changed: 74 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,92 @@
11
# summary
22

3-
Create a new AppFramework template.
3+
Create a new template.
44

55
# description
66

7-
Creates a new empty template that can be customized. Templates allow you to define reusable configurations for AppFramework applications.
7+
Create a new template that can be used as a blueprint for building orchestrated apps. Templates allow you to define reusable configurations, layouts, and settings that can be shared across multiple apps.
8+
9+
Once created, templates appear in Tableau Next where users can use them to create new apps. Templates help standardize app development and ensure consistency across your org.
10+
11+
You must have Data Cloud and Tableau Next enabled in your org and the AppFrameworkManageApp user permission to create templates. The template name must be unique within your org. This command works with production orgs, sandboxes, and scratch orgs that have orchestrated apps configured.
12+
13+
# examples
14+
15+
- Create a basic app template:
16+
17+
<%= config.bin %> <%= command.id %> --target-org myOrg --name "my_template"
18+
19+
- Create a template with a label for better identification:
20+
21+
<%= config.bin %> <%= command.id %> --target-org myOrg --name "sales_template" --label "Sales Analytics Template"
22+
23+
- Create a dashboard template with a specific subtype:
24+
25+
<%= config.bin %> <%= command.id %> --target-org myOrg --name "dashboard_template" --type dashboard --subtype "analytics"
26+
27+
- Create a comprehensive template with all metadata:
28+
29+
<%= config.bin %> <%= command.id %> --target-org myOrg --name "analytics_template" --type app --subtype "tableau" --label "Sales Template" --description "Template for sales analytics apps"
30+
31+
- Create a template using a specific API version:
32+
33+
<%= config.bin %> <%= command.id %> --target-org myOrg --name "legacy_template" --api-version 60.0
834

935
# flags.target-org.summary
1036

11-
Login username or alias for the target org
37+
Login username or alias for the target org.
1238

1339
# flags.target-org.description
1440

15-
The target org to connect to for creating the template.
41+
The target org to connect to for creating the template. This org must have Data Cloud and Tableau Next enabled and you must have the AppFrameworkManageApp user permission to create templates.
1642

1743
# flags.api-version.summary
1844

19-
Override the api version used for api requests
45+
Override the API version used for API requests.
2046

2147
# flags.api-version.description
2248

23-
Override the api version used for api requests to the app framework.
49+
Override the API version used for orchestrator API requests. Use this flag to specify a particular API version when the default version doesn't work with your org's configuration.
2450

2551
# flags.name.summary
2652

27-
Name for the new template (required)
53+
Name for the new template.
2854

2955
# flags.name.description
3056

31-
A unique identifier for the template. Must be unique within your org.
57+
A unique identifier for the template. Must be unique within your org. Use descriptive names that help identify the template's purpose. Template names should follow your org's naming conventions.
3258

3359
# flags.type.summary
3460

35-
Type of template to create
61+
Type of template to create.
3662

3763
# flags.type.description
3864

39-
Specifies the type of template to create. Valid options are: app, component, dashboard, or lens. Defaults to 'app' if not specified.
65+
Specifies the type of template to create. Valid values are 'app', 'component', 'dashboard', or 'lens'. Defaults to 'app' if not specified. Choose the type that matches your intended use case for the template.
4066

4167
# flags.subtype.summary
4268

43-
Subtype for the template
69+
Subtype for the template.
4470

4571
# flags.subtype.description
4672

47-
An optional subtype categorization for the template (e.g., 'tableau' for app templates).
73+
An optional subtype categorization for the template (e.g., 'tableau' for app templates). Subtypes help organize templates and provide additional context about their intended use or underlying technology.
4874

4975
# flags.label.summary
5076

51-
Label for the new template
77+
Label for the new template.
5278

5379
# flags.label.description
5480

55-
A human-readable label for the template. This is displayed in the Analytics Studio UI.
81+
A human-readable label for the template. This is displayed in Tableau Next and helps users identify the template's purpose. Use clear, descriptive labels that explain what the template does.
5682

5783
# flags.description.summary
5884

59-
Description of the new template
85+
Description of the new template.
6086

6187
# flags.description.description
6288

63-
A description of what the template does. This is displayed in the Analytics Studio UI.
89+
A description of what the template does and its intended use case. This is displayed in Tableau Next and helps users understand when to use this template. Include information about the template's purpose, features, and any prerequisites.
6490

6591
# fetchingApp
6692

@@ -74,9 +100,36 @@ Creating template from app...
74100

75101
Successfully created template with ID: %s
76102

77-
# examples
103+
# error.TemplateCreationError
104+
105+
Error creating template: %s
106+
107+
# error.TemplateCreationError.Actions
108+
109+
- Verify that you have permission to create templates in the target org
110+
- Ensure the template name is unique within your org
111+
- Check that Data Cloud and Tableau Next are enabled in your org
112+
- Verify your authentication and org connection are valid
113+
- Try using a different API version with --api-version
114+
115+
# error.InvalidTemplateName
116+
117+
Template name "%s" is invalid or already exists.
118+
119+
# error.InvalidTemplateName.Actions
120+
121+
- Choose a unique name that doesn't exist in your org
122+
- Ensure the name follows your org's naming conventions
123+
- Use "sf orchestrator template list" to see existing template names
124+
- Avoid special characters and spaces in template names
125+
126+
# error.InsufficientPermissions
127+
128+
You don't have permission to create templates in this org.
129+
130+
# error.InsufficientPermissions.Actions
78131

79-
- <%= config.bin %> <%= command.id %> --target-org myOrg --name "my_template"
80-
- <%= config.bin %> <%= command.id %> --target-org myOrg --name "sales_template" --type app --label "My Custom Template"
81-
- <%= config.bin %> <%= command.id %> --target-org myOrg --name "dashboard_template" --type dashboard --subtype "analytics"
82-
- <%= config.bin %> <%= command.id %> --target-org myOrg --name "analytics_template" --type app --subtype "tableau" --label "Sales Template" --description "Template for sales analytics apps"
132+
- Contact your Salesforce admin to request template creation permissions
133+
- Verify you're connected to the correct org with --target-org
134+
- Check that Data Cloud and Tableau Next are enabled in your org
135+
- Check that your user profile has the AppFrameworkManageApp permission

0 commit comments

Comments
 (0)