View as Markdown
Referrizer icon

Referrizer ACTION

Create Visit

Create a visit to an existing contact in Referrizer. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Referrizer account once, then configure and run Create Visit from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "referrizer-create-visit",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    referrizer: { authProvisionId: "apn_xxxxxxx" },
    contactId: "Contact ID",
    points: 10,
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Visit inputs
Property Type Description
contactId Contact ID string
The ID of the contact
Required Dynamic
points Points integer
Loyalty points to be earned. If not provided, the number of earned points will depend on your Loyalty settings.
Optional
amountSpent Amount Spent integer
Dollar amount spent connected to Earning Points value. E.g. if $1 is 1pts and when contact spent $25 they will get 25pts. This is related to loyalty settings value 'pointsPerDollar'.
Optional
date Date string
Date and time of the visit in this request with the format 'YYYY-MM-DDTHH:MM:SS.SSSZ'. E.g. 2022-01-19T16:16:24.000Z. Date must be in the past. If the date is set a notification for the visit will not be sent.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
referrizer-create-visit
Version
0.0.2
App
Referrizer
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes