run following commands using python package manager:
pip install Django
pip install python-dotenv
Logic to get the salesforce case details to show up in slack using following custom slash command:
- '/demo-sf {SF case number}' - to show details of a salesforce case
- '/demo-sf date={YYYY-MM-DD}' - to show a very high level reporting insight along with the case data in "demo-channels" slack channel for the cases that are created after the entered date in "YYYY-MM-DD" format
load your environment variables from .env file that you can store anywhere in the project folder. Following are the values that you would need in the .env file
- SLACK_BASE_URL - Slack base URL for API call
- SLACK_CHANNL_ID - Channel ID to see the details
- SF_BASE_URL - Salesforce Base URL
- SF_TOKEN - Auth token for Salesforce
- SLACK_BOT_TOKEN - Slack bot token to make API calls to Slack
- SECRET_KEY - Django secret key for the app