---
schema_version: "1"
id: 78a7b37de8b470673376b4c315dbd796ad3cc54492c1f411a2b276cfc14309b7
title: Partner Cloud | Get Referral Codes
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/pc_action_get_referral_codes.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.pc_action_get_referral_codes.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: fcfb0bf00903c1d4b5ecf4ca5184eb5ecc1545358e505bff17e237f5f24d13ab
description: Retrieves the referral codes associated with a user's contact. Use this action when a user wants to apply a referral code during deal registration. This action returns a list of referral codes including code name, description, and relevant details that the user can select from.
products:
  - Partner Cloud
  - Cross Cloud
release: "264"
---
# Partner Cloud | Get Referral Codes

Retrieves the referral codes associated with a user's contact. Use this action when a user wants to apply a referral code during deal registration. This action returns a list of referral codes including code name, description, and relevant details that the user can select from.

## Action Details

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small "><colgroup><col style="width:33.33333333333333%"> <col style="width:66.66666666666666%"></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><strong>API Name</strong></td><td class="slds-cell-wrap" style="vertical-align:top;">GetReferralCodes</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><strong>Loading Text</strong></td><td class="slds-cell-wrap" style="vertical-align:top;">Fetching referral codes</td></tr></tbody></table>

## Inputs

  
| **Label** | **API Name** | **Description** |
| --- | --- | --- |
| Contact ID | contactId | The ID of the partner user whose referral codes are to be retrieved. |

**Mapped to Variable:** Contact ID

## Outputs

  
| **Label** | **API Name** | **Description** |
| --- | --- | --- |
| Lead Record Types | leadRecordTypes | A JSON string of referral code objects available to the user's contact. Each object contains referralCode (the code string to apply to the Lead), programName (name of the loyalty program the code belongs to), expirationDate (ISO date string of when the code expires, empty if no expiration), voucherType (type of voucher, for example, FixedValue, DiscountPercentage, ProductService), and incentiveDescription (human-readable description of the benefit). Only includes codes whose voucher EffectiveDate is on or after today and haven't yet expired. Present these to the user so they can select one to apply to the lead. |