Skip to content

Commit 8660b21

Browse files
committed
improvement(revenuecat): include updated_at_ms in attributes placeholder and wand prompt
1 parent 5ebd307 commit 8660b21

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

apps/sim/blocks/blocks/revenuecat.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ Return ONLY the numeric timestamp, no text.`,
288288
id: 'attributes',
289289
title: 'Attributes',
290290
type: 'long-input',
291-
placeholder: '{"$email": {"value": "user@example.com"}}',
291+
placeholder: '{"$email": {"value": "user@example.com", "updated_at_ms": 1709195668093}}',
292292
condition: {
293293
field: 'operation',
294294
value: ['update_subscriber_attributes', 'create_purchase'],
@@ -300,17 +300,17 @@ Return ONLY the numeric timestamp, no text.`,
300300
wandConfig: {
301301
enabled: true,
302302
prompt: `Generate a JSON object of RevenueCat subscriber attributes based on the user's description.
303-
Each attribute key maps to an object with a "value" field.
303+
Each attribute key maps to an object with a "value" field (string) and an "updated_at_ms" field (Unix epoch ms; required by the API for conflict resolution — use the current timestamp unless the user specifies otherwise).
304304
Reserved attribute keys start with "$": $email, $displayName, $phoneNumber, $mediaSource, $campaign, $adGroup, $ad, $keyword, $creative, $iterableUserId, $iterableCampaignId, $iterableTemplateId, $onesignalId, $airshipChannelId, $cleverTapId, $firebaseAppInstanceId.
305305
Custom attributes use plain keys without "$".
306306
307307
Examples:
308308
- "set email to john@example.com and name to John" ->
309-
{"$email": {"value": "john@example.com"}, "$displayName": {"value": "John"}}
309+
{"$email": {"value": "john@example.com", "updated_at_ms": 1709195668093}, "$displayName": {"value": "John", "updated_at_ms": 1709195668093}}
310310
- "set plan to premium and team to acme" ->
311-
{"plan": {"value": "premium"}, "team": {"value": "acme"}}
311+
{"plan": {"value": "premium", "updated_at_ms": 1709195668093}, "team": {"value": "acme", "updated_at_ms": 1709195668093}}
312312
313-
Return ONLY valid JSON.`,
313+
Return ONLY valid JSON - no explanations, no extra text.`,
314314
},
315315
},
316316
{

0 commit comments

Comments
 (0)