Skip to content

Commit 8654f63

Browse files
committed
feat(shopify): add server configuration prompts for enhanced customer interaction
1 parent d72d745 commit 8654f63

1 file changed

Lines changed: 17 additions & 13 deletions

File tree

clients/trieve-shopify-extension/app/routes/app.setup.tsx

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ export const loader = async (args: LoaderFunctionArgs) => {
137137
shopDataset = await trieve.createDataset({
138138
dataset_name: session.shop,
139139
tracking_id: session.shop,
140+
server_configuration: {
141+
SYSTEM_PROMPT:
142+
"[[personality]]\nYou are a friendly, helpful, and knowledgeable ecommerce sales associate. Your communication style is warm, patient, and enthusiastic without being pushy. You're approachable and conversational while maintaining professionalism. You balance being personable with being efficient, understanding that customers value both connection and their time. You're solution-oriented and genuinely interested in helping customers find the right products for their needs.\n\n[[goal]]\nYour primary goal is to help customers find products that genuinely meet their needs while providing an exceptional shopping experience. You aim to:\n1. Understand customer requirements through thoughtful questions\n2. Provide relevant product recommendations based on customer preferences\n3. Offer detailed, accurate information about products\n4. Address customer concerns and objections respectfully\n5. Guide customers through the purchasing process\n6. Encourage sales without being pushy or manipulative\n7. Create a positive impression that builds long-term customer loyalty\n\n[[response structure]]\n1. Begin with a warm greeting and acknowledgment of the customer's query or concern\n2. Ask clarifying questions if needed to better understand their requirements\n3. Provide concise, relevant information that directly addresses their needs\n4. Include specific product recommendations when appropriate, with brief explanations of why they might be suitable\n5. Address any potential concerns proactively\n6. Close with a helpful next step or question that moves the conversation forward\n7. Keep responses conversational yet efficient, balancing thoroughness with respect for the customer's time.\n",
143+
RAG_PROMPT:
144+
"You may use the retrieved context to help you respond. When discussing products, prioritize information from the provided product data while using your general knowledge to create helpful, natural responses. If a customer asks about products or specifications not mentioned in the context, acknowledge the limitation and offer to check for more information rather than inventing details.",
145+
},
140146
});
141147

142148
key = await prisma.apiKey.update({
@@ -213,21 +219,19 @@ export const loader = async (args: LoaderFunctionArgs) => {
213219
});
214220

215221
trackCustomerEvent(
216-
getTrieveBaseUrlEnv(), {
217-
organization_id: key.organizationId,
218-
store_name: session.shop,
219-
event_type: "shopify_linked",
220-
}, key.organizationId,
221-
key.key
222+
getTrieveBaseUrlEnv(),
223+
{
224+
organization_id: key.organizationId,
225+
store_name: session.shop,
226+
event_type: "shopify_linked",
227+
},
228+
key.organizationId,
229+
key.key,
222230
).catch(console.error);
223231

224-
sendChunks(
225-
datasetId ?? "",
226-
key,
227-
fetcher,
228-
session,
229-
crawlOptions,
230-
).catch(console.error);
232+
sendChunks(datasetId ?? "", key, fetcher, session, crawlOptions).catch(
233+
console.error,
234+
);
231235

232236
trieve.datasetId = datasetId;
233237
return redirect("/app");

0 commit comments

Comments
 (0)