add price_segment_id column as PRIMARY KEY to the plan_currency_history primary key to Recurly Connector
AnsweredConnector name: Recurly
Table name: plan_currency_history
Column to add: price_segment_id (Column exists already, need to add as primary key)
API documentation link: https://recurly.com/developers/api/v2021-02-25/index.html#operation/get_plan
Additional details:
Description: The Recurly connector's plan_currency_history table uses plan_id, plan_updated_at and currency as its primary key. price_segment_id is already a column in the table, but it isn't part of the key.
In Recurly, a plan can have several prices in the same currency: one base price plus one price for each price segment. The Fetch a plan endpoint returns all of them in currencies[], each with its price_segment_id and price_segment_code. In the table, all of a plan's prices in one currency share the same key values, so each overwrites the previous one and only one row per plan and currency is kept. The row kept can be a regional segment price rather than the base price.
On our sandbox site, each paid plan has 280 prices in Recurly: 32 base prices (one per currency) and 248 regional segment prices. The table holds 64 rows in total. For some plan and currency pairs, the row it keeps is a segment price, so the table doesn't reliably show the base price either.
Request: add price_segment_id to the primary key of plan_currency_history, so that every plan × currency × price segment price is kept as its own row.
Impact: we're moving our subscription billing to Recurly and use price segments for regional pricing. Without this change, we can't report on plan prices by region or price segment from the connector, including checking what a subscriber was charged against the price list. Today we'd have to call the Recurly API separately to get the full price list.
Related support ticket: #427993
-
Official comment
Hi Ishita,
Thank you for sharing the feature request regarding the Recurly Connector. We have added your request to our backlog and will prioritize it based on overall demand and impact. We understand the importance of accurately reporting on plan prices by region and price segment, and we will keep you updated on any progress and developments. If you have any further questions or need assistance, please feel free to reach out.
Best,
Sanjeevv Maniram -
Hi! Wanted to add some Business impact to the request, from our sandbox data.
- We use regional pricing heavily. Each of our 2 active plans has 280 prices across 32 currencies. That is one base price per currency plus 248 price segments, and a single currency can carry up to 179 prices.
- Because plan_currency_history is keyed on plan_id, plan_updated_at, currency, those 280 prices collapse into 32 rows per plan, one per currency. The other 248 prices per plan, about 89%, are overwritten. The row that survives is always a segment price, never the base price, so the destination has no base price for any currency on either plan. The price_segment_id value on each surviving row is correct, but there's nothing to tell us which of a currency's prices it is.
In practice:
- We can't get list prices by plan, currency and region from the warehouse.
- A subscription's charged amount can't be checked against the price it should have had.
- Revenue can't be analysed by price segment, for example regional pricing tests and pricing changes.
- Today the only workaround is a separate integration that calls the Recurly API, which defeats the purpose of using the connector. Adding price_segmentld keeps all the prices.
Adding price_segment_id to the primary key would keep every price as its own row and fix all of the above. We're happy to share more detail or test a fix on our sandbox connection. This is one of the deciding factors in whether we use the Fivetran Recurly connector for production, so a rough timeline would help us a lot.
Thanks! - We use regional pricing heavily. Each of our 2 active plans has 280 prices across 32 currencies. That is one base price per currency plus 248 price segments, and a single currency can carry up to 179 prices.
Please sign in to leave a comment.
Comments
2 comments