-
Notifications
You must be signed in to change notification settings - Fork 10
Promptify Use Cases
Welcome to the Smock-it Promptify Use Cases guide 👋. This page demonstrates how to quickly generate Salesforce test data using Smock-it’s new promptify command, which combines template creation and data generation into a single, streamlined workflow, all through plain English prompts.
With Promptify, there’s no need to navigate the template init questionnaire or run multiple steps. Simply describe the data you need in natural language, and Smock-it handles the rest, generating both the template and test data automatically.
-
Run the Promptify command:
sf smockit promptify -
Enter Registered Email (one-time): Provide the email you used to sign up for Smock-it. If you’re not registered, Smock-it will give a sign-up link.
-
Enter OpenAI API Key (one-time for first-time users): Required for generating JSON templates from natural language prompts. Once entered, it’s saved in your environment variables.
For first-time users, providing the registered email and OpenAI API key is required only once. For all subsequent uses, these steps are not needed, and the workflow remains the same.
Step-by-Step Process:
-
Execute Command:
sf smockit promptify -
Enter Prompt:
Generate 5 Account records in CSV and JSON format -
Provide Salesforce Alias or Username: Enter the target org alias or username
(e.g., testOrg). -
Select Output Format(s):
CSV, JSON -
Generate Data Now (Optional):
Y
Generated Template JSON:
{
"namespaceToExclude": [],
"outputFormat": ["csv", "json"],
"count": 5,
"sObjects": [
{
"account": {}
}
]
}Step-by-Step Process:
-
Execute Command:
sf smockit promptify -
Enter Prompt:
Generate 20 Account records and insert directly into my Salesforce org -
Provide Salesforce Alias or Username: Enter the target org alias or username
(e.g., testOrg). -
Select Output Format(s):
DI -
Generate Data Now (Optional):
Y
Generated Template JSON:
{
"namespaceToExclude": [],
"outputFormat": ["di"],
"count": 20,
"sObjects": [
{
"account": {}
}
]
}Step-by-Step Process:
-
Execute Command:
sf smockit promptify -
Enter Prompt:
Generate 20 Account records and Contact records in CSV, JSON, and DI format -
Provide Salesforce Alias or Username: Enter the target org alias or username
(e.g., testOrg). -
Select Output Format(s):
CSV, JSON, DI -
Generate Data Now (Optional):
Y
Generated Template JSON:
{
"namespaceToExclude": [],
"outputFormat": ["csv", "json", "di"],
"count": 20,
"sObjects": [
{
"account": {}
},
{
"contact": {}
}
]
}Important
⚠️ If Contact has a parent relationship with Account and the account exists in the org, it will be automatically mapped to the Contact. If no matching account is found, a new Account will be created and mapped to the Contact.
Step-by-Step Process:
-
Execute Command:
sf smockit promptify -
Enter Prompt:
Generate 10 Account records and 40 Contact records, and insert them into Salesforce in DI format -
Provide Salesforce Alias or Username: Enter the target org alias or username
(e.g., testOrg). -
Select Output Format(s):
DI -
Generate Data Now (Optional):
Y
Generated Template JSON:
{
"namespaceToExclude": [],
"outputFormat": ["di"],
"count": 10,
"sObjects": [
{
"account": {
"count": 10,
"pickLeftFields": true
}
},
{
"contact": {
"count": 40,
"pickLeftFields": true
}
}
]
}Step-by-Step Process:
-
Execute Command:
sf smockit promptify -
Enter Prompt:
Generate 15 Account records with phone, email, fax, and billing city fields only -
Provide Salesforce Alias or Username: Enter the target org alias or username
(e.g., testOrg). -
Select Output Format(s):
CSV, JSON, DI -
Generate Data Now (Optional):
N(The template is saved, and you can generate the data anytime later using the data generation command.)
Generated Template JSON:
{
"namespaceToExclude": [],
"outputFormat": ["csv", "json", "DI"],
"count": 15,
"sObjects": [
{
"account": {
"count": 15,
"fieldsToConsider": {
"phone": [],
"email": [],
"fax": [],
"city": []
},
"pickLeftFields": false
}
}
]
}6️⃣ Generate 10 Account records, assigning names from Lorem Ltd and Concret.io, and fill all remaining fields with randomly generated values.
Step-by-Step Process:
-
Execute Command:
sf smockit promptify -
Enter Prompt:
Generate 10 Account records with names from Lorem Ltd and Concret.io, and fill all remaining fields with random values -
Provide Salesforce Alias or Username: Enter the target org alias or username
(e.g., testOrg). -
Select Output Format(s):
CSV, JSON, DI -
Generate Data Now (Optional):
Y
Generated Template JSON:
{
"namespaceToExclude": [],
"outputFormat": ["csv", "json", "DI"],
"count": 10,
"sObjects": [
{
"account": {
"count": 10,
"fieldsToConsider": {
"name": ["Lorem Ltd", "Concret.io"]
},
"pickLeftFields": true
}
}
]
}7️⃣ Generate 10 Account records with the Name set to Concret.io and the Phone number set to 9999999999, and populate the remaining fields with random data.
Step-by-Step Process:
-
Execute Command:
sf smockit promptify -
Enter Prompt:
Generate 10 Account records with the Name set to Concret.io and the Phone number set to 9999999999, and populate all remaining fields with random values -
Provide Salesforce Alias or Username: Enter the target org alias or username
(e.g., testOrg). -
Select Output Format(s):
CSV, JSON, DI -
Generate Data Now (Optional):
Y
Generated Template JSON:
{
"namespaceToExclude": [],
"outputFormat": ["di", "json", "csv"],
"count": 10,
"sObjects": [
{
"account": {
"count": 10,
"fieldsToConsider": {
"name": ["Concret.io"],
"phone": ["9999999999"]
},
"pickLeftFields": true
}
}
]
}8️⃣ Generate 10 Account records by excluding the Phone field from data generation, while populating all other fields with random values.
Step-by-Step Process:
-
Execute Command:
sf smockit promptify -
Enter Prompt:
Generate 10 Account records excluding the Phone field, and populate all other fields with random values -
Provide Salesforce Alias or Username: Enter the target org alias or username
(e.g., testOrg). -
Select Output Format(s):
CSV, JSON, DI -
Generate Data Now (Optional):
Y
Generated Template JSON:
{
"namespaceToExclude": [],
"outputFormat": ["di", "json", "csv"],
"count": 10,
"sObjects": [
{
"account": {
"count": 10,
"fieldsToExclude": ["phone"],
"pickLeftFields": true
}
}
]
}Step-by-Step Process:
-
Execute Command:
sf smockit promptify -
Enter Prompt:
Generate 10 Account records with random data, exclude Industry field, and set Phone to 123-456-7890, 987-654-3210, or 555-555-5555 -
Provide Salesforce Alias or Username: Enter the target org alias or username
(e.g., testOrg). -
Select Output Format(s):
CSV, JSON, DI -
Generate Data Now (Optional):
N(The template is saved, and you can generate the data anytime later using the data generation command.)
Generated Template JSON:
{
"namespaceToExclude": [],
"outputFormat": ["di", "json", "csv"],
"count": 10,
"sObjects": [
{
"account": {
"count": 10,
"fieldsToExclude": ["industry"],
"fieldsToConsider": {
"phone": ["123-456-7890", "987-654-3210", "555-555-5555"]
},
"pickLeftFields": true
}
}
]
}🔟 Generate 10 Contact records with Account ID as a mandatory field, and auto-populate all other fields.
Step-by-Step Process:
-
Execute Command:
sf smockit promptify -
Enter Prompt:
Generate 10 Contact records with Account ID as a mandatory field, and auto-populate all other fields -
Provide Salesforce Alias or Username: Enter the target org alias or username
(e.g., testOrg). -
Select Output Format(s):
CSV, JSON, DI -
Generate Data Now (Optional):
Y
Generated Template JSON:
{
"namespaceToExclude": [],
"outputFormat": ["di", "json", "csv"],
"count": 10,
"sObjects": [
{
"contact": {
"count": 10,
"pickLeftFields": true
}
}
]
}Important
⚠️ Smock-It will automatically find and link the parent record from the org if it exists. If no parent is found, it will create a new parent record (up to 2 levels) and link it to the 5 new Contacts. Note: To map up to 2 levels, the Grandparent field must be a required field.
1️⃣1️⃣ Generate 5 Contact records with static values for the dependent picklist fields Country, State, and City
Step-by-Step Process:
-
Execute Command:
sf smockit promptify -
Enter Prompt:
Generate 5 Contact records with Country = USA, State = California, and City = San Francisco -
Provide Salesforce Alias or Username: Enter the target org alias or username
(e.g., testOrg). -
Select Output Format(s):
CSV, JSON, DI -
Generate Data Now (Optional):
N(The template is saved, and you can generate the data anytime later using the data generation command.)
Generated Template JSON:
{
"namespaceToExclude": [],
"outputFormat": ["di", "json", "csv"],
"count": 5,
"sObjects": [
{
"contact": {
"fieldsToConsider": {
"dp-country": [
"USA"
],
"dp-state": [
"California"
],
"dp-city": [
"San Francisco"
]
},
"pickLeftFields": true
}
}
]
}Important
⚠️
- Always prefix dependent picklist field names with dp-.
- Ensure all dependent fields are listed in the correct hierarchical order.
- Each dependent picklist field must have only one value in its value array.
1️⃣2️⃣ Generate 1 lead, 10 Account, 15 Contact & 5 Opportunity with the below info using single template:
Lead
Generate 1 lead record with static dependent picklist values for fields Country: 'India', state: 'Rajasthan', city: 'Jaipur'.
Account
Generate 10 Account records with random data, using one of these Account Names: 'Concretio', 'ABC Corporation', or 'Ursa Major' and exclude the 'Fax' field.
Contact
Generate 15 Contact records, automatically linking to an existing Account from the org. Only generate data for the following fields: LastName (choose from 'John', 'Sam', or 'Mark'), Fax, Email, City, AccountId and Phone.
Opportunity
Generate 5 Opportunity records with data populated for all fields.
Step-by-Step Process:
-
Execute Command:
sf smockit promptify -
Enter Prompt:
Generate 1 Lead with Country = India, State = Rajasthan, City = Jaipur; 10 Account records with Names = Concretio, ABC Corporation, Ursa Major and exclude Fax field; 15 Contact records linked to existing Accounts with LastName = John, Sam, Mark, and populate Fax, Email, City, AccountId, Phone; 5 Opportunity records with all fields populated. -
Provide Salesforce Alias or Username: Enter the target org alias or username
(e.g., testOrg). -
Select Output Format(s):
CSV, JSON, DI -
Generate Data Now (Optional):
N(The template is saved, and you can generate the data anytime later using the data generation command.)
Generated Template JSON:
{
"namespaceToExclude": [],
"outputFormat": ["di", "json", "csv"],
"count": 10,
"sObjects": [
{
"lead": {
"count": 1,
"fieldsToConsider": {
"dp-country": [
"India"
],
"dp-state": [
"Rajasthan"
],
"dp-city": [
"Jaipur"
]
},
"pickLeftFields": true
}
},
{
"account": {
"count": 10,
"fieldsToExclude": ["fax"],
"fieldsToConsider": {
"name": ["Concretio", "ABC Corporation", "Ursa Major"]
},
"pickLeftFields": true
}
},
{
"contact": {
"count": 15,
"fieldsToConsider": {
"lastname": ["John", "Sam", "Mark"],
"fax": [],
"email": [],
"city": [],
"accountid": [],
"phone": []
},
"pickLeftFields": false
}
},
{
"opportunity": {
"count": 5,
"pickLeftFields": true
}
}
]
}© 2025 Concret.io, All Rights Reserved. | For a quick demo and guided installation: Schedule a Call. | Smock-it Website