Centro Support Center

Contact Us

How to Automatically Create Salesforce Cases from Slack Messages Using Centro and Grok AI



Introduction


This guide provides an overview of how to use the Centro app and Grok AI to automatically create Salesforce cases by extracting and prepopulating specific fields from Slack messages. By setting up a Salesforce Flow and configuring custom prompts, you can streamline your support process and ensure that cases are accurately populated with relevant information.


Prerequisites


    •    Centro App Installed in Slack: Ensure that the Centro app is installed and properly configured in your Slack workspace.

    •    Salesforce Access: You need permissions to create and edit Flows and Cases in Salesforce.

    •    Grok AI Integration: Grok AI should be integrated with your Salesforce instance.


Step-by-Step Guide


1. Configure the Centro App in Slack


a. Access Workflow Setup


    •    Open the Centro App Home in Slack.

    •    Navigate to Workflow Setup within the app.


b. Set Up Emoji Reaction to Trigger Platform Event


    •    Configure an Emoji Reaction: Choose an emoji (e.g., 🚀 rocket emoji) to act as a trigger when reacted to any message globally.

    •    Set the Platform Event Name: For instance, name it OpenAI_Case.


When the designated emoji is added to a message, it will send a platform event containing data from that message.


2. Set Up the Salesforce Flow


a. Open Salesforce Flow Builder


    •    Log in to Salesforce and navigate to Flow Builder.


b. Create a New Flow to Process the Platform Event


    •    Flow Type: Select Platform Event-Triggered Flow.

    •    Object: Choose the platform event you set up earlier (e.g., OpenAI_Case).


c. Extract Required Fields Using Grok AI


For each field you want to populate (Subject, Priority, Type), add a “Centro Grok Summarize Conversation” element:


i. Common Configuration for Each Element


    •    Channel ID: Input the channel ID from the platform event data.

    •    Enable Grok AI Summary: Ensure this option is turned on.

    •    Limit to Thread: Enable this if you want to analyze only the thread of the message.


ii. Set Up Custom Prompts

1. Subject


    •    Custom Prompt:

Based on the following message, please provide the subject of a support case without any other language.


2. Priority


    •    Custom Prompt:

Based on the following message, please estimate a support case's priority. Here are the options: Low, Medium, High, or Critical. Provide only the priority without any other language.


3. Type


    •    Custom Prompt:

Based on the following message, please determine the type of case. Options are: Integration, Security, Configuration, Performance, or Other. Provide only the type without any other language.

Ensure that the prompts are clear to guide Grok AI in extracting the correct information.


d. Store the Outputs


    •    Capture the outputs from each Grok AI element to use in the case creation step.


3. Create the Salesforce Case


a. Add a “Create Records” Element


    •    Object: Select Case.


b. Map the Fields


    •    Description: Use the original message text from Slack.

    •    Subject: Use the output from the Subject Grok AI element.

    •    Priority: Use the output from the Priority Grok AI element.

    •    Type: Use the output from the Type Grok AI element.


c. Save the Case ID


    •    Store the Case ID from the newly created case for use in the next step.


4. Send Confirmation Back to Slack


a. Add a “Centro Send Notification” Element


    •    Record ID: Use the Case ID from the case you just created.

    •    Reply to Message: Set this to reply directly to the original Slack message that triggered the event.


b. Customize the Notification (Optional)


    •    You can include additional details or a link to the case in the notification message.


5. Activate the Flow


    •    Review the flow for any errors.

    •    Activate the flow to start processing incoming events.


Testing the Setup


    1.    In Slack, react to a message with the designated emoji (e.g., 🚀).

    2.    Monitor Salesforce to ensure that a new case is created with the correct fields populated.

    3.    Check Slack to confirm that a notification is sent as a reply to the original message.


Tips for Success


    •    Customize Prompts: If the extracted information isn’t accurate, tweak the custom prompts to be more specific.

    •    Error Handling: Consider adding fault paths in your flow to handle any exceptions or errors.

    •    Security: Ensure that only authorized users can trigger the platform event to prevent unauthorized case creation.


Conclusion


By integrating Centro and Grok AI with Salesforce, you can automate the creation of support cases directly from Slack messages. This not only saves time but also ensures that important information is accurately captured and logged in your support system.


Need Help?


If you have any questions or need assistance with the setup, please reach out to our support team at support@centro.rocks