Skip to content

Commit 360036c

Browse files
Merge pull request #26 from trailheadapps/cw/feat-add-prompt-template-actions
feat: add prompt template action to main
2 parents 1fb6aaa + e7d8c79 commit 360036c

File tree

40 files changed

+1222
-168
lines changed

40 files changed

+1222
-168
lines changed

.github/workflows/ci-pr.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ jobs:
172172
if: ${{ !env.IS_PRERELEASE }}
173173
run: sf org create scratch -f config/project-scratch-def.json -a scratch-org -d -y 1 -w 10
174174

175+
# Assign Manage Prompt Template permission set
176+
- name: 'Assign Manage Prompt Template permission set'
177+
run: sf org assign permset -n EinsteinGPTPromptTemplateManager
178+
175179
# Deploy source to scratch org
176180
- name: 'Push source to scratch org'
177181
run: sf project deploy start

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ jobs:
112112
- name: 'Create scratch org'
113113
run: sf org create scratch -f config/project-scratch-def.json -a scratch-org -d -y 1 -w 10
114114

115+
# Assign Manage Prompt Template permission set
116+
- name: 'Assign Manage Prompt Template permission set'
117+
run: sf org assign permset -n EinsteinGPTPromptTemplateManager
118+
115119
# Deploy source to scratch org
116120
- name: 'Push source to scratch org'
117121
run: sf project deploy start

bin/delete-data.apex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ delete [SELECT Id FROM ASR_Shopping_Cart__c];
1717
delete [SELECT Id FROM ASR_Survey_Log__c];
1818
delete [SELECT Id FROM ASR_Task__c];
1919
delete [SELECT Id FROM ASR_Transaction_Log__c];
20+
delete [SELECT Id FROM ASR_Customer_Interest__c];
21+
delete [SELECT Id FROM ASR_Experience__c];
2022
delete [SELECT Id FROM ASR_Order__c];

bin/import-data.bat

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,14 @@ call sf data import tree --files data/general-onboarding.json
4444
echo Importing general survey data...
4545
call sf data import tree --files data/general-survey.json
4646

47+
echo Importing travel cruise contact data...
48+
call sf data import tree --files data/travel-cruise-contact.json
49+
50+
echo Importing travel cruise customer experience data...
51+
call sf data import tree --files data/travel-cruise-experience.json
52+
53+
echo Importing travel cruise customer interest data...
54+
call sf data import tree --files data/travel-cruise-customer-interest.json
55+
4756
echo Data import complete.
4857

bin/import-data.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,14 @@ sf data import tree --files data/general-onboarding.json
4646
echo "Importing general survey data..."
4747
sf data import tree --files data/general-survey.json
4848

49+
echo "Importing travel cruise contact data..."
50+
sf data import tree --files data/travel-cruise-contact.json
51+
52+
echo "Importing travel cruise customer experience data..."
53+
sf data import tree --files data/travel-cruise-experience.json
54+
55+
echo "Importing travel cruise customer interest data..."
56+
sf data import tree --files data/travel-cruise-customer-interest.json
57+
4958
echo "Data import complete."
5059

bin/install-scratch.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ cmd.exe /c sf org create scratch -f config/project-scratch-def.json -a %ORG_ALIA
1818
call :checkForError
1919
@echo:
2020

21+
echo Assigning Manage Prompt Templates permission set...
22+
cmd.exe /c sf org assign permset -n EinsteinGPTPromptTemplateManager
23+
call :checkForError
24+
@echo:
25+
2126
echo Pushing source...
2227
cmd.exe /c sf project deploy start
2328
call :checkForError

bin/install-scratch.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@ echo "Creating scratch org..." && \
1818
sf org create scratch -f config/project-scratch-def.json -a $ORG_ALIAS -d -y 30 && \
1919
echo "" && \
2020

21+
echo "Assigning Manage Prompt Templates permission set..."
22+
sf org assign permset -n EinsteinGPTPromptTemplateManager && \
23+
echo "" && \
24+
2125
echo "Pushing source..." && \
2226
sf project deploy start && \
2327
echo "" && \
2428

25-
echo "Assigning permission sets..." && \
29+
echo "Assigning Agent Script permission sets..." && \
2630
sf org assign permset -n Agent_Script_Recipes_Data && \
2731
sf org assign permset -n Agent_Script_Recipes_App && \
2832
echo "" && \

