Skip to main content
knowledgecenter.avangate.com

Buy Link Customer ID parameter

External customer ID in buy links

Create new Customer accounts for subscriptions generated when shoppers purchase your products. You can use the CUSTOMERID (case sensitive) parameter to set external identifiers in the buy links of the products purchased by your customers. Note: Products need to have the renewal system enabled and a subscription generated as a part of the purchasing process for Customer accounts to be created, or updated accordingly.

Add the CUSTOMERID parameter to a buy link generated using the Sales Links area of the Control Panel. For example, the following link:

https://secure.avangate.com/order/checkout.php?PRODS=1234567

should be changed to

https://secure.avangate.com/order/checkout.php?PRODS=1234567&CUSTOMERID=999999a

If the no existing Customer Accounts feature the 999999a identifier, then a new Customer Account will be created using the external reference you specified.

Attribute a subscription to an existing customer 

Aggregate subscriptions under the same Customer account if the products they're associated to are purchased by the same shopper by taking advantage of theCUSTOMERID (case sensitive) parameter added to buy links.

You can use and existing external customer ID for a Customer account already generated in the Avangate system to place new orders.

Let's assume that a Customer account with the 999999a CUSTOMERID (external customer reference) was already created for one of your shoppers for a previous order. When the same shopper places a new order using the Avangate platform, the subscriptions generated will automatically be grouped under the same Customer account provided that the purchase is done using a buy link which features &CUSTOMERID=999999a.

For example, the following link:

https://secure.avangate.com/order/checkout.php?PRODS=1234999

should be changed to

https://secure.avangate.com/order/checkout.php?PRODS=1234999&CUSTOMERID=999999a

to ensure that any new subscriptions generated will be aggregated under the existing Customer accounts with the 999999a identifier.

Place orders using the Avangate Customer Reference (ID) AV_CUSTOMERID

The Avangate system generates default customer numerical (integer) IDs automatically for all orders containing products that feature subscriptions. Once created,Avangate customer references can be used for new acquisitions aggregating new subscriptions under an existing Customer account.

Note: Avangate customer references are spawned automatically by the Avangate system. While you're able to use them to place new orders for existing customers, you can't set your own Avangate customer references. However, you can create and edit External customer references according to your needs. External Customer IDs and Avangate Customer IDs can coexist.

Existing system-generated IDs can serve to group new subscriptions under already created Customer accounts, by using the AV_CUSTOMERID (case sensitive) parameter in the Buy Links for orders.

Assume that a Customer account with the 123456789 AV_CUSTOMERID (internal Avangate customer reference) was already created for one of your shoppers for a previous order. When the same shopper places a new order using the Avangate platform, the subscriptions generated will automatically be grouped under the same Customer account provided that the purchase is done using a buy link which features &AV_CUSTOMERID=123456789. All subscriptions generated as a result of this order will automatically be grouped under the customer featuring the 123456789 system generated ID.

Note: AV_CUSTOMERID can only be used for new acquisitions made by existing customers, which have already had an internal Avangate customer reference attributed to them.

If parameters for both an Avangate Customer ID and an External Customer ID are used in the Buy Link for the same order, the internal Avangate customer reference will take precedence over the external identifier (that will be ignored by the system. )

 

Customer reference scenarios

Avangate Customer ID 
(internal, system-generated customer reference) 
is used

External Customer ID 
(external customer reference) is used

Result

NO

(new order without AV_CUSTOMERID in the Buy Link)

NO

(new order without CUSTOMERID in the Buy Link)

New customer account is generated using the order billing details.

New Avangate customer reference is also created for the account.

NO

(new order without AV_CUSTOMERID in the Buy Link)

YES

(new order with CUSTOMERID in the Buy Link)

New customer account is generated using the order billing details.

New Avangate customer reference is also created for the account.

The customer account will feature the External customer reference provided.

YES

(new order with AV_CUSTOMERID in the Buy Link)

YES

(new order with CUSTOMERID in the Buy Link, but identifier is either new or different than the one featured by the customer account for which the Avangate customer reference was provided)

Subscriptions generated are automatically assigned to the customer account featuring the Avangate customer reference provided in the Buy Link.

YES

(new order with AV_CUSTOMERID in the Buy Link)

NO

(new order without CUSTOMERID in the Buy Link)

Subscriptions generated are automatically assigned to the customer account featuring the Avangate customer reference provided in the Buy Link.

YES

(new order with AV_CUSTOMERID in the Buy Link)

YES

(new order with CUSTOMERID in the Buy Link, and the identifiers is the same as the one featured by the customer account for which the Avangate customer reference was provided)

Subscriptions generated are automatically assigned to the customer account featuring the Avangate customer reference provided in the Buy Link.

NO

(new order without AV_CUSTOMERID in the Buy Link)

YES

(new order with CUSTOMERID in the Buy Link, and the identifiers used is an External customer reference for and existing customer account)

Subscriptions generated are automatically assigned to the customer account featuring the External customer reference provided in the Buy Link.