Retently

Learn how to use Retently with Composio

Overview

SLUG: RETENTLY

Description

Retently is a customer experience management platform that enables businesses to collect, analyze, and act on customer feedback through surveys and integrations.

Authentication Details

generic_api_key
stringRequired

Connecting to Retently

Create an auth config

Use the dashboard to create an auth config for the Retently toolkit. This allows you to connect multiple Retently accounts to Composio for agents to use.

1

Select App

Navigate to the Retently toolkit page and click “Setup Integration”.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Integration”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using API Key

1from composio import Composio
2from composio.types import auth_scheme
3
4# Replace these with your actual values
5retently_auth_config_id = "ac_YOUR_RETENTLY_CONFIG_ID" # Auth config ID created above
6user_id = "0000-0000-0000" # UUID from database/app
7
8composio = Composio()
9
10def authenticate_toolkit(user_id: str, auth_config_id: str):
11 # Replace this with a method to retrieve an API key from the user.
12 # Or supply your own.
13 user_api_key = input("[!] Enter API key")
14
15 connection_request = composio.connected_accounts.initiate(
16 user_id=user_id,
17 auth_config_id=auth_config_id,
18 config={"auth_scheme": "API_KEY", "val": user_api_key}
19 )
20
21 # API Key authentication is immediate - no redirect needed
22 print(f"Successfully connected Retently for user {user_id}")
23 print(f"Connection status: {connection_request.status}")
24
25 return connection_request.id
26
27
28connection_id = authenticate_toolkit(user_id, retently_auth_config_id)
29
30# You can verify the connection using:
31connected_account = composio.connected_accounts.get(connection_id)
32print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Retently toolkit’s playground

Python
1from composio import Composio
2from openai import OpenAI
3import json
4
5openai = OpenAI()
6composio = Composio()
7
8# User ID must be a valid UUID format
9user_id = "0000-0000-0000" # Replace with actual user UUID from your database
10
11tools = composio.tools.get(user_id=user_id, toolkits=["RETENTLY"])
12
13print("[!] Tools:")
14print(json.dumps(tools))
15
16def invoke_llm(task = "What can you do?"):
17 completion = openai.chat.completions.create(
18 model="gpt-4o",
19 messages=[
20 {
21 "role": "user",
22 "content": task, # Your task here!
23 },
24 ],
25 tools=tools,
26 )
27
28 # Handle Result from tool call
29 result = composio.provider.handle_tool_calls(user_id=user_id, response=completion)
30 print(f"[!] Completion: {completion}")
31 print(f"[!] Tool call result: {result}")
32
33invoke_llm()

Tool List

Tool Name: Add Feedback Tags

Description

Add tags to feedback items by providing feedback ids and corresponding tags.

Action Parameters

id
stringRequired
op
string
tags
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Add Feedback Topics

Description

Add topics to feedback items by providing feedback ids and corresponding topics.

Action Parameters

feedback_id
stringRequired
operation
stringDefaults to override
topics
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create or Update Customers

Description

Tool to create new customers or update existing ones by providing their details, including email, name, company, tags, and properties. use this to manage your customer base in retently.

Action Parameters

subscribers
arrayRequired

Action Response

code
integerRequired
data
objectRequired
error
string
message
stringRequired
successful
booleanRequired

Tool Name: Delete Customers

Description

Delete customers from the workspace by providing their unique ids.

Action Parameters

subscribers
arrayRequired

Action Response

code
integerRequired
data
arrayRequired
error
string
message
stringRequired
successful
booleanRequired

Tool Name: Get Campaigns

Description

Tool to retrieve a list of campaigns associated with the account. use when you need to get details about all campaigns.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Customers

Description

Retrieve a list of customers with optional parameters for pagination, sorting, and filtering by email or date range.

Action Parameters

email
string
endDate
string
limit
integerDefaults to 20
page
integerDefaults to 1
sort
stringDefaults to -createdDate
startDate
string

Action Response

code
integerRequired
data
objectRequired
error
string
message
stringRequired
successful
booleanRequired

Tool Name: Get Customer By ID

Description

Tool to retrieve detailed information about a specific customer by their unique id. use when you need to get all the details of a customer.

Action Parameters

customer_id
stringRequired

Action Response

code
integerRequired
data
objectRequired
error
string
message
stringRequired
successful
booleanRequired

Tool Name: Get Feedback

Description

Tool to retrieve feedback received from customers. use when you need to get a list of feedback, with optional parameters for pagination and sorting.

Action Parameters

campaignId
string
customerId
string
email
string
endDate
string
limit
integer
page
integer
sort
string
startDate
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Feedback by ID

Description

Tool to retrieve detailed information about specific feedback by its unique id. use when you need to get the details of a single feedback entry.

Action Parameters

feedback_id
stringRequired

Action Response

code
integerRequired
data
objectRequired
error
string
message
stringRequired
successful
booleanRequired

Tool Name: Get Latest Score

Description

Tool to retrieve the latest nps score for the account. use when you need to get the most up-to-date nps score.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Outbox

Description

Retrieve the outbox of surveys that are scheduled to be sent.

Action Parameters

email
string
limit
integerDefaults to 50
page
integerDefaults to 1
sort
stringDefaults to -surveyCreatedDate

Action Response

code
integerRequired
data
objectRequired
error
string
message
stringRequired
successful
booleanRequired

Tool Name: Get Reports

Description

Tool to retrieve reports related to nps surveys, including scores and trends. use when you need to get campaign performance data.

Action Parameters

campaign_id
string
end_date
string
start_date
string

Action Response

code
integerRequired
data
arrayRequired
error
string
message
stringRequired
successful
booleanRequired

Tool Name: Get Templates

Description

Tool to retrieve a list of survey templates available in the account. use when you need to get the available survey templates.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Send Transactional Survey

Description

Tool to send a transactional survey to customers. use when you need to send a survey to a customer after a specific event, with an optional delay.

Action Parameters

campaign_id
stringRequired
delay
integer
subscribers
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Unsubscribe Customers

Description

Unsubscribe customers from receiving surveys by providing their email addresses.

Action Parameters

message
string
subscribers
arrayRequired

Action Response

code
integerRequired
data
arrayRequired
error
string
message
stringRequired
successful
booleanRequired