Skip to content

Commit

Permalink
Minlopro: Lightning Knowledge Setup (P2)
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomeandrey committed Dec 13, 2024
1 parent 4f5d322 commit e2656ae
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 9 deletions.
7 changes: 4 additions & 3 deletions config/data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

Sample data (for `Accounts`, `Contacts`, `Opportunities` and other objects) was generated via [Mockaroo Tool](https://mockaroo.com/).

Use scripts below in order to export/import sample data:
Use scripts below in order to seed/export/import sample data:

- [`import_sample_data.sh`](../../scripts/util/import_sample_data.sh)
- [`export_sample_data.sh`](../../scripts/util/export_sample_data.sh)
- [`import_sample_data.sh`](../../scripts/util/data-seeding/import_sample_data.sh)
- [`export_sample_data.sh`](../../scripts/util/data-seeding/export_sample_data.sh)
- [`import_knowledge_articles.sh`](../../scripts/util/data-seeding/import_knowledge_articles.sh)

See [Salesforce Docs](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_test_data_example.htm)
for more.
2 changes: 1 addition & 1 deletion scripts/automations/create_crma_scratch_org.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ echo "$SCRATCH_ORG_ALIAS" | bash ./scripts/crm-analytics/util/set_up_admin_user.
echo "$SCRATCH_ORG_ALIAS" | bash ./scripts/util/deactivate_all_duplicate_rules.sh

# Import sample data
echo "$SCRATCH_ORG_ALIAS" | bash ./scripts/util/import_sample_data.sh
echo "$SCRATCH_ORG_ALIAS" | bash ./scripts/util/data-seeding/import_sample_data.sh

# Set up standard user
echo "$SCRATCH_ORG_ALIAS" | bash ./scripts/crm-analytics/util/set_up_std_user.sh
Expand Down
2 changes: 1 addition & 1 deletion scripts/automations/create_scratch_org.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ echo "$ADMIN_EMAIL" | bash ./scripts/util/create_qa_user.sh
echo "$SCRATCH_ORG_ALIAS" | bash ./scripts/deploy/post/run_post.sh

# Import sample data
echo "$SCRATCH_ORG_ALIAS" | bash ./scripts/util/import_sample_data.sh
echo "$SCRATCH_ORG_ALIAS" | bash ./scripts/util/data-seeding/import_sample_data.sh

# Publish Digital Experience Site
sf community publish --name "DigEx" --target-org "$SCRATCH_ORG_ALIAS" || true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

# How to use:
# - bash ./scripts/util/export_sample_data.sh
# - echo $ORG_ALIAS | bash ./scripts/util/export_sample_data.sh
# - bash ./scripts/util/data-seeding/export_sample_data.sh
# - echo $ORG_ALIAS | bash ./scripts/util/data-seeding/export_sample_data.sh

# Capture target org alias;
read -p "🔶 Enter target org alias: " TARGET_ORG_ALIAS
Expand Down
13 changes: 13 additions & 0 deletions scripts/util/data-seeding/import_knowledge_articles.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# How to use:
# - bash ./scripts/util/data-seeding/import_knowledge_articles.sh

# Capture target org alias;
read -p "🔶 Enter source org alias to fetch KAVs from: " SOURCE_ORG_ALIAS
read -p "🔶 Enter target org alias to import KAVs to: " TARGET_ORG_ALIAS

mkdir -p "build"

echo "🔵 Exporting knowledge articles from [$SOURCE_ORG_ALIAS] and importing them into [$TARGET_ORG_ALIAS] via SFDMU CLI..."

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

# How to use:
# - bash ./scripts/util/import_sample_data.sh
# - echo $ORG_ALIAS | bash ./scripts/util/import_sample_data.sh
# - bash ./scripts/util/data-seeding/import_sample_data.sh
# - echo $ORG_ALIAS | bash ./scripts/util/data-seeding/import_sample_data.sh

# Capture target org alias;
read -p "🔶 Enter target org alias: " TARGET_ORG_ALIAS
Expand Down

0 comments on commit e2656ae

Please sign in to comment.