data/data-plan.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
"resolveRefs": false,
1212
"files": ["commerce-account.json"]
1313
},
14+
{
15+
"sobject": "Contact",
16+
"saveRefs": true,
17+
"resolveRefs": false,
18+
"files": ["travel-cruise-contact.json"]
19+
},
1420
{
1521
"sobject": "Account",
1622
"saveRefs": true,
@@ -118,5 +124,17 @@
118124
"saveRefs": false,
119125
"resolveRefs": false,
120126
"files": ["general-report.json"]
127+
},
128+
{
129+
"sobject": "ASR_Customer_Interest__c",
130+
"saveRefs": false,
131+
"resolveRefs": false,
132+
"files": ["travel-cruise-customer-interest.json"]
133+
},
134+
{
135+
"sobject": "ASR_Experience__c",
136+
"saveRefs": false,
137+
"resolveRefs": false,
138+
"files": ["travel-cruise-experience.json"]
121139
}
122140
]

data/travel-cruise-contact.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"records": [
3+
{
4+
"attributes": { "type": "Contact", "referenceId": "ContactRef1" },
5+
"FirstName": "Alexander",
6+
"LastName": "Reed",
7+
"Email": "[email protected]"
8+
},
9+
{
10+
"attributes": { "type": "Contact", "referenceId": "ContactRef2" },
11+
"FirstName": "Beverly",
12+
"LastName": "Chen",
13+
"Email": "[email protected]"
14+
},
15+
{
16+
"attributes": { "type": "Contact", "referenceId": "ContactRef3" },
17+
"FirstName": "Charles",
18+
"LastName": "Davies",
19+
"Email": "[email protected]"
20+
}
21+
]
22+
}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"records": [
3+
{
4+
"attributes": {
5+
"type": "ASR_Customer_Interest__c",
6+
"referenceId": "CIRef1"
7+
},
8+
"Contact__c": "@ContactRef1",
9+
"Interest_Type__c": "Dining & Social"
10+
},
11+
{
12+
"attributes": {
13+
"type": "ASR_Customer_Interest__c",
14+
"referenceId": "CIRef2"
15+
},
16+
"Contact__c": "@ContactRef1",
17+
"Interest_Type__c": "Shore Excursions - Adventure"
18+
},
19+
{
20+
"attributes": {
21+
"type": "ASR_Customer_Interest__c",
22+
"referenceId": "CIRef3"
23+
},
24+
"Contact__c": "@ContactRef1",
25+
"Interest_Type__c": "Shore Excursions - Water"
26+
},
27+
{
28+
"attributes": {
29+
"type": "ASR_Customer_Interest__c",
30+
"referenceId": "CIRef4"
31+
},
32+
"Contact__c": "@ContactRef2",
33+
"Interest_Type__c": "Health & Wellness"
34+
},
35+
{
36+
"attributes": {
37+
"type": "ASR_Customer_Interest__c",
38+
"referenceId": "CIRef5"
39+
},
40+
"Contact__c": "@ContactRef2",
41+
"Interest_Type__c": "Dining & Social"
42+
},
43+
{
44+
"attributes": {
45+
"type": "ASR_Customer_Interest__c",
46+
"referenceId": "CIRef6"
47+
},
48+
"Contact__c": "@ContactRef2",
49+
"Interest_Type__c": "Shore Excursions - Cultural"
50+
},
51+
{
52+
"attributes": {
53+
"type": "ASR_Customer_Interest__c",
54+
"referenceId": "CIRef7"
55+
},
56+
"Contact__c": "@ContactRef3",
57+
"Interest_Type__c": "Entertainment & Nightlife"
58+
},
59+
{
60+
"attributes": {
61+
"type": "ASR_Customer_Interest__c",
62+
"referenceId": "CIRef8"
63+
},
64+
"Contact__c": "@ContactRef3",
65+
"Interest_Type__c": "Dining & Social"
66+
},
67+
{
68+
"attributes": {
69+
"type": "ASR_Customer_Interest__c",
70+
"referenceId": "CIRef9"
71+
},
72+
"Contact__c": "@ContactRef3",
73+
"Interest_Type__c": "Special Interest & Exclusive"
74+
}
75+
]
76+
}

0 commit comments

Comments
 (0)