Contact information in CPQ wizards
input.MembershipKey
integration parameter in CPQ to get
contact information for the user who is logged in to Rhythm for Civics.For example, you can use the membership key to get the user's contact information from Rest Service and then display the basic contact fields in a wizard.
This example uses an include ruleset with three rules: a variable, a web service, and a screen.
Variable
Use a variable in CPQ to specify a query string to get the contact information of the logged in user, such as the first name, last name, and email address. The query string uses the membership key to get the right contact. Example:
="{select:[MembershipKey,Contact.Identity.FirstName,Contact.Identity.LastName,Contact.EMailAddress,Contact.MobileNumber],distinct:False,filter:[{property:MembershipKey,operator:Equal,value:"+input.MembershipKey+"}]}"
Web Service
Based on the membership key, get the contact information from Rest Services. Use the generic service to get the Hansen.Portal.Membership object.
When you configure the web service in CPQ, use the x-Ips-ClientId and x-Ips-Secret fields to authenticate using an authorized app.
To select the right contact information, add a Url parameter referring to the query string variable that you defined previously.
The return variable for the service is PortalUserResponse.
Screen
Based on the return variable from the Rest Services, you can show contact information on a wizard screen. For example, to show the email address, add a text field and specify this value for the screen option:
=PortalUserResponse["data"][0]["Contact"]["EMailAddress"]