Save shopper context
Create read-only Swym accounts for your shoppers.
swat.saveShopperContext
Save shopper context via Swym shopper capture interfaces; or in other words, make a read-only account on your ecommerce platform using Swym Wishlist.
Definition
swat.saveShopperContext(email, userConfig, onSuccess, onError)
Example
let email = "[email protected]" // shopper email
let userConfig = {
fname: "first name",
lname: "last name",
src: "", // enum(remoteauth, wlreminder, bispaform)
app: "", // enum(Wishlist, Watchlist)
skipConnect: false // send connect emails
};
swat.saveShopperContext(email, userConfig, onSuccess, onError)
API Parameters
Argument | Type | Description |
---|---|---|
string | A valid shopper email address | |
userConfig | object | An object that contains information for creating a shopper context (user account) on the swym platform. |
onSuccess | function | function which will be called with the success response |
onError | function | Error callback function which will be called if there is an error. |
Response
{
"message": "User saved."
}
You will receive a simple message that the user is now saved, The user email in question will receive an email to verify their account.
Other References
User Config
Key | Type | required? | description |
---|---|---|---|
fname | string | optional | Shopper first name |
lname | string | optional | Shopper last name |
acceptMarketing | boolean | optional | Set param to true or false if user has chosen to not check an Add to mailing list checkbox |
src | enum(remoteauth, wlreminder, bispaform) | optional | Enumerated list of sources for email capture report |
app | enum(Wishlist, Watchlist) | optional | Enumerated list of apps for email capture report |
skipConnect | boolean | yes | Set to true when merchant/retailer settings has a flag to avoid sending remote connect email |
Enums
This belongs to src
attribute
enum | app | description |
---|---|---|
remoteauth | Wishlist, Swym Back in Stock Alerts | is a remote authentication event type. |
wlreminder | Wishlist | Is a wlreminder authentication context for wishlist. |
bispaform | Swym Back In Stock Alerts | Is a watchlist authentication context for swym back in stock alerts . |
Updated over 1 year ago