How to pass Quote Id dynamically to logik External Connection during Product Configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi Team,
Good morning.
I am currently working on Logik.io Product Configuration in Product Catalog Management and using an External Connection to fetch Quote Line Item details.
At the moment, the SOQL query in the external connection uses a hardcoded Quote Id:
SELECT Id, Product2Id, Product2.ProductCode, Quantity, StartDate, EndDate, SellingModelType
FROM QuoteLineItem WHERE QuoteId = '0Q0dI000002CXALSA4'
- When a user clicks/configures a product from a specific Quote,
- I need to dynamically pass the current Quote Id into the External Connection,
- So that I can fetch all Quote Line Items related to the same Quote currently being configured.
Could you please let me know:
- Is there any supported way to pass the Quote Id dynamically into the External Connection query?
- Can contextual variables/session variables/current quote data be accessed inside the External Connection?
- Is there any recommended approach or best practice for fetching Quote Line Items dynamically during product configuration?
- Could you please share any relevant documentation or examples for this implementation?
This would help us avoid hardcoding Quote Ids and ensure the configuration works dynamically for every Quote.
Best Regards,
Aparna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
46m ago
Hi Aparna,
This is actually a good question. Integrating Logik.io with ServiceNow CPQ frequently requires passing dynamic context to external systems. Hardcoding IDs in your SOQL query is definitely a practice to avoid.
Here is how you can implement this dynamically:
1 & 2. Passing the Quote ID and Accessing Contextual Variables Logik.io and ServiceNow CPQ natively support passing dynamic parameters. You can pass the current Quote data into your External Connection using Context Variables:
First, create a custom context variable in your Pricing/CPQ configuration setup (e.g., sfdc_quote_id).
Map this custom context variable to your transaction entity (the Quote record). Ensure this maps to the specific field storing the Salesforce ID (the 0Q0... string), rather than the internal ServiceNow sys_id.
Once mapped, the CPQ engine makes this variable available during the product configuration session. In your Logik External Connection definition, you can reference it dynamically in the SOQL query payload. You will typically use a binding syntax like {{context.sfdc_quote_id}} to replace the hardcoded string.
Let me know if you need any further specifics on the payload configuration!
Please mark this response as helpful if it guided you in the right direction."
Regards,
Yogesh