Integrating Asgardeo with Your Web Application and Salesforce Using Choreo
In today’s fast-paced digital world, seamless integration of various services is crucial for efficient business operations. This article will guide you through the process of integrating Asgardeo with your web application and Salesforce using Choreo webhooks. By following these steps, you can automate the process of creating leads and converting them based on user events.
Step 1: Configure Asgardeo
Integrate Asgardeo with Your Web Application
- Access Asgardeo:
- Visit Asgardeo Console and log in.
2. Create a New Application:
- Click on
Applications
in the left navigation menu. - Click
New Application
and selectSingle-Page Application
. - Provide the following details:
- Name: Pet Management App
- Authorized redirect URLs:
https://localhost:3000
(this will be updated with the hosted app URL later)
3. Configure Protocol:
- Go to the
Protocol
tab. - Scroll down to
Allowed grant types
and tickRefresh Token
andCode
. - Tick
Public client
in the next section. - Use the Web App URL in Step 3.3 as the Authorized redirect URLs and Allowed origins.
- Keep the rest of the default configurations and click
Update
.
Configure Asgardeo to Publish Events
- Navigate to Events:
- On the Asgardeo Console, go to
Events
. - Select
Add user event to publish to Choreo
and clickUpdate
.
2. Configure Choreo Webhook:
- Deploy the webhook through Choreo and provide the Salesforce-related configuration as per the guide.
Step 2: Create Choreo Webhooks
Set Up the Webhook
- Navigate to Choreo:
- Use the bottom navigation button to go to the relevant Choreo organization.
2. Create a Webhook:
- Click on
New Webhook
. - Give it a name and provide access to your GitHub account.
3. Link GitHub Repository:
- Provide a GitHub repo containing the business logic to subscribe to events.
- Here are three repos you can fork and use:
- Add User Event: Creates a lead upon user registration.
- Login Success Event: Converts the lead to “Closed — Converted” state upon successful login.
Step 3: Implementing Webhook Logic
Add User Event Logic
Login Success Event Logic
Conclusion
By following these steps, you have successfully integrated Asgardeo with your web application and Salesforce using Choreo webhooks. Now, you can observe events and automate lead creation and conversion processes, enhancing your business workflow. This integration ensures that user registrations and logins are seamlessly linked to your Salesforce CRM, providing real-time updates and efficient data management.
For more detailed configurations and further customization, refer to the official documentation.
Happy integrating!