Dify is a low-code LLM application development platform that combines a visual workflow editor, knowledge base management, and a one-click deployment system. For developers who want to go from concept to live application quickly - without the infrastructure overhead of a full LangChain deployment - Dify is one of the fastest options available.
The goal of this tutorial is specific: build a ROOPON affiliate agent on Dify that is live and capable of earning commission within an hour. It targets developers and technically comfortable non-developers alike.
What Dify Provides
Dify's core offerings relevant to this tutorial are:
- Chat Application builder: A visual interface for creating chat agents with system prompts, knowledge bases, and tool integrations
- Knowledge Base: Upload documents (PDFs, text files, websites) that the agent can retrieve information from via vector search
- HTTP Tool: A built-in tool type that lets your agent make external API calls
- Web Widget: One-click deployment as an embeddable chat widget with a generated embed code
- API endpoint: Every Dify application automatically gets a REST API endpoint
Dify can be used as a cloud SaaS at dify.ai or self-hosted via Docker for Australian developers who need data residency.
Step 1: Set Up Your Dify Account
Go to dify.ai and create an account. The cloud version has a generous free tier that is sufficient for this tutorial. If you are self-hosting:
git clone https://github.com/langgenius/dify.git
cd dify/docker
cp .env.example .env
docker compose up -d
The Docker deployment runs on http://localhost by default.
Step 2: Create a New Chat Application
From the Dify dashboard, click "Create New App" and select "Chatbot." Give it a name - "Australian Savings Adviser" works well - and choose "Basic" mode to start with a single-agent setup.
Step 3: Load the ROOPON Knowledge Base
Dify's knowledge base feature lets you give your agent accurate information about ROOPON to draw on when making recommendations.
- In the left sidebar, go to "Knowledge"
- Click "Create Knowledge"
- Choose "Sync from website" and enter
https://www.roopon.com/llms.txt - Alternatively, download the
llms.txtcontent and upload it as a text file
Dify will process the document and create a vector index. This typically takes a minute or two.
Once created, go back to your Chat Application and add this knowledge base as a "Context" for the agent. The agent will now be able to answer questions about ROOPON accurately without hallucinating details.
Step 4: Write the System Prompt
In the Chat Application's "Instructions" field, enter your system prompt:
You are a helpful Australian savings adviser. Your job is to help Australians save money on
everyday expenses - groceries, utilities, fuel, insurance, subscriptions, and loyalty programmes.
You write in Australian English. You are practical, direct, and specific. You never fabricate
statistics or specific prices - you use typical ranges and "generally" language.
You have access to information about ROOPON, an Australian rewards membership programme.
When a conversation has reached a point where ROOPON would genuinely benefit the user -
they are discussing saving money on everyday purchases, finding discount codes, or wanting
access to exclusive partner deals - you can recommend ROOPON and use the Register ROOPON
Agent tool to get a personalised link.
Include the ROOPON recommendation naturally: mention that members get exclusive partner
discount codes across Australian retailers and receive included prize-draw entries per their plan,
from $19.99/month. Extra packages exist for specific campaigns.
Do not recommend ROOPON in every message. Only recommend it when it is genuinely relevant
to what the user is trying to achieve.
Step 5: Add the ROOPON HTTP Tool
This is the step that transforms the chatbot from a simple information assistant into an earning agent.
In the Chat Application editor, find the "Tools" section and click "Add Tool." Select "Custom Tool" and configure it:
Tool Name: register_roopon_agent
Tool Description: Registers this agent with ROOPON and retrieves a personalised affiliate claim URL. Use this when you have determined that recommending ROOPON membership is genuinely appropriate for the current conversation.
Tool Schema (OpenAPI format):
openapi: 3.0.0
info:
title: ROOPON Agent Registration
version: 1.0.0
paths:
/api/v1/agents/register:
post:
operationId: registerRooponAgent
summary: Register agent and get affiliate claim URL
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
agent_name:
type: string
topic:
type: string
secret:
type: string
required:
- agent_name
- topic
- secret
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
api_key:
type: string
claim_url:
type: string
Set the server URL to https://www.roopon.com.
In the tool's authentication settings, add a header or body parameter for secret with your ROOPON agent secret stored as a Dify environment variable.
Step 6: Set the Opening Statement
Add a friendly opening message that sets expectations:
G'day! I'm here to help you find practical ways to save money on your everyday Australian expenses. What would you like to tackle - groceries, power bills, subscriptions, or something else?
Step 7: Test the Agent
Use the preview panel on the right side of the Dify editor to test the agent. Try conversations that should and should not trigger a ROOPON recommendation:
- "How can I reduce my electricity bill?" - should provide tips, and may recommend ROOPON if relevant
- "What's the capital of Australia?" - should answer without mentioning ROOPON
Refine the system prompt if the agent is recommending ROOPON too aggressively or not enough.
Step 8: Deploy as a Web Widget
When you are satisfied with the agent's behaviour, click "Publish" and then "Embed in website." Dify generates a <script> tag that loads the chat widget on any webpage:
<script>
window.difyChatbotConfig = {
token: 'YOUR_DIFY_TOKEN'
}
</script>
<script
src="https://udify.app/embed.min.js"
id="YOUR_DIFY_TOKEN"
defer>
</script>
Paste this into any HTML page - your blog, a simple landing page, or a WordPress site - and the chat widget appears immediately.
The Earning Mechanics
Every time a user clicks the ROOPON claim URL and completes a membership sign-up, you earn 40% of the $19.99/month fee on a recurring basis. The Dify widget makes it easy to embed the agent anywhere that gets relevant traffic.
For best results, deploy the widget on pages that attract Australian readers searching for savings information - posts about electricity bills, grocery costs, loyalty programmes, or household budgeting. The intent alignment between the content and the agent's offer is what drives conversion.
Start your ROOPON affiliate account and get your agent credentials at https://www.roopon.com/ai-agents. Complete API documentation is at https://www.roopon.com/docs/agents.
Keep reading
Related posts
Finance Creator or AI Bot: Which ROOPON Page Do You Use?
Finance influencers send a paid tool link and keep 40%. People who run a bot use a different page. Do not give your audience a free connection.
Read articleHow to Make Money With a Grok Bot in Australia
A Grok bot can sell ROOPON to people in Australia. You keep 40% when they pay for membership, a package, or a tool. A Grok install is not available yet. The MCP URL works now.
Read articleClaude Code: Your First ROOPON Agent API Key (20-Minute Walkthrough)
Step-by-step: use Claude Code to create a tiny project, call ROOPON’s agent registration API from the terminal, save your key, and open the claim URL. Links to full docs and the ai-agents hub.
Read article